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
4fb80b27
Commit
4fb80b27
authored
Nov 06, 2022
by
BO ZHANG
🏀
Browse files
deleted CsstMbiDataManager
parent
fba83d1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
4fb80b27
...
...
@@ -10,6 +10,7 @@ Modified-History:
2022-09-29, Bo Zhang, favor CsstMsDataManager instead of CsstMbiDataManager
2022-10-26, Bo Zhang, reconstruct CsstMsDataManager, deprecate CsstMbiDataManager
2022-10-28, Bo Zhang, added CsstMsDataManager.query_rc(), dm.dfs_mode, dm.node
2022-11-06, Bo Zhang, deleted CsstMbiDataManager
"""
import
glob
import
os
...
...
@@ -278,7 +279,7 @@ class CsstMsDataManager:
)
@
staticmethod
def
glob_image
(
dir_l0
,
ver_sim
=
"C5"
):
def
glob_image
(
dir_l0
,
ver_sim
=
"C5
.2
"
):
""" glob files in L0 data directory """
if
ver_sim
==
"C3"
:
pattern
=
os
.
path
.
join
(
dir_l0
,
"MSC_MS_*_raw.fits"
)
...
...
@@ -489,7 +490,8 @@ class CsstMsDataManager:
print
(
"Error occurred during the query!"
)
return
None
def
test_dfs
(
self
):
@
property
def
dfs_available
(
self
):
""" Test if DFS works. """
try
:
tbl
=
gaia_query_from_dfs
(
radius
=
0.001
)
...
...
@@ -524,49 +526,3 @@ class CsstMsDataManager:
l1api
=
get_l1api
()
l1api
.
write
()
return
class
CsstMbiDataManager
:
def
__init__
(
self
,
ver_sim
=
"C5.2"
,
dir_l0
=
""
,
dir_l1
=
""
,
dir_pcref
=
""
,
path_aux
=
""
,
force_all_detectors
=
False
):
""" initialize the multi-band imaging data manager
Parameters
----------
ver_sim: str
version of simulation data, see csst_common.params.CP
dir_l0: str
L0 directory
dir_l1: str
L1 directory
dir_pcref: str
position calibration data directory
path_aux: str
aux data directory (bias, flat, dark)
force_all_detectors: bool
if True, assert data for all detectors are available
Examples
--------
>>> dm_mbi = CsstMbiDataManager(...)
>>> # access L0 directory
>>> dm_mbi.dir_l0
>>> # access L1 directory
>>> dm_mbi.dir_l1
>>> # access dir_pcref
>>> dm_mbi.dir_pcref
>>> # access path_aux
>>> dm_mbi.path_aux
>>> # access ver_sim
>>> dm_mbi.ver_sim
>>> # access target detectors
>>> dm_mbi.target_detectors
>>> # access available detectors
>>> dm_mbi.available_detectors
>>> # define an L1 file (detector-specified)
>>> dm_mbi.l1_detector(detector=6)
>>> # define an L1 file (non-detector-specified)
>>> dm_mbi.l1_file("flipped_image.fits")
"""
raise
DeprecationWarning
(
"CsstMbiDataManager will no longer be available in some days, please use CsstMsDataManager instead."
)
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