Commit 9d9a5589 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

use yaml-based csst parameters in data manager

parent bdf31945
......@@ -4,7 +4,7 @@ import re
from astropy.io import fits
from .params import cp
from .params import CSST_PARAMS as CP
class CsstMbiDataManager:
......@@ -69,7 +69,7 @@ class CsstMbiDataManager:
>>> # define an L1 file (non-detector-specified)
>>> dm.l1_file("flipped_image.fits")
"""
assert ver_sim in cp.sim.VERSIONS
assert ver_sim in CP["sim"]["versions"]
self.dir_l0 = dir_l0
self.dir_l1 = dir_l1
......@@ -84,7 +84,7 @@ class CsstMbiDataManager:
fps_cat = self.glob_cat(dir_l0, ver_sim=ver_sim)
if force_all_detectors:
assert len(fps_img) == len(cp.mbi.DETECTORS)
assert len(fps_img) == len(CP["mbi"]["detectors"])
else:
assert len(fps_img) > 0
......
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