Loading csst_common/data_manager.py +26 −31 Original line number Diff line number Diff line Loading @@ -541,51 +541,46 @@ class CsstMsDataManager: def get_bias(self, detector=6): """ get bias data """ if self.custom_bias is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "bias", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("bias", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_bias.format("bias", detector) return fp def get_dark(self, detector=6): """ get dark data """ if self.custom_dark is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "dark", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("dark", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_dark.format("dark", detector) return fp def get_flat(self, detector=6): """ get flat data """ if self.custom_flat is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "flat", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("ledflat", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_flat.format("flat", detector) return fp def get_shutter(self, detector=6): """ get flat data """ fp = os.path.join( self.path_aux, "C6.2_ref_mbi", "CSST_MSC_MS_SHUTTER_{:02d}_{:04d}.fits".format( detector, 1 if self.ref_version is None else self.ref_version ) "C6.2_ref_crds", "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("shutter", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) Loading Loading
csst_common/data_manager.py +26 −31 Original line number Diff line number Diff line Loading @@ -541,51 +541,46 @@ class CsstMsDataManager: def get_bias(self, detector=6): """ get bias data """ if self.custom_bias is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "bias", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("bias", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_bias.format("bias", detector) return fp def get_dark(self, detector=6): """ get dark data """ if self.custom_dark is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "dark", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("dark", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_dark.format("dark", detector) return fp def get_flat(self, detector=6): """ get flat data """ if self.custom_flat is None: return os.path.join( fp = os.path.join( self.path_aux, "C6.2_ref_crds", "csst_msc_{}_{:02d}_{:04d}.fits".format( "flat", detector, 1 if self.ref_version is None else self.ref_version ) "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("ledflat", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) else: return self.custom_flat.format("flat", detector) return fp def get_shutter(self, detector=6): """ get flat data """ fp = os.path.join( self.path_aux, "C6.2_ref_mbi", "CSST_MSC_MS_SHUTTER_{:02d}_{:04d}.fits".format( detector, 1 if self.ref_version is None else self.ref_version ) "C6.2_ref_crds", "csst_msc_ms_{}_{:02d}_{:04d}.fits".format("shutter", detector, 1) ) if not os.path.exists(fp): raise FileNotFoundError(fp) Loading