[AstroPy] FITS cube with Faraday depth axis

Hill, Alex ashill at astro.ubc.ca
Fri Mar 23 19:58:05 EDT 2018


Hi all,

I’m working with Faraday depth FITS cubes, where CTYPE3 = ‘RM’ and CUNIT3 = ‘rad/m2'. (CTYPE1=‘GLON-CAR’ and CTYPE2=‘GLAT-CAR’.)

I would like to treat the Faraday depth cube like a spectral cube, for example calculating moments.

I’m trying to load the cube using SpectralCube.read. It fails to read because the RM axis is not recognized as a spectral axis. Instead, the coordinate type for the RM axis is None:
w.get_axis_types()
output:
[{'coordinate_type': 'celestial',
 'group': 0,
 'number': 0,
 'scale': 'non-linear celestial'},
{'coordinate_type': 'celestial',
 'group': 0,
 'number': 1,
 'scale': 'non-linear celestial'},
{'coordinate_type': None, 'group': 0, 'number': 0, 'scale': 'linear'}]

I can hack it to work by loading the FITS header and changing the RM axis to a velocity axis:
hdr['CTYPE3'] = 'VELO-LSR'
hdr['CUNIT3'] = 'm/s'
w = wcs.WCS(hdr)
and then pass the data and hacked header to SpectralCube.

However, is there a way to cleanly recognize a Faraday depth axis as a spectral axis?

It looks to me like this would be somewhere in the WCS class, but I can’t find where in the code VELO-LSR, for example, gets recognized as a spectral axis.

Cheers,
Alex

---------
Alex Hill
University of British Columbia and Space Science Institute
email: ashill at astro.ubc.ca

Based at
Dominion Radio Astrophysical Observatory, National Research Council Canada
Mailing: PO Box 248, Penticton, BC V2A 6K3, Canada
Physical: 717 White Lake Road, Kaleden, BC V0H 1K0, Canada

phone: +1 250-497-2356



More information about the AstroPy mailing list