Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
c2468010
Commit
c2468010
authored
Oct 19, 2022
by
BO ZHANG
🏀
Browse files
added support for datatype="all" in CsstMsDataManager
parent
299887ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_common/data/csst_params.yml
View file @
c2468010
...
...
@@ -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
csst_common/data_manager.py
View file @
c2468010
...
...
@@ -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"
]
el
se
:
el
if
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment