# How to change the type of WCS axis

**URL:** <https://community.openastronomy.org/t/how-to-change-the-type-of-wcs-axis/1057>\
**Category:** Astropy\
**Tags:** fits\
**Created:** [July 23, 2024, 11:31am UTC](https://community.openastronomy.org/t/how-to-change-the-type-of-wcs-axis/1057 "2024-07-23T11:31:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firestar](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/firestar/32/401_2.png) [@Firestar](https://community.openastronomy.org/u/Firestar)\
**Post date:** [July 23, 2024, 11:31am UTC](https://community.openastronomy.org/t/how-to-change-the-type-of-wcs-axis/1057/1 "2024-07-23T11:31:15Z")

</div>

I want to read a FITS file from [https://hiverse.alkaidos.cn/](https://hiverse.alkaidos.cn/) (you can download any one to reproduce this)

But it returns:

```auto
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)

```

```auto
ValueError: No celestial axes found in WCS

```

So I checked this:

```auto
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?
