Allow to use astropy.io.fits instead of pyfits