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

compatible with C5.2 naming convention

parent 3724cd6f
...@@ -472,8 +472,12 @@ class CsstMsDataManager: ...@@ -472,8 +472,12 @@ class CsstMsDataManager:
def l0_detector(self, detector=6): def l0_detector(self, detector=6):
""" L0 detector-specific image file path """ """ L0 detector-specific image file path """
assert detector in self.available_detectors assert detector in self.available_detectors
fn = f"{self.telescope}_{self.instrument}_{self.project}_{self.obs_type}_{self.exp_start}_{self.exp_stop}_" \ if self.ver_sim == "C5.2":
f"{self.obs_id}_{detector:02d}_L{self.level}_V{self.version}.{self.ext}" fn = f"{self.telescope}_{self.instrument}_{self.project}_{self.obs_type}_{self.exp_start}_" \
f"{self.exp_stop}_{self.obs_id}_{detector:02d}_L{self.level}_{self.version}.{self.ext}"
else:
fn = f"{self.telescope}_{self.instrument}_{self.project}_{self.obs_type}_{self.exp_start}_" \
f"{self.exp_stop}_{self.obs_id}_{detector:02d}_L{self.level}_V{self.version}.{self.ext}"
fp = os.path.join(self.dir_l0, fn) fp = os.path.join(self.dir_l0, fn)
assert os.path.exists(fp) assert os.path.exists(fp)
return os.path.join(self.dir_l0, fn) return os.path.join(self.dir_l0, fn)
...@@ -481,12 +485,8 @@ class CsstMsDataManager: ...@@ -481,12 +485,8 @@ class CsstMsDataManager:
def l0_crs(self, detector=6): def l0_crs(self, detector=6):
""" L0 cosmic ray file path """ """ L0 cosmic ray file path """
assert detector in self.available_detectors assert detector in self.available_detectors
if self.ver_sim == "C5.2": fn = f"{self.telescope}_{self.instrument}_{self.project}_CRS_{self.exp_start}_" \
fn = f"{self.telescope}_{self.instrument}_{self.project}_CRS_{self.exp_start}_{self.exp_stop}_" \ f"{self.exp_stop}_{self.obs_id}_{detector:02d}_L{self.level}_V{self.version}.{self.ext}"
f"{self.obs_id}_{detector:02d}_L{self.level}_{self.version}.{self.ext}"
else:
fn = f"{self.telescope}_{self.instrument}_{self.project}_CRS_{self.exp_start}_{self.exp_stop}_" \
f"{self.obs_id}_{detector:02d}_L{self.level}_V{self.version}.{self.ext}"
fp = os.path.join(self.dir_l0, fn) fp = os.path.join(self.dir_l0, fn)
assert os.path.exists(fp) assert os.path.exists(fp)
return os.path.join(self.dir_l0, fn) return os.path.join(self.dir_l0, fn)
......
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