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

added support for datatype="all" in CsstMsDataManager

parent 299887ea
......@@ -113,4 +113,34 @@ basic:
- 28
- 29
- 30
detector2filter:
6: "y"
7: "i"
8: "g"
9: "r"
11: "z"
12: "nuv"
13: "nuv"
14: "u"
15: "y"
16: "y"
17: "u"
18: "nuv"
19: "nuv"
20: "z"
22: "r"
23: "g"
24: "i"
25: "y"
1: "GI"
2: "GV"
3: "GU"
4: "GU"
5: "GV"
10: "GI"
21: "GI"
26: "GV"
27: "GU"
28: "GU"
29: "GV"
30: "GI"
\ No newline at end of file
......@@ -56,7 +56,9 @@ class CsstMsDataManager:
assert_all_detectors : bool
If True, assert data for all detectors are available.
datatype : str
The options are {"mbi", "sls"}.
The options are {"mbi", "sls", "all"}.
The "all" option is used for QC in particular.
Note that in this case methods like ``get_bias`` are unavailable.
Examples
--------
......@@ -87,17 +89,21 @@ class CsstMsDataManager:
assert ver_sim in CP["sim"]["versions"]
self.ver_sim = ver_sim
assert datatype in ["mbi", "sls"]
assert datatype in ["mbi", "sls", "all"]
self.datatype = datatype
if datatype == "mbi":
# MBI
self.valid_detectors = CP["mbi"]["detectors"]
self.detector2filter = CP["mbi"]["detector2filter"]
else:
elif datatype == "sls":
# SLS
self.valid_detectors = CP["sls"]["detectors"]
self.detector2filter = CP["sls"]["detector2filter"]
else:
# ALL
self.valid_detectors = CP["basic"]["detectors"]
self.detector2filter = CP["basic"]["detector2filter"]
self.dir_l0 = dir_l0
self.dir_l1 = dir_l1
......
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