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-sims
csst_mci_sim
Commits
2cf58a84
Commit
2cf58a84
authored
May 06, 2024
by
Yan Zhaojun
Browse files
debug
parent
81236b8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
2cf58a84
...
@@ -3899,11 +3899,11 @@ class MCIsimulator():
...
@@ -3899,11 +3899,11 @@ class MCIsimulator():
ofd_g
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_g
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_g
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ofd_g
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ss1
=
'HDU checksum'
#
ss1='HDU checksum'
ss2
=
'data unit checksum'
#
ss2='data unit checksum'
ofd_g
.
header
[
'CHECKSUM'
]
=
(
data_time
[:
19
]
,
ss1
)
#
ofd_g.header['CHECKSUM']=( data_time[:19] , ss1)
ofd_g
.
header
[
'DATASUM'
]
=
(
data_time
[:
19
]
,
ss2
)
#
ofd_g.header['DATASUM'] =( data_time[:19] , ss2)
ofd_g
.
header
[
'CHECKSUM'
]
=
(
0
,
'0'
)
################################################
################################################
########## finish header for 0 layer ####################
########## finish header for 0 layer ####################
...
@@ -4119,7 +4119,7 @@ class MCIsimulator():
...
@@ -4119,7 +4119,7 @@ class MCIsimulator():
hdu_g
.
header
[
'RA_PNT1'
]
=
(
float
(
hdu_g
.
header
[
'RA_PNT0'
]),
'pointing RA at CABEND (deg)'
)
hdu_g
.
header
[
'RA_PNT1'
]
=
(
float
(
hdu_g
.
header
[
'RA_PNT0'
]),
'pointing RA at CABEND (deg)'
)
hdu_g
.
header
[
'DEC_PNT1'
]
=
(
float
(
hdu_g
.
header
[
'DEC_PNT0'
]),
'pointing Dec at CABEND (deg)'
)
hdu_g
.
header
[
'DEC_PNT1'
]
=
(
float
(
hdu_g
.
header
[
'DEC_PNT0'
]),
'pointing Dec at CABEND (deg)'
)
hdu_g
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
hdu_g
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
hdu_g
.
header
[
'CHECKSUM'
]
=
(
0
,
'0'
)
##############################################################
##############################################################
#####
#####
# hdu_g.header['CHECKSUM'] =('','HDU checksum updated yyyy-mm-ddTHH:MM:SS')
# hdu_g.header['CHECKSUM'] =('','HDU checksum updated yyyy-mm-ddTHH:MM:SS')
...
@@ -4281,11 +4281,11 @@ class MCIsimulator():
...
@@ -4281,11 +4281,11 @@ class MCIsimulator():
ofd_r
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_r
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_r
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ofd_r
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ss1
=
'HDU checksum'
#
ss1='HDU checksum'
ss2
=
'data unit checksum'
#
ss2='data unit checksum'
ofd_r
.
header
[
'CHECKSUM'
]
=
(
data_time
[:
19
]
,
ss1
)
#
ofd_r.header['CHECKSUM']=( data_time[:19] , ss1)
ofd_r
.
header
[
'DATASUM'
]
=
(
data_time
[:
19
]
,
ss2
)
#
ofd_r.header['DATASUM'] =( data_time[:19] , ss2)
ofd_r
.
header
[
'CHECKSUM'
]
=
(
0
,
'0'
)
################################################
################################################
########## finish header for 0 layer ####################
########## finish header for 0 layer ####################
########## finish header for 0 layer ####################
########## finish header for 0 layer ####################
...
@@ -4499,7 +4499,7 @@ class MCIsimulator():
...
@@ -4499,7 +4499,7 @@ class MCIsimulator():
hdu_r
.
header
[
'RA_PNT1'
]
=
(
float
(
hdu_r
.
header
[
'RA_PNT0'
]),
'pointing RA at CABEND (deg)'
)
hdu_r
.
header
[
'RA_PNT1'
]
=
(
float
(
hdu_r
.
header
[
'RA_PNT0'
]),
'pointing RA at CABEND (deg)'
)
hdu_r
.
header
[
'DEC_PNT1'
]
=
(
float
(
hdu_r
.
header
[
'DEC_PNT0'
]),
'pointing Dec at CABEND (deg)'
)
hdu_r
.
header
[
'DEC_PNT1'
]
=
(
float
(
hdu_r
.
header
[
'DEC_PNT0'
]),
'pointing Dec at CABEND (deg)'
)
hdu_r
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
hdu_r
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
hdu_r
.
header
[
'CHECKSUM'
]
=
(
0
,
'0'
)
##############################################################
##############################################################
#####
#####
# hdu_r.header['CHECKSUM'] =('','HDU checksum updated yyyy-mm-ddTHH:MM:SS')
# hdu_r.header['CHECKSUM'] =('','HDU checksum updated yyyy-mm-ddTHH:MM:SS')
...
@@ -4662,10 +4662,11 @@ class MCIsimulator():
...
@@ -4662,10 +4662,11 @@ class MCIsimulator():
ofd_i
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_i
.
header
[
'EPOCH'
]
=
(
np
.
float32
(
time2jd
(
t3
.
utcnow
())),
'equinox of pointing RA and Dec'
)
ofd_i
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ofd_i
.
header
[
'EXPTIME'
]
=
(
np
.
float32
(
self
.
information
[
'exptime'
]),
'exposure time (s)'
)
ss1
=
'HDU checksum'
# ss1='HDU checksum'
ss2
=
'data unit checksum'
# ss2='data unit checksum'
ofd_i
.
header
[
'CHECKSUM'
]
=
(
data_time
[:
19
]
,
ss1
)
# ofd_i.header['CHECKSUM']=( data_time[:19] , ss1)
ofd_i
.
header
[
'DATASUM'
]
=
(
data_time
[:
19
]
,
ss2
)
# ofd_i.header['DATASUM'] =( data_time[:19] , ss2)
ofd_i
.
header
[
'CHECKSUM'
]
=
(
0
,
'0'
)
################################################
################################################
########## finish header for 0 layer ####################
########## finish header for 0 layer ####################
...
@@ -4938,9 +4939,9 @@ class MCIsimulator():
...
@@ -4938,9 +4939,9 @@ class MCIsimulator():
hdu_i
.
header
.
add_comment
(
'VERIFICATION INFORMATION'
,
after
=
'EPOCH'
)
hdu_i
.
header
.
add_comment
(
'VERIFICATION INFORMATION'
,
after
=
'EPOCH'
)
hdu_i
.
header
.
add_comment
(
'========================================================================'
,
after
=
'EPOCH'
)
hdu_i
.
header
.
add_comment
(
'========================================================================'
,
after
=
'EPOCH'
)
hdu_i
.
header
.
add_comment
(
'========================================================================'
,
before
=
'CHECKSUM'
)
#
hdu_i.header.add_comment('========================================================================',before='CHECKSUM')
hdu_i
.
header
.
add_comment
(
'VERIFICATION INFORMATION'
,
before
=
'CHECKSUM'
)
#
hdu_i.header.add_comment('VERIFICATION INFORMATION',before='CHECKSUM')
hdu_i
.
header
.
add_comment
(
'========================================================================'
,
before
=
'CHECKSUM'
)
#
hdu_i.header.add_comment('========================================================================',before='CHECKSUM')
#####################################
#####################################
################ finish MCI header for image layer in i channel
################ finish MCI header for image layer in i channel
...
...
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