import pyfits hdulist = pyfits.open('sample.fits') hdulist.info() hdulist[0].header['name'] scidata = hdulist[1].data scidata = hdulist['TABLE'].data hdulist.close()