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:
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".
Attempting to answer https://github.com/dstndstn/astrometry.net/issues/2#issuecomment-159384397
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