dataprocessing.py 文件源码

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

项目:CAAPR 作者: Stargrazer82301 项目源码 文件源码
def split_galex_observations(self, original_path, path_fuv, path_nuv):

        """
        This function ...
        :param original_path:
        :param path_fuv:
        :param path_nuv:
        :return:
        """

        # Loop over the files in the path
        for path, name in fs.files_in_path(original_path, extension="fits", returns=["path", "name"]):

            # Get header
            header = getheader(path)

            # Check band
            band = header["BAND"]

            if band == 1: shutil.copy(path, path_fuv)
            elif band == 2: shutil.copy(path, path_nuv)
            else: raise RuntimeError("Invalid band: " + str(band))

    # -----------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号