change column name in a fits with pyfits

python
Published

June 30, 2010

no way to change it manipulating the dtype of the data array.
a=pyfits.open(‘filename.fits’)
a[1].header.update(‘TTYPE1’,‘newname’)

you need to change the header, using the update method of the right TTYPE and then write again the fits file using a.writeto.