aplpy/aplpy — Issue #50: Lots of problems with CASA (continuum) images
Author: keflavich
Created: 2012-01-27 17:50:37+00:00
State: open

CASA writes out continuum images with NAXIS=4, but two axes (Stokes and Freq) have length 1 by default.

>>> F = aplpy.FITSFigure('W51msAD129.fits')

Exception:
Attempted to read in 4-dimensional FITS cube, but
dimensions and slices were not specified. Please specify these
using the dimensions= and slices= argument. The cube dimensions
are:

0 RA---SIN 512
1 DEC--SIN 512
2 FREQ 1
3 STOKES 1

>>> F = aplpy.FITSFigure('W51msAD129.fits', dimensions=[2,3])

InvalidTransformError: Invalid coordinate transformation parameters

If I strip out all of the "bad" header keywords (PC\*, C\*[34], N\*[34]), most of the files work. However, some don't, with this error:

>>> F = aplpy.FITSFigure('temp.fits')
AttributeError: 'YAxis' object has no attribute 'apl_label_form'

That happened if EQUINOX was not in [1950,2000]; unfortunately, CASA writes out EQUINOXes that are inconsistent with the rest of the header.