ratt-ru / shadeMS

Rapid Measurement Set plotting with dask-ms and datashader
21 stars 6 forks source link

Crash when plotting amp vs freq plot colouring by field #96

Closed LeonMtshweni closed 3 years ago

LeonMtshweni commented 3 years ago

I realise the issue may be with the syntax but I figure I'll get an instructive answer here. I get this error whenever I plotting amp vs freq plot colouring by field

Traceback (most recent call last):
  File "/usr/local/bin/shadems", line 8, in <module>
    main.main([a for a in sys.argv[1:]])
  File "/usr/local/lib/python3.6/dist-packages/shade_ms/main.py", line 485, in main
    cspecs = DataAxis.parse_datum_spec(caxis, default_column, ms=ms) if caxis else [None] * 4
  File "/usr/local/lib/python3.6/dist-packages/shade_ms/data_mappers.py", line 122, in parse_datum_spec
    raise ValueError(f"invalid axis specification '{axis_spec}'")
ValueError: invalid axis specification 'J0408-6545'

The code I ran is as follows shadems --xaxis TIME,TIME,TIME --yaxis DATA:amp,DATA:amp,DATA:amp --baseline "m004-m005" --png "amp_time.png" --title " " --colour-by "J0408-6545,J1150-0023,23C274" 1561723022_sdp_l0_full_1284_full_pol_split.ms

o-smirnov commented 3 years ago

Try --color-by FIELD_ID --field J0408-6545,J1150-0023,23C274.

LeonMtshweni commented 3 years ago

Hi @o-smirnov thank you for your reply I tried your fix shadems --xaxis TIME,TIME,TIME --yaxis DATA:amp,DATA:amp,DATA:amp --baseline "m004-m005" --png "amp_time.png" --title " " --color-by FIELD_ID --field J0408-6545,J1150-0023,3C274 /scratch3/users/mtshweni/dev_oxkat/clipmin_max/selfcal_I_no_subt/msdir/speedy_gonzales_30MHz.ms but I still get the error shadems: error: unrecognized arguments: --color-by /scratch3/users/mtshweni/dev_oxkat/clipmin_max/selfcal_I_no_subt/msdir/speedy_gonzales_30MHz.ms Almost as if it's not seeing the parameters between --color-by and the data

IanHeywood commented 3 years ago

I think this is the American spelling causing the problem:

--colour-by
o-smirnov commented 3 years ago

Yep, the command line options are all about British spelling (I did stop short of using nautical miles for baseline lengths and knots for delay rate...)

LeonMtshweni commented 3 years ago

Fantastic!, thank you so much, I finally have my plots