change pyfits to astropy