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

fixed bugs in path_aux

parent 0226fb8c
...@@ -128,7 +128,7 @@ class CsstMscDataManager: ...@@ -128,7 +128,7 @@ class CsstMscDataManager:
suffix: suffix:
{"img", "wht", "flg", "img_L1", "wht_L1", "flg_L1", "whead"} {"img", "wht", "flg", "img_L1", "wht_L1", "flg_L1", "whead"}
ext: ext:
{"fits", "acat", "rcat"} {"fits", "cat", "rcat"}
Returns Returns
------- -------
...@@ -146,14 +146,16 @@ class CsstMscDataManager: ...@@ -146,14 +146,16 @@ class CsstMscDataManager:
return os.path.join(self.dir_l1, fn) return os.path.join(self.dir_l1, fn)
@property @property
def pc_combined_image(self): def pc_combined_image(self, suffix="img", ext="fits"):
""" combined image """ """ combined image
return os.path.join(self.dir_l1, "combined_image.fits") suffix:
{"img","wht","flg","cat"}
ext:
{"fits"}
"""
fn = "combined_" + "{}.{}".format(suffix,ext)
return os.path.join(self.dir_l1, fn)
@property
def pc_combined_cat(self):
""" combined catalog """
return os.path.join(self.dir_l1, "combined_cat.fits")
@property @property
def pc_ref_cat(self): def pc_ref_cat(self):
...@@ -196,13 +198,16 @@ class CsstMscDataManager: ...@@ -196,13 +198,16 @@ class CsstMscDataManager:
return ccd_ids return ccd_ids
def get_bias(self, ccd_id=6): def get_bias(self, ccd_id=6):
return fits.getdata(self.path_aux.format("CLB", ccd_id)) fp = glob.glob(self.path_aux.format("CLB", ccd_id))[0]
return fits.getdata(fp)
def get_dark(self, ccd_id=6): def get_dark(self, ccd_id=6):
return fits.getdata(self.path_aux.format("CLD", ccd_id)) fp = glob.glob(self.path_aux.format("CLD", ccd_id))[0]
return fits.getdata(fp)
def get_flat(self, ccd_id=6): def get_flat(self, ccd_id=6):
return fits.getdata(self.path_aux.format("CLF", ccd_id)) fp = glob.glob(self.path_aux.format("CLF", ccd_id))[0]
return fits.getdata(fp)
if __name__ == "__main__": if __name__ == "__main__":
......
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