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
a9519212
Commit
a9519212
authored
May 24, 2023
by
BO ZHANG
🏀
Browse files
add CsstMsFile
parent
75c17930
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_common/data_manager.py
View file @
a9519212
...
...
@@ -1017,6 +1017,7 @@ class CsstMsFile(dict):
self
.
filename
=
os
.
path
.
basename
(
filepath
)
self
.
dir_l0
=
os
.
path
.
dirname
(
filepath
)
print
(
"parsing"
,
filepath
)
# parse filename
pattern
=
re
.
compile
(
r
"(?P<telescope>[A-Z]+)_"
...
...
@@ -1029,7 +1030,7 @@ class CsstMsFile(dict):
r
"(?P<detector>[0-9]{2})_"
r
"L(?P<level>[0-9]{1})_"
r
"V(?P<version>[0-9]{2})"
r
"
.
(?P<ext>[a-z
]{4}
)"
r
"(?P<ext>[a-z
A-Z._]+
)"
)
mo
=
re
.
fullmatch
(
pattern
,
self
.
filename
)
assert
mo
is
not
None
...
...
@@ -1082,3 +1083,5 @@ class CsstMsFile(dict):
# "L1/MSC/SCI/62173/10160000108/CSST_MSC_MS_SCI_20290206174352_20290206174622_10160000108_21_L1_V01.fits")
#
# file = CsstMsFile.from_l1id(id=17796, dfs_root="/share/dfs")
# file = CsstMsFile.from_l1id(id=12853, dfs_root="/share/dfs")
# CsstMsFile("CSST_MSC_MS_SCI_20280716184136_20280716184406_10160000099_14_L1_V01_IMG.fits")
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