migrate to using astropy.io.fits