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
07fb3c3c
Commit
07fb3c3c
authored
Aug 31, 2022
by
BO ZHANG
🏀
Browse files
added quitck_dataset method
parent
0d36e3fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
07fb3c3c
...
@@ -305,6 +305,43 @@ class CsstMbiDataManager:
...
@@ -305,6 +305,43 @@ class CsstMbiDataManager:
print
(
dm
.
l1_detector
(
detector
,
post
=
"img.fits"
))
print
(
dm
.
l1_detector
(
detector
,
post
=
"img.fits"
))
return
dm
return
dm
@
staticmethod
def
quick_dataset
(
hostname
=
"dandelion"
,
ver_sim
=
"C5.2"
,
dir_l1
=
"."
,
exposure_id
=
100
):
""" quick dataset generator
Parameters
----------
hostname:
{dandelion, ubuntu}
ver_sim:
{"C5.2"}
dir_l1:
output directory
exposure_id:
21-154 for C5.2
Returns
-------
CsstMbiDataManager
the MBI data manager instance
"""
if
hostname
==
"dandelion"
:
# dandelion node
dir_l0
=
"/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/CSST_shearOFF/"
\
"MSC_{:07d}/"
.
format
(
exposure_id
)
path_aux
=
"/data/L1Pipeline/msc/ref/MSC_{}_*_{:02d}_combine.fits"
dir_pcref
=
"/data/L1Pipeline/msc/gaia_dr3/"
elif
hostname
==
"ubuntu"
:
# PMO node
dir_l0
=
"/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/NGP_AstrometryON_shearOFF/"
\
"MSC_{:07d}/"
.
format
(
exposure_id
)
path_aux
=
"/data/sim_data/MSC_0000100/ref/MSC_{}_*_{:02d}_combine.fits"
dir_pcref
=
"/home/user/L1Pipeline/msc/gaia_dr3/"
else
:
raise
ValueError
(
"@DM: invalid hostname! valid values are {dandelion, ubuntu}"
)
return
CsstMbiDataManager
(
ver_sim
=
ver_sim
,
dir_l0
=
dir_l0
,
dir_l1
=
dir_l1
,
dir_pcref
=
dir_pcref
,
path_aux
=
path_aux
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
# test C3
# test C3
...
...
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