Commit 295e39a5 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

tweaks

parent 37583558
Pipeline #11828 passed with stage
in 0 seconds
......@@ -56,6 +56,7 @@ REQUIRED_KEYS_IN_META = dict(
# 数据产品信息
data_model=None, # 数据产品类型,手动设置
data_uuid=None, # UUID,自动设置
parent_uuids=[], # 父数据产品UUID列表
qc_status=-1024, # QC状态
# Docker镜像名称和版本
docker_image=None, # 镜像名称,自动设置
......@@ -68,7 +69,6 @@ REQUIRED_KEYS_IN_META = dict(
healpix=-1, # HEALPix,每种数据产品的nside可以不一样
obs_date="1970-01-01T00:00:00.000", # 观测时间
prc_date="1970-01-01T00:00:00.000", # 处理时间
parent_uuids=[], # 父数据产品UUID列表
)
......@@ -129,6 +129,7 @@ def append_meta(hdulist: fits.HDUList, meta: dict) -> fits.HDUList:
keyword="META",
value=json.dumps(meta, separators=(",", ":"), ensure_ascii=False),
)
# reformat meta_header
meta_header = reformat_header(fits.Header(cards=[meta_card]), comment="METADATA")
# append meta_header to hdulist[0].header
hdulist[0].header = append_header(hdulist[0].header, meta_header)
......
......@@ -533,9 +533,10 @@ class Pipeline:
ref_cat.rename_columns(
ref_cat.colnames, [colname.lower() for colname in ref_cat.colnames]
)
self.logger.info(f"Writing to file: {ref_cat} ...")
ref_cat.write(image.derive1(ext="cat_ref.fits"), overwrite=True)
return image.derive1(ext="cat_ref.fits")
ref_cat_path = image.derive1(ext="cat_ref.fits")
self.logger.info(f"Writing to file: {ref_cat_path} ...")
ref_cat.write(ref_cat_path, overwrite=True)
return ref_cat_path
class ModuleResult(NamedTuple):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment