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
Liu Dezi
csst_msc_sim
Commits
557baafb
Commit
557baafb
authored
May 01, 2024
by
Zhang Xin
Browse files
fix header checksum issue; update straylight mode PSF file
parent
b9ccff14
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Straylight/lib/PST
100755 → 100644
View file @
557baafb
This diff is collapsed.
Click to expand it.
ObservationSim/sim_steps/readout_output.py
View file @
557baafb
...
@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
...
@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
hdu1
=
fits
.
PrimaryHDU
(
header
=
self
.
h_prim
)
hdu1
=
fits
.
PrimaryHDU
(
header
=
self
.
h_prim
)
hdu1
.
add_checksum
()
hdu1
.
header
.
comments
[
'CHECKSUM'
]
=
'HDU checksum'
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DATASECT'
],
values
=
[
str
(
chip
.
img
.
array
.
shape
[
1
])
+
'x'
+
str
(
chip
.
img
.
array
.
shape
[
0
])])
hdu1
.
header
.
comments
[
'DATASUM'
]
=
'data unit checksum'
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DATASECT'
],
values
=
[
str
(
chip
.
img
.
array
.
shape
[
1
])
+
'x'
+
str
(
chip
.
img
.
array
.
shape
[
0
])])
hdu2
=
fits
.
ImageHDU
(
chip
.
img
.
array
,
header
=
self
.
h_ext
)
hdu2
=
fits
.
ImageHDU
(
chip
.
img
.
array
,
header
=
self
.
h_ext
)
hdu2
.
add_checksum
()
hdu2
.
header
.
comments
[
'XTENSION'
]
=
'extension type'
hdu2
.
header
.
comments
[
'CHECKSUM'
]
=
'HDU checksum'
hdu2
.
header
.
comments
[
'DATASUM'
]
=
'data unit checksum'
hdu2
.
header
.
comments
[
"XTENSION"
]
=
"image extension"
hdu2
.
header
.
comments
[
"XTENSION"
]
=
"image extension"
hdu1
=
fits
.
HDUList
([
hdu1
,
hdu2
])
hdu1
.
writeto
(
fname
,
output_verify
=
'ignore'
,
overwrite
=
True
)
hdu
=
fits
.
HDUList
([
hdu1
,
hdu2
])
hdu
[
0
].
add_datasum
(
when
=
'data unit checksum'
)
hdu
[
0
].
add_checksum
(
when
=
'HDU checksum'
,
override_datasum
=
True
)
hdu
[
1
].
add_datasum
(
when
=
'data unit checksum'
)
hdu
[
1
].
add_checksum
(
when
=
'HDU checksum'
,
override_datasum
=
True
)
hdu
.
writeto
(
fname
,
output_verify
=
'ignore'
,
overwrite
=
True
)
return
chip
,
filt
,
tel
,
pointing
return
chip
,
filt
,
tel
,
pointing
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