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_msc_sim
Commits
af3e3304
Commit
af3e3304
authored
Apr 17, 2024
by
Zhang Xin
Browse files
modify data-obs and darktime by shaoli's new chart
parent
a8a8036c
Changes
2
Show whitespace changes
Inline
Side-by-side
ObservationSim/sim_steps/add_LED_flat.py
View file @
af3e3304
...
@@ -39,13 +39,13 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param):
...
@@ -39,13 +39,13 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param):
t_obs
=
Time
(
datetime_obs
)
t_obs
=
Time
(
datetime_obs
)
##ccd刷新2s,等待0.5s,开灯后等待0.5s,开始曝光
##ccd刷新2s,等待0.5s,开灯后等待0.5s,开始曝光
t_obs_renew
=
Time
(
t_obs
.
mjd
-
(
2.
+
0.5
+
0.5
)
/
86400.
,
format
=
"mjd"
)
t_obs_renew
=
Time
(
t_obs
.
mjd
-
(
2.
)
/
86400.
,
format
=
"mjd"
)
t_obs_utc
=
datetime
.
utcfromtimestamp
(
np
.
round
(
datetime
.
utcfromtimestamp
(
t_obs_renew
.
unix
).
replace
(
tzinfo
=
timezone
.
utc
).
timestamp
(),
1
))
t_obs_utc
=
datetime
.
utcfromtimestamp
(
np
.
round
(
datetime
.
utcfromtimestamp
(
t_obs_renew
.
unix
).
replace
(
tzinfo
=
timezone
.
utc
).
timestamp
(),
1
))
self
.
updateHeaderInfo
(
header_flag
=
'prim'
,
keys
=
[
'DATE-OBS'
],
values
=
[
t_obs_utc
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)[:
-
5
]])
self
.
updateHeaderInfo
(
header_flag
=
'prim'
,
keys
=
[
'DATE-OBS'
],
values
=
[
t_obs_utc
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)[:
-
5
]])
#dark time :
曝光时间+刷新后等带时间0.5s+点亮灯后0.5s+关闭快门时间1.5s+管快门后关灯前0.5+关灯后读出前等待0.5s
#dark time :
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DARKTIME'
],
values
=
[
0.5
+
0.5
+
1.5
+
0.5
+
0.5
+
pointing
.
exp_time
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DARKTIME'
],
values
=
[
pointing
.
exp_time
])
gc
.
collect
()
gc
.
collect
()
return
chip
,
filt
,
tel
,
pointing
return
chip
,
filt
,
tel
,
pointing
\ No newline at end of file
ObservationSim/sim_steps/add_objects.py
View file @
af3e3304
...
@@ -221,13 +221,13 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
...
@@ -221,13 +221,13 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
datetime_obs
=
datetime_obs
.
replace
(
tzinfo
=
timezone
.
utc
)
datetime_obs
=
datetime_obs
.
replace
(
tzinfo
=
timezone
.
utc
)
t_obs
=
Time
(
datetime_obs
)
t_obs
=
Time
(
datetime_obs
)
##ccd刷新2s,等待0.
5
s,开始曝光
##ccd刷新2s,等待0.s,开始曝光
t_obs_renew
=
Time
(
t_obs
.
mjd
-
(
2.
+
0.
5
)
/
86400.
,
format
=
"mjd"
)
t_obs_renew
=
Time
(
t_obs
.
mjd
-
(
2.
+
0.
)
/
86400.
,
format
=
"mjd"
)
t_obs_utc
=
datetime
.
utcfromtimestamp
(
np
.
round
(
datetime
.
utcfromtimestamp
(
t_obs_renew
.
unix
).
replace
(
tzinfo
=
timezone
.
utc
).
timestamp
(),
1
))
t_obs_utc
=
datetime
.
utcfromtimestamp
(
np
.
round
(
datetime
.
utcfromtimestamp
(
t_obs_renew
.
unix
).
replace
(
tzinfo
=
timezone
.
utc
).
timestamp
(),
1
))
self
.
updateHeaderInfo
(
header_flag
=
'prim'
,
keys
=
[
'DATE-OBS'
],
values
=
[
t_obs_utc
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)[:
-
5
]])
self
.
updateHeaderInfo
(
header_flag
=
'prim'
,
keys
=
[
'DATE-OBS'
],
values
=
[
t_obs_utc
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)[:
-
5
]])
#dark time : 曝光时间+刷新后等带时间0.
5
s+关
闭快门时间1.5s+管
快门后读出前等待0.
5
s
#dark time : 曝光时间+刷新后等带时间0.s+关快门后读出前等待0.s
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DARKTIME'
],
values
=
[
0.
5
+
1.5
+
0.
5
+
pointing
.
exp_time
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DARKTIME'
],
values
=
[
0.
+
0.
+
pointing
.
exp_time
])
return
chip
,
filt
,
tel
,
pointing
return
chip
,
filt
,
tel
,
pointing
\ No newline at end of file
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