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
9d9a5589
Commit
9d9a5589
authored
Aug 31, 2022
by
BO ZHANG
🏀
Browse files
use yaml-based csst parameters in data manager
parent
bdf31945
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
9d9a5589
...
...
@@ -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
...
...
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