fits.py 文件源码

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

项目:radar 作者: amoose136 项目源码 文件源码
def _open(self, cache=False, **kwargs):
            if not _fits:
                load_lib()
            hdulist = _fits.open(self.request.get_file(),
                                 cache=cache, **kwargs)

            self._index = []
            for n, hdu in zip(range(len(hdulist)), hdulist):
                if (isinstance(hdu, _fits.ImageHDU) or
                        isinstance(hdu, _fits.PrimaryHDU)):
                    # Ignore (primary) header units with no data (use '.size'
                    # rather than '.data' to avoid actually loading the image):
                    if hdu.size > 0:
                        self._index.append(n)
            self._hdulist = hdulist
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号