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
aa18ce37
Commit
aa18ce37
authored
1 year ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
fix a bug in finding the first key
parent
684956e5
dev
main
No related merge requests found
Pipeline
#2436
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_common/io.py
+1
-1
csst_common/io.py
with
1 addition
and
1 deletion
+1
-1
csst_common/io.py
+
1
-
1
View file @
aa18ce37
...
...
@@ -97,7 +97,7 @@ def reformat_header(h: fits.Header, strip=True, comment=None):
h_copy
.
remove
(
"HISTORY"
,
ignore_missing
=
True
,
remove_all
=
True
)
# add new comment
assert
len
(
h
.
cards
)
>
0
first_key
=
list
(
h
.
keys
())[
0
]
first_key
=
list
(
h
_copy
.
keys
())[
0
]
h_copy
.
add_comment
(
"="
*
72
,
before
=
first_key
)
h_copy
.
add_comment
(
comment
,
before
=
first_key
)
h_copy
.
add_comment
(
"="
*
72
,
before
=
first_key
)
...
...
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