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
8acd6a96
Commit
8acd6a96
authored
Oct 18, 2022
by
BO ZHANG
🏀
Browse files
updated path_aux for sls
parent
2d17d094
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
8acd6a96
...
...
@@ -271,20 +271,29 @@ class CsstMsDataManager:
print
(
"final target detector IDs are "
,
self
.
target_detectors
)
return
def
get_bias
(
self
,
detector
=
6
)
->
np
.
ndarray
:
def
get_bias
(
self
,
detector
=
6
):
""" get bias data """
if
self
.
datatype
==
"mbi"
:
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLB"
,
detector
))[
0
]
return
fits
.
getdata
(
fp
)
else
:
return
self
.
path_aux
.
format
(
detector
,
"bias"
)
def
get_dark
(
self
,
detector
=
6
)
->
np
.
ndarray
:
def
get_dark
(
self
,
detector
=
6
):
""" get dark data """
if
self
.
datatype
==
"mbi"
:
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLD"
,
detector
))[
0
]
return
fits
.
getdata
(
fp
)
else
:
return
self
.
path_aux
.
format
(
detector
,
"dark"
)
def
get_flat
(
self
,
detector
=
6
)
->
np
.
ndarray
:
def
get_flat
(
self
,
detector
=
6
):
""" get flat data """
if
self
.
datatype
==
"mbi"
:
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLF"
,
detector
))[
0
]
return
fits
.
getdata
(
fp
)
else
:
return
self
.
path_aux
.
format
(
detector
,
"flat"
)
def
l1_file
(
self
,
name
=
""
,
comment
=
""
):
""" L1 file path
...
...
@@ -341,7 +350,7 @@ class CsstMsDataManager:
elif
hostname
==
"dandelion"
and
datatype
==
"sls"
:
dir_l0
=
"/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/"
\
"NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/"
.
format
(
exposure_id
)
path_aux
=
""
path_aux
=
"
/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/csst_{:02d}{}.fits
"
dir_pcref
=
""
# PMO
...
...
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