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
e156971a
Commit
e156971a
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
added logger into dm
parent
f0c79538
dev
main
wangxia-main-patch-87026
zhaobowei-main-patch-61353
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_common/data_manager.py
+14
-3
csst_common/data_manager.py
with
14 additions
and
3 deletions
+14
-3
csst_common/data_manager.py
+
14
-
3
View file @
e156971a
...
...
@@ -20,7 +20,8 @@ from typing import Union
from
astropy.io
import
fits
from
astropy.table
import
Table
from
.dfs
import
gaia_query_from_dfs
,
get_l1api
from
.dfs
import
gaia_query_from_dfs
from
.logger
import
get_logger
from
.params
import
CSST_PARAMS
as
CP
from
.params
import
DFS_CONF
...
...
@@ -89,6 +90,10 @@ class CsstMsDataManager:
The image type signature for science images. Defualts to ``SCI`` for C5.2 simulation.
_l0_post : str
The postfix. Defaults to ``L0_1`` for C5.2 simulation.
log_ppl : str
The pipeline log file name.
log_mod : str
The module log file name.
Examples
--------
...
...
@@ -129,6 +134,8 @@ class CsstMsDataManager:
_survey
:
str
=
"MS"
,
_imagetype
:
str
=
"SCI"
,
_l0_post
:
str
=
"L0_1"
,
log_ppl
=
"csst-l1ppl.log"
,
log_mod
=
"csst-l1mod.log"
,
):
# version
...
...
@@ -194,6 +201,10 @@ class CsstMsDataManager:
# change to working directory
os
.
chdir
(
self
.
dir_l1
)
# pipeline logger
self
.
logger_ppl
=
get_logger
(
name
=
"CSST L1 Pipeline"
,
filename
=
self
.
l1_file
(
log_ppl
))
self
.
logger_mod
=
get_logger
(
name
=
"CSST L1 Pipeline Module"
,
filename
=
self
.
l1_file
(
log_mod
))
def
set_env
(
self
):
""" set environment variables """
if
os
.
uname
()[
1
]
==
"dandelion"
:
...
...
@@ -242,8 +253,8 @@ class CsstMsDataManager:
# parse info
_telescope
,
_instrument
,
_survey
,
_imagetype
,
\
_exp_start
,
_exp_stop
,
_exp_id
,
\
_detector
,
*
_l0_post
,
_ext
=
re
.
split
(
r
"[_.]"
,
fps_img
[
0
])
_exp_start
,
_exp_stop
,
_exp_id
,
\
_detector
,
*
_l0_post
,
_ext
=
re
.
split
(
r
"[_.]"
,
fps_img
[
0
])
_exp_start
=
int
(
_exp_start
)
_exp_stop
=
int
(
_exp_stop
)
...
...
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