Repository navigation
Lookup-table WCS for irregular spectral sampling doesn't look up #5462
Description
Activity
Note that this is also discussed in #2362 - astropy doesn't currently support -TAB I think.
This is a very important feature for ground based solar physics datasets, I would very much appreciate it working!
@Cadair - do you have example FITS spectra that use the
-TABconvention?No, they use something that should be represented as a non-uniformly spaced TAB but they don't actually follow the standard that would be loopy.
GWCScan do this@nden yeah GWCS is my current plan. In fact I need to talk GWCS with you at some point.
@Cadair Email me if you want to set up a hangout or just email me your questions.
@nden will do. Need to get my cards in order first :D
GWCS can do this
@nden could you elaborate?
gwcs is meant to be flexible in terms of what transforms it uses and hence has a different than FITS WCS representation. In general the WCS pipeline is represented as a list of steps where each step contains a starting coordinate frame and the transform to the next frame. The simplest case using a a Loookup table would be
[('detector', LookUpTbale()), ('sky', None)]where LookupTable() is an instance of `modeling.models.Tabulr2D().
I guess I should write a complete example of this in the GWCS documentation showing also how to save this to a file.
Is there a gwcs issue tracking this one? It was not immediately obvious from the gwcs docs how to create a gwcs-based
-TABFITS WCS.LSST are trying to generate some data using
-TABso we have test files if people tell me where you would like one uploaded. wcsLib also has an example FITS file using-TABfor multiple axes.Reacted by gpdfIn PR #9641 I implemented support for the
-TABalgorithm in FITS WCS defined in WCS Paper III.To those (still) interested: #9641 has been merged and
WCS-TABshould now be supported inastropy.wcs. Please give it a try.Closing as solved. Thanks, @mcara !
Bearing in mind this may be a) not implemented or b) user error, I seem to be having difficulties expressing the
-TABcoordinate type. I have a (4096, 4096, 19) (in FITS axes order) datacube with 19 planes representing simulated observations through different filters.I want to assign a bogus WCS so that I can visualize angular dimensions on each plane in ds9 or similar. It occurred to me that the third dimension actually is wavelength, and I think I can represent it in FITS WCS using a lookup table. However, when I try to do
mywcs.all_pix2worldI get unexpected behavior that might even be uninitialized memory (i.e. calling the same function twice gives two different results for the wavelength axis).I call
mywcs.all_pix2world([[2048, 2048, i],], 0)whereiis in [0, 19). The first two dimensions come out as I expect (that is,0, 0) but the last is usually 0 and sometimes a very small float value (like 1e-322):Here's my WCS header:
Here's the code to build it up:
Here's the header of the extension
FILTERS:I'm following (or trying to follow) the explanation of the
-TABstandard in Griesen et al. 2006 (PDF). (more links)