Reading a column in multiple fits file
Shilpashesha opened this issue · 0 comments
Shilpashesha commented
I'm trying to get a column information from a lot of FITS files. There are more than 100 FITS file in the directory. All these files are located in a different directory. How do I do this?
I have tried something like this:
import glob
from astropy.io import fits, ascii
path = mypath
for fits in glob.glob(path+'*.fits'):
hdulist = fits.open(fits)
print hdulist[0].header['The header I want']
hdulist.close()
But it is not giving me any outputs. I don't know what's wrong.