Closed rubyvanrooyen closed 3 years ago
I need a little advise on the implementation of this issue:
Raising a parser.error
here would be the simplest, but I have not used shadems
enough to know if this will perhaps effect valid functionality where you only list one antenna, such as autocorrelations.
For now, I decided against raising an error
because giving only a single antenna as value is valid in the greater scheme of things
I have decided to raise a Python warning though. This look vicious enough to draw attention, but allows the user to ignore it should they wish (may be a little to in your face when there are situations when you only spec one antenna in a perfectly reasonable command input, not sure....)
shadems msfiles/small.ms --xaxis TIME --yaxis amp -C DATA --corr XX,YY --field 0 --ant m010
/scratch/ruby/_build/shadeMS/shade_ms/main.py:135: UserWarning: Suggested usage: '--baseline m010-*' to select all baselines to m010.
warnings.warn(msg, category=UserWarning)
and
shadems msfiles/small.ms --xaxis TIME --yaxis amp -C DATA --corr XX,YY --field 0 --ant-num 3
/scratch/ruby/_build/shadeMS/shade_ms/main.py:135: UserWarning: Suggested usage: '--baseline ant2-*' to select all baselines to ant2.
warnings.warn(msg, category=UserWarning)
This can be made more "subtle" by adding a log warning rather than a Python warning?
I also double check if any data is returned, if not I also add a logger warning -- to try and make it more clear that no output is forthcoming
2020-08-06 14:44:08 - shadems - WARNING - No data for selection subset
2020-08-06 14:44:08 - shadems - INFO - : rendering 0 dataframes with 0 points into 1 plot types
Issue a warning when only one antenna is given to
--ant
. The meaning of the option is really "all baselines between antennas in the given subset". Do not use this option in the sense of "all baselines to one given antenna". This can be accomplished by using--baseline ant-*
, so a gentle warning prodding the user in that direction could be nice.