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
3eb32fd0
Commit
3eb32fd0
authored
Oct 28, 2022
by
BO ZHANG
🏀
Browse files
changed DFS node local to kmust
parent
a4b0b19c
Changes
2
Show whitespace changes
Inline
Side-by-side
csst_common/data/dfs_conf.yml
View file @
3eb32fd0
...
@@ -5,7 +5,7 @@ pml:
...
@@ -5,7 +5,7 @@ pml:
CSST_DFS_APP_ID
:
test
CSST_DFS_APP_ID
:
test
CSST_DFS_APP_TOKEN
:
test
CSST_DFS_APP_TOKEN
:
test
local
:
kmust
:
CSST_DFS_API_MODE
:
cluster
CSST_DFS_API_MODE
:
cluster
CSST_DFS_GATEWAY
:
222.197.214.168:30880
CSST_DFS_GATEWAY
:
222.197.214.168:30880
CSST_DFS_APP_ID
:
1
CSST_DFS_APP_ID
:
1
...
...
csst_common/data_manager.py
View file @
3eb32fd0
...
@@ -69,7 +69,7 @@ class CsstMsDataManager:
...
@@ -69,7 +69,7 @@ class CsstMsDataManager:
The aux data directory (bias, flat, dark).
The aux data directory (bias, flat, dark).
dfs_mode : bool
dfs_mode : bool
DFS mode. If True, ``CsstMsDataManager`` will use DFS.
DFS mode. If True, ``CsstMsDataManager`` will use DFS.
node : str
dfs_
node : str
The environment in which the pipeline will run.
The environment in which the pipeline will run.
Use "pml" for Purple Mountain Lab cluster and "local" for others.
Use "pml" for Purple Mountain Lab cluster and "local" for others.
_exp_id : int
_exp_id : int
...
@@ -119,7 +119,7 @@ class CsstMsDataManager:
...
@@ -119,7 +119,7 @@ class CsstMsDataManager:
dir_l1
:
str
=
"."
,
dir_l1
:
str
=
"."
,
path_aux
:
str
=
""
,
# bias dark flat
path_aux
:
str
=
""
,
# bias dark flat
dfs_mode
:
bool
=
False
,
dfs_mode
:
bool
=
False
,
node
:
str
=
"
local
"
,
dfs_
node
:
str
=
"
kmust
"
,
_exp_id
:
int
=
100000100
,
_exp_id
:
int
=
100000100
,
_exp_start
:
int
=
20270810081950
,
_exp_start
:
int
=
20270810081950
,
_exp_stop
:
int
=
20270810082220
,
_exp_stop
:
int
=
20270810082220
,
...
@@ -171,10 +171,10 @@ class CsstMsDataManager:
...
@@ -171,10 +171,10 @@ class CsstMsDataManager:
# for catalog query
# for catalog query
self
.
dfs_mode
=
dfs_mode
self
.
dfs_mode
=
dfs_mode
# for DFS configuration, defaults to "local", could be "pml"
# for DFS configuration, defaults to "local", could be "pml"
assert
node
in
DFS_CONF
.
keys
()
assert
dfs_
node
in
DFS_CONF
.
keys
()
self
.
node
=
node
self
.
node
=
dfs_
node
for
k
,
v
in
DFS_CONF
[
node
].
items
():
for
k
,
v
in
DFS_CONF
[
dfs_
node
].
items
():
os
.
putenv
(
k
,
v
)
os
.
putenv
(
k
,
f
"
{
v
}
"
)
# data directory
# data directory
self
.
dir_l0
=
dir_l0
self
.
dir_l0
=
dir_l0
...
@@ -189,7 +189,7 @@ class CsstMsDataManager:
...
@@ -189,7 +189,7 @@ class CsstMsDataManager:
raise
NotImplementedError
(
"from_dfs is currently not available!"
)
raise
NotImplementedError
(
"from_dfs is currently not available!"
)
@
staticmethod
@
staticmethod
def
from_dir
(
ver_sim
=
"C5.2"
,
datatype
=
"mbi"
,
dir_l0
=
"."
,
dir_l1
=
"."
,
path_aux
=
""
,
dfs_mode
=
False
,
node
=
"
local
"
):
def
from_dir
(
ver_sim
=
"C5.2"
,
datatype
=
"mbi"
,
dir_l0
=
"."
,
dir_l1
=
"."
,
path_aux
=
""
,
dfs_mode
=
False
,
dfs_
node
=
"
kmust
"
):
""" initialize the multi-band imaging data manager """
""" initialize the multi-band imaging data manager """
assert
ver_sim
in
[
"C5.2"
,
]
assert
ver_sim
in
[
"C5.2"
,
]
...
@@ -220,7 +220,7 @@ class CsstMsDataManager:
...
@@ -220,7 +220,7 @@ class CsstMsDataManager:
dir_l1
=
dir_l1
,
dir_l1
=
dir_l1
,
path_aux
=
path_aux
,
# bias dark flat
path_aux
=
path_aux
,
# bias dark flat
dfs_mode
=
dfs_mode
,
dfs_mode
=
dfs_mode
,
node
=
node
,
dfs_
node
=
dfs_
node
,
_exp_id
=
_exp_id
,
_exp_id
=
_exp_id
,
_exp_start
=
_exp_start
,
_exp_start
=
_exp_start
,
_exp_stop
=
_exp_stop
,
_exp_stop
=
_exp_stop
,
...
@@ -393,7 +393,7 @@ class CsstMsDataManager:
...
@@ -393,7 +393,7 @@ class CsstMsDataManager:
return
info
return
info
@
staticmethod
@
staticmethod
def
quickstart
(
ver_sim
=
"C5.2"
,
datatype
=
"mbi"
,
dir_l1
=
"."
,
exposure_id
=
100
,
dfs_mode
=
False
,
node
=
"
local
"
):
def
quickstart
(
ver_sim
=
"C5.2"
,
datatype
=
"mbi"
,
dir_l1
=
"."
,
exposure_id
=
100
,
dfs_mode
=
False
,
dfs_
node
=
"
kmust
"
):
"""Quick dataset generator for tests on dandelion or PMO
"""Quick dataset generator for tests on dandelion or PMO
Parameters
Parameters
...
@@ -408,8 +408,8 @@ class CsstMsDataManager:
...
@@ -408,8 +408,8 @@ class CsstMsDataManager:
The serial number of the exposure. 20-154 for C5.2.
The serial number of the exposure. 20-154 for C5.2.
dfs_mode : bool
dfs_mode : bool
If True, use DFS.
If True, use DFS.
node : str
dfs_
node : str
The node
in which this program runs
. Defaults to "
local
", could be "pml".
The
DFS
node. Defaults to "
kmust
", could be "pml".
Returns
Returns
-------
-------
...
@@ -446,7 +446,7 @@ class CsstMsDataManager:
...
@@ -446,7 +446,7 @@ class CsstMsDataManager:
return
CsstMsDataManager
.
from_dir
(
return
CsstMsDataManager
.
from_dir
(
ver_sim
=
ver_sim
,
datatype
=
datatype
,
dir_l0
=
dir_l0
,
dir_l1
=
dir_l1
,
path_aux
=
path_aux
,
ver_sim
=
ver_sim
,
datatype
=
datatype
,
dir_l0
=
dir_l0
,
dir_l1
=
dir_l1
,
path_aux
=
path_aux
,
dfs_mode
=
dfs_mode
,
node
=
node
)
dfs_mode
=
dfs_mode
,
dfs_
node
=
dfs_
node
)
def
query_rc
(
self
,
ra
=
180
,
dec
=
0
,
radius
=
2
,
min_mag
=
0
,
max_mag
=
20
,
obstime
=-
1
,
limit
=-
1
):
def
query_rc
(
self
,
ra
=
180
,
dec
=
0
,
radius
=
2
,
min_mag
=
0
,
max_mag
=
20
,
obstime
=-
1
,
limit
=-
1
):
""" Query Reference Catalog (RC) from DFS """
""" Query Reference Catalog (RC) from DFS """
...
...
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