I'm trying to use WCS for simple linear, non-celestial axes. These are actually just the U,V coordinates representing the Fourier transform of an image.
import astropy.wcs as wcs
w=wcs.WCS(naxis=2)
w.wcs.axis_types[0]=0
w.wcs.axis_types[1]=0
w.wcs.ctype[0]='UU---SIN'
w.wcs.ctype[1]='VV---SIN'
print(w)
ww=w.deepcopy()
As I read the documentation for axis_types, I have specified that the first two axes are are linear axes (i.e. non-celestial). However when the deep copy executes, I get an error:
astropy.wcs._wcs.InconsistentAxisTypesError: ERROR 4 in wcs_types() at line 2486 of file cextern/wcslib/C/wcs.c:
Unrecognized celestial type (UU---SIN in CTYPE1).
What am I doing wrong?
Thanks, Tim
Ah, I see that axis_types is an attribute and cannot be set in this way. It's apparent when trying to do:
w.wcs.axis_types=[0,0]. Still not sure how to do this correctly.