Skip to content

wokxy2radec and radec2wokxy don't agree #7

@blanton144

Description

@blanton144

The code below SHOULD produce an ra2, dec2 that is the same as the original ra, dec, but it is off by a fraction of an arcsec. This happens for most examples I try.

Note that getting the reverse transform (x,y -> ra/dec) of the radial distortions is often tricky; not sure how this is being done in the code. Usually I implement that as an optimization problem, finding the ra,dec that best predict the given x,y using the forward (ra/dec -> x,y) transform.

ra = np.array([12.30468545] * 2, dtype=np.float64)
dec = np.array([52.58780416] * 2, dtype=np.float64)
racen = 14.289097510524789 
deccen = 51.98826274680977
jd = 2459491.7920949073
pa = 41.42279
 
x, y, warn, ha, para = coordio.utils.radec2wokxy(ra, dec, jd, 'Apogee',
                                               racen, deccen, pa, 'APO', jd)

ra2, dec2, warn2 = coordio.utils.wokxy2radec(x, y, 'Apogee',
                                             racen, deccen,  pa,
                                             'APO', jd)

print(ra, dec)
print(ra2, dec2)
print((ra - ra2) * 3600., (dec - dec2) * 3600.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions