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))
# -----------------------------------------------------------------
评论列表
文章目录