Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wokxy2radec and radec2wokxy don't agree #7

Open
blanton144 opened this issue Mar 26, 2021 · 0 comments
Open

wokxy2radec and radec2wokxy don't agree #7

blanton144 opened this issue Mar 26, 2021 · 0 comments

Comments

@blanton144
Copy link

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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant