I want to read a FITS file from https://hiverse.alkaidos.cn/ (you can download any one to reproduce this)
But it returns:
from spectral_cube import SpectralCube as sc
file = "00_DEC_-13.0_-3.0__06_RA_60.0_70.0__-600kms_600kms.I.fits"
sc.read(file)
ValueError: No celestial axes found in WCS
So I checked this:
wcs.get_axis_types()
[{'coordinate_type': None, 'scale': 'linear', 'group': 0, 'number': 0},
{'coordinate_type': None, 'scale': 'linear', 'group': 0, 'number': 0},
{'coordinate_type': 'spectral', 'scale': 'linear', 'group': 0, 'number': 0}]
This indicates that the first 2 axis, which is RA
and DEC
, should have type='celestial'
but now None
How can I change them to celestial
and write it to a new FITS file?