ska-sa / katpoint

Coordinate library for the MeerKAT project
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

silent failure in target coordinate parsing #66

Open bennahugo opened 4 years ago

bennahugo commented 4 years ago

Katpoint silently fails to parse a casa style coordinate string, as per discussion in https://github.com/ska-sa/katsdpcal/issues/34 resulting in incorrect target coordinates. This really needs a regex check, or parsing via astropy.SkyCoord

From @KimMcAlpine: I think the problem is with your model string which you provide as being:

"fake, radec, 19:39:25.02671, -63.42.45.6255, 544 1088 wsclean 5.0 [0 0 0 0 0] false 815867187.5"

katpoint doesn't read the CASA declination format as can be evidenced by trying:

model_string = "fake, radec, 19:39:25.02671, -63.42.45.6255, 544 1088 wsclean 5.0 [0 0 0 0 0] false 815867187.5"
model_targets = katpoint.Target(','.join(model_string.split(',')[:-1]))
print(model_targets)
fake, tags=radec, 19:39:25.03 -63:25:39.6, no flux info
bennahugo commented 4 years ago

Logging the issue, so we don't loose sight of it