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
a983a4c0
Commit
a983a4c0
authored
Oct 26, 2022
by
BO ZHANG
🏀
Browse files
tweaks
parent
4bfc0fd9
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
a983a4c0
...
@@ -22,6 +22,10 @@ from .params import CSST_PARAMS as CP
...
@@ -22,6 +22,10 @@ from .params import CSST_PARAMS as CP
class
CsstMsDataManager
:
class
CsstMsDataManager
:
"""
"""
CSST MS data manager, including MBI and SLS.
CSST MS data manager, including MBI and SLS.
``CsstMsDataManager`` provides an interface to switch between DFS and local file system.
To initialize ``CsstMsDataManager`` from local directory, use ``CsstMsDataManager.from_dir()``
To initialize ``CsstMsDataManager`` on ``dandelion`` or ``PM node``, ``CsstMsDataManager.quickstart()``.
To initialize ``CsstMsDataManager`` from DFS, use ``CsstMsDataManager.from_dfs()``.
This class provides an interface to access L0 data and generate L1 paths.
This class provides an interface to access L0 data and generate L1 paths.
Here are some examples for simulation with different versions.
Here are some examples for simulation with different versions.
...
@@ -303,12 +307,12 @@ class CsstMsDataManager:
...
@@ -303,12 +307,12 @@ class CsstMsDataManager:
assert
set
(
detectors
).
issubset
(
set
(
self
.
available_detectors
))
assert
set
(
detectors
).
issubset
(
set
(
self
.
available_detectors
))
self
.
target_detectors
=
list
(
detectors
)
self
.
target_detectors
=
list
(
detectors
)
except
AssertionError
as
ae
:
except
AssertionError
as
ae
:
print
(
"@DM: available detector are "
,
self
.
available_detectors
)
print
(
"@DM: available detector
s
are "
,
self
.
available_detectors
)
print
(
"@DM: target detector are "
,
detectors
)
print
(
"@DM: target detector
s
are "
,
detectors
)
print
(
"@DM: final target detectors are "
,
set
(
detectors
)
&
set
(
self
.
available_detectors
))
print
(
"@DM: final target detectors are "
,
set
(
detectors
)
&
set
(
self
.
available_detectors
))
# raise ae
# raise ae
self
.
target_detectors
=
set
(
detectors
)
&
set
(
self
.
available_detectors
)
self
.
target_detectors
=
list
(
set
(
detectors
)
&
set
(
self
.
available_detectors
)
)
print
(
"final target detector IDs are "
,
self
.
target_detectors
)
print
(
"final target detector IDs are "
,
self
.
target_detectors
)
return
return
...
...
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