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
7b6c76b5
Commit
7b6c76b5
authored
Dec 22, 2023
by
BO ZHANG
🏀
Browse files
add Pipeline.summary()
parent
de080ed4
Pipeline
#2691
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_common/pipeline.py
View file @
7b6c76b5
...
...
@@ -18,11 +18,13 @@ import traceback
import
warnings
from
typing
import
Callable
,
NamedTuple
,
Optional
,
Any
from
astropy.time
import
Time
,
TimeDelta
from
astropy.io
import
fits
from
.utils
import
retry
from
.ccds
import
CCDS
from
.dfs
import
DFS
from
.file
import
File
from
.io
import
reformat_header
from
.logger
import
get_logger
from
.status
import
CsstStatus
,
CsstResult
...
...
@@ -130,6 +132,15 @@ class Pipeline:
print
(
f
"PIPELINE_ID=
{
self
.
pipeline_id
}
"
)
print
(
f
"BUILD=
{
self
.
build
}
"
)
print
(
f
"CREATED=
{
self
.
created
}
"
)
print
(
f
"VERBOSE=
{
self
.
verbose
}
"
)
def
summary
(
self
)
->
fits
.
Header
:
"""Summarize pipeline info into a `astropy.io.fits.Header`."""
h
=
fits
.
Header
()
h
.
set
(
"PIPELINE_ID"
,
self
.
pipeline_id
,
comment
=
"pipeline ID"
)
h
.
set
(
"BUILD"
,
self
.
build
,
comment
=
"pipeline build number"
)
h
.
set
(
"CREATED"
,
self
.
pipeline_id
,
comment
=
"pipeline build time"
)
return
reformat_header
(
h
,
strip
=
False
,
comment
=
"Pipeline summary"
)
def
clean_output
(
self
):
"""Clean output directory."""
...
...
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