Commit 8acd6a96 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

updated path_aux for sls

parent 2d17d094
...@@ -271,20 +271,29 @@ class CsstMsDataManager: ...@@ -271,20 +271,29 @@ class CsstMsDataManager:
print("final target detector IDs are ", self.target_detectors) print("final target detector IDs are ", self.target_detectors)
return return
def get_bias(self, detector=6) -> np.ndarray: def get_bias(self, detector=6):
""" get bias data """ """ get bias data """
if self.datatype == "mbi":
fp = glob.glob(self.path_aux.format("CLB", detector))[0] fp = glob.glob(self.path_aux.format("CLB", detector))[0]
return fits.getdata(fp) return fits.getdata(fp)
else:
return self.path_aux.format(detector, "bias")
def get_dark(self, detector=6) -> np.ndarray: def get_dark(self, detector=6):
""" get dark data """ """ get dark data """
if self.datatype == "mbi":
fp = glob.glob(self.path_aux.format("CLD", detector))[0] fp = glob.glob(self.path_aux.format("CLD", detector))[0]
return fits.getdata(fp) return fits.getdata(fp)
else:
return self.path_aux.format(detector, "dark")
def get_flat(self, detector=6) -> np.ndarray: def get_flat(self, detector=6):
""" get flat data """ """ get flat data """
if self.datatype == "mbi":
fp = glob.glob(self.path_aux.format("CLF", detector))[0] fp = glob.glob(self.path_aux.format("CLF", detector))[0]
return fits.getdata(fp) return fits.getdata(fp)
else:
return self.path_aux.format(detector, "flat")
def l1_file(self, name="", comment=""): def l1_file(self, name="", comment=""):
""" L1 file path """ L1 file path
...@@ -341,7 +350,7 @@ class CsstMsDataManager: ...@@ -341,7 +350,7 @@ class CsstMsDataManager:
elif hostname == "dandelion" and datatype == "sls": elif hostname == "dandelion" and datatype == "sls":
dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \ dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \
"NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id)
path_aux = "" path_aux = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/csst_{:02d}{}.fits"
dir_pcref = "" dir_pcref = ""
# PMO # PMO
......
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