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

How do the various WCS classes work? #72

Open
dstndstn opened this issue Nov 24, 2015 · 0 comments
Open

How do the various WCS classes work? #72

dstndstn opened this issue Nov 24, 2015 · 0 comments

Comments

@dstndstn
Copy link
Owner

Attempting to answer dstndstn/astrometry.net#2 (comment)

The WCS situation is fairly confusing.

There are several "underlying" WCS classes, all from astrometry.util.util -- Tan, Sip, and anwcs_t. Tan and Sip are the "native" astrometry.net implementations. anwcs can wrap either those classes, or Wcslib. These classes all have "pixelxy2radec" and "radec2pixelxy" methods.

At the Tractor level, there are a few options:
-ConstantFitsWcs is probably the easiest -- it opaquely wraps a Tan or Sip object. (maybe anwcs also?)

-WcslibWcs is similar, but uses anwcs (ie, Wcslib via two levels of wrapping... yuck)

-TanWcs wraps a Tan object, also exposing the Tan object's parameters so that they can be optimized by the tractor, if you wanted.

To answer the specific question here, what I don't understand about this code snippet:

kswcs=FitsWcs(Tan('xmm_tile3_ks_20141017.fits',1)) . . .
t=Tan()
t.set_cd(kswcs.cd1_1,kswcs.cd2_1,kswcs.cd1_2,kswcs.cd2_2)

is why you need "t" in the first place. :) If you change FitsWcs to ConstantFitsWcs, you're right, it won't have the cd1_1 etc properties, but I don't see why you actually need them... You can get the underlying wcs object by "kswcs.wcs".

cheers,
--dustin

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