Wednesday, July 8, 2015

Reading a FITS file is easy

from astropy.io import fits
data, header = fits.getdata("input_file.fits", [extension number,] header=True)


Seriously, these two lines of code show why we should all be using Astropy.
 

No comments:

Post a Comment