Commit aacf2c91 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

assert shutter file exists

parent f54a23db
...@@ -580,16 +580,17 @@ class CsstMsDataManager: ...@@ -580,16 +580,17 @@ class CsstMsDataManager:
def get_shutter(self, detector=6): def get_shutter(self, detector=6):
""" get flat data """ """ get flat data """
if self.custom_flat is None: fp = os.path.join(
return os.path.join( self.path_aux,
self.path_aux, "C6.2_ref_mbi",
"C6.2_ref_mbi", "CSST_MSC_MS_SHUTTER_{:02d}_{:04d}.fits".format(
"CSST_MSC_MS_SHUTTER_{:02d}_{:04d}.fits".format( detector, 1 if self.ref_version is None else self.ref_version
detector, 1 if self.ref_version is None else self.ref_version
)
) )
)
if not os.path.exists(fp):
raise FileNotFoundError(fp)
else: else:
return self.custom_flat.format("flat", detector) return fp
def get_axeconf(self): def get_axeconf(self):
return os.path.join(self.path_aux, "axeconf") # "/home/csstpipeline/L1Pipeline/aux/axeconf" return os.path.join(self.path_aux, "axeconf") # "/home/csstpipeline/L1Pipeline/aux/axeconf"
......
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