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
1fb76a54
Commit
1fb76a54
authored
Aug 09, 2023
by
BO ZHANG
🏀
Browse files
add CsstMsFile.to_dict()
parent
30c3a11b
Pipeline
#846
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
1fb76a54
...
...
@@ -1067,6 +1067,7 @@ class CsstMsFile(dict):
self
.
filename
=
os
.
path
.
basename
(
filepath
)
self
.
dir_in
=
os
.
path
.
dirname
(
filepath
)
self
.
dir_out
=
dir_out
self
.
kwargs
=
kwargs
# parse filename
# CSST_MSC_MS_SCIE_20270713222417_20270713222647_10160000066_01_L0_V01.fits
...
...
@@ -1137,6 +1138,14 @@ class CsstMsFile(dict):
header
=
header
)
def
to_dict
(
self
):
return
dict
(
filepath
=
self
.
filepath
,
ver_sim
=
self
.
ver_sim
,
dir_out
=
self
.
dir_out
,
kwargs
=
self
.
kwargs
)
def
__repr__
(
self
):
return
f
"CsstMsFile(filepath=
\"
{
self
.
filename
}
\"
, ver_sim=
\"
{
self
.
ver_sim
}
\"
, dir_out=
\"
{
self
.
dir_out
}
\"
)"
# file = CsstMsFile(
...
...
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