[AstroPy] How to change fits table header to another name
Yannick Roehlly
yannick.roehlly at gmail.com
Thu Jun 25 16:15:46 EDT 2015
Le jeudi 25 juin 2015, 14:53:33 Erik Bray a écrit :
> > from astropy.io <http://astropy.io> import fits
> > hdu_list = fits.open("foo.fits")
> > hdu_list[1].columns[1].name = "RA_1" # The column index starts at 0
> > hdu_list.writeto("bar.fits")
>
> By the way, in the current dev version, columns['RA'].name = 'RA_1' will
> work. I don't think it works in any released version though.
Hi Erik,
Thanks, that's very useful.
Yannick
--
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
More information about the AstroPy
mailing list