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
c4938e08
Commit
c4938e08
authored
Aug 31, 2022
by
BO ZHANG
🏀
Browse files
auto identify node name
parent
19dc7050
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
c4938e08
...
...
@@ -306,13 +306,11 @@ class CsstMbiDataManager:
return
dm
@
staticmethod
def
quick_dataset
(
hostname
=
"dandelion"
,
ver_sim
=
"C5.2"
,
dir_l1
=
"."
,
exposure_id
=
100
):
""" quick dataset generator
def
quick_dataset
(
ver_sim
=
"C5.2"
,
dir_l1
=
"."
,
exposure_id
=
100
):
""" quick dataset generator
for tests on dandelion or PMO
Parameters
----------
hostname:
{dandelion, ubuntu}
ver_sim:
{"C5.2"}
dir_l1:
...
...
@@ -325,6 +323,9 @@ class CsstMbiDataManager:
CsstMbiDataManager
the MBI data manager instance
"""
# auto identify node name
hostname
=
os
.
uname
()[
1
]
if
hostname
==
"dandelion"
:
# dandelion node
dir_l0
=
"/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/"
\
...
...
@@ -338,7 +339,7 @@ class CsstMbiDataManager:
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}"
)
raise
ValueError
(
"@DM: invalid hostname
{}!"
.
format
(
hostname
)
)
return
CsstMbiDataManager
(
ver_sim
=
ver_sim
,
dir_l0
=
dir_l0
,
dir_l1
=
dir_l1
,
dir_pcref
=
dir_pcref
,
path_aux
=
path_aux
)
...
...
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