Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
d07f6fa2
Commit
d07f6fa2
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
make compatible with custom reference files
parent
52be14c7
dev
main
wangxia-main-patch-87026
zhaobowei-main-patch-61353
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_common/data_manager.py
+24
-10
csst_common/data_manager.py
with
24 additions
and
10 deletions
+24
-10
csst_common/data_manager.py
+
24
-
10
View file @
d07f6fa2
...
...
@@ -227,6 +227,10 @@ class CsstMsDataManager:
if
verbose
:
self
.
logger_mod
.
info
(
"logger_mod initialized"
)
self
.
custom_bias
=
None
self
.
custom_dark
=
None
self
.
custom_flat
=
None
# DFS APIs
@
property
def
dfs_L0DataApi
(
self
):
...
...
@@ -406,30 +410,40 @@ class CsstMsDataManager:
def
get_bias
(
self
,
detector
=
6
):
""" get bias data """
if
self
.
custom_bias
is
None
:
if
self
.
datatype
==
"mbi"
:
return
glob
.
glob
(
self
.
path_aux
.
format
(
"CLB"
,
detector
))[
0
]
else
:
return
self
.
path_aux
.
format
(
detector
,
"bias"
)
else
:
return
self
.
custom_bias
(
detector
)
def
get_dark
(
self
,
detector
=
6
):
""" get dark data """
if
self
.
custom_dark
is
None
:
if
self
.
datatype
==
"mbi"
:
return
glob
.
glob
(
self
.
path_aux
.
format
(
"CLD"
,
detector
))[
0
]
else
:
return
self
.
path_aux
.
format
(
detector
,
"dark"
)
else
:
return
self
.
custom_dark
(
detector
)
def
get_flat
(
self
,
detector
=
6
):
""" get flat data """
if
self
.
custom_flat
is
None
:
if
self
.
datatype
==
"mbi"
:
return
glob
.
glob
(
self
.
path_aux
.
format
(
"CLF"
,
detector
))[
0
]
else
:
return
self
.
path_aux
.
format
(
detector
,
"flat"
)
else
:
return
self
.
custom_flat
(
detector
)
def
get_axeconf
(
self
):
if
os
.
uname
()[
1
]
==
"dandelion"
:
return
"/home/csstpipeline/L1Pipeline/aux/axeconf"
else
:
return
""
# in docker
return
"/L1Pipeline/aux/axeconf"
def
l1_file
(
self
,
name
=
""
,
comment
=
""
):
""" L1 file path
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets