Skip to content

silent failure in target coordinate parsing #66

@bennahugo

Description

@bennahugo

Katpoint silently fails to parse a casa style coordinate string, as per discussion in ska-sa/katsdpcal#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions