[AstroPy] Changing dimensionality of WCS

Adam Ginsburg adam.ginsburg at colorado.edu
Tue Sep 24 14:23:32 EDT 2013

When working with data cubes, I often need to extract WCS information
for 1 or 2 of the WCS dimensions.   The docs
(http://docs.astropy.org/en/latest/wcs/index.html) give decent
examples of how to generate a WCS from scratch, but I don't see any
obvious way to extract a lower-dimensional WCS from a WCS.  Does such
functionality exist?  If not, does it make sense to generate a WCS
from scratch and copy over just the relevant parameters?

The use cases I have in mind:
- extract position-only information from a data cube
- extract spectral-only information from a data cube
- extract position-velocity from a data cube, where position may be arbitrary
   - or position may be any standard projection (RA---TAN, for example)

The last case, in particular, I don't actually know how to do - is it
possible to create a WCS axis that is not one of the built in /
allowed sky projections?

Adam Ginsburg
Fellow, European Southern Observatory

More information about the AstroPy mailing list