swap pyfits by astropy