spectrum.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pysynphot 作者: spacetelescope 项目源码 文件源码
def _readFITS(self, filename, fluxname):
        fs = pyfits.open(filename)

        # pyfits cannot close the file on .close() if there are still
        # references to mmapped data
        self._wavetable = fs[1].data.field('wavelength').copy()
        if fluxname is None:
            fluxname = 'flux'
        self._fluxtable = fs[1].data.field(fluxname).copy()
        self.waveunits = units.Units(fs[1].header['tunit1'].lower())
        self.fluxunits = units.Units(fs[1].header['tunit2'].lower())

        # Retain the header information as a convenience for the user.
        # If duplicate keywords exist, the value in the extension
        # header will override that in the primary.
        self.fheader = dict(fs[0].header)
        self.fheader.update(dict(fs[1].header))

        fs.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号