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
655afb59
Commit
655afb59
authored
Apr 20, 2024
by
Zhang Xin
Browse files
add cfitsio version 3.470; fix dark and bias shutter time
parent
48496323
Changes
5
Hide whitespace changes
Inline
Side-by-side
ObservationSim/sim_steps/add_LED_flat.py
View file @
655afb59
...
...
@@ -29,7 +29,7 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param):
pf_map
=
np
.
array
(
pf_map
,
dtype
=
'float32'
)
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
],
values
=
[
True
])
else
:
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'
SHTOPEN0'
,
'
SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
],
values
=
[
True
,
''
,
''
,
''
,
''
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'SHTOPEN1'
,
'SHTCLOS0'
],
values
=
[
True
,
self
.
h_ext
[
'SHTCLOS1'
],
self
.
h_ext
[
'SHTOPEN0'
]
])
chip
.
img
=
chip
.
img
+
pf_map
...
...
ObservationSim/sim_steps/add_objects.py
View file @
655afb59
...
...
@@ -211,7 +211,7 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
flat_normal
=
np
.
array
(
flat_normal
,
dtype
=
'float32'
)
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
],
values
=
[
True
])
else
:
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'
SHTOPEN0'
,
'
SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
],
values
=
[
True
,
''
,
''
,
''
,
''
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'SHTOPEN1'
,
'SHTCLOS0'
],
values
=
[
True
,
self
.
h_ext
[
'SHTCLOS1'
],
self
.
h_ext
[
'SHTOPEN0'
]
])
chip
.
img
*=
flat_normal
del
flat_normal
...
...
ObservationSim/sim_steps/add_sky_background.py
View file @
655afb59
...
...
@@ -22,7 +22,7 @@ def add_sky_background_sci(self, chip, filt, tel, pointing, catalog, obs_param):
flat_normal
=
np
.
array
(
flat_normal
,
dtype
=
'float32'
)
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
],
values
=
[
True
])
else
:
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'
SHTOPEN0'
,
'
SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
],
values
=
[
False
,
''
,
''
,
''
,
''
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'SHTOPEN1'
,
'SHTCLOS0'
],
values
=
[
True
,
self
.
h_ext
[
'SHTCLOS1'
],
self
.
h_ext
[
'SHTOPEN0'
]
])
if
obs_param
[
"enable_straylight_model"
]:
# Filter.sky_background, Filter.zodical_spec will be updated
...
...
@@ -84,7 +84,7 @@ def add_sky_flat_calibration(self, chip, filt, tel, pointing, catalog, obs_param
shutt_gsimg
.
write
(
"%s/ShutterEffect_%s_1.fits"
%
(
self
.
chip_output
.
subdir
,
str
(
chip
.
chipID
).
rjust
(
2
,
'0'
)))
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
],
values
=
[
True
])
else
:
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'
SHTOPEN0'
,
'
SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
],
values
=
[
True
,
''
,
''
,
''
,
''
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'SHTOPEN1'
,
'SHTCLOS0'
],
values
=
[
True
,
self
.
h_ext
[
'SHTCLOS1'
],
self
.
h_ext
[
'SHTOPEN0'
]
])
if
chip
.
survey_type
==
"photometric"
:
...
...
ObservationSim/sim_steps/readout_output.py
View file @
655afb59
...
...
@@ -45,7 +45,7 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
if
not
hasattr
(
self
,
'h_ext'
):
_
,
_
=
self
.
prepare_headers
(
chip
=
chip
,
pointing
=
pointing
)
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'
SHTOPEN0'
,
'
SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
,
'EXPTIME'
],
values
=
[
False
,
''
,
''
,
''
,
''
,
0.0
])
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'SHTSTAT'
,
'SHTOPEN1'
,
'SHTCLOS0'
,
'SHTCLOS1'
,
'EXPTIME'
],
values
=
[
False
,
self
.
h_ext
[
'SHTOPEN0'
],
self
.
h_ext
[
'SHTOPEN0'
],
self
.
h_ext
[
'SHTOPEN0'
]
,
0.0
])
# renew header info
datetime_obs
=
datetime
.
utcfromtimestamp
(
pointing
.
timestamp
)
datetime_obs
=
datetime_obs
.
replace
(
tzinfo
=
timezone
.
utc
)
...
...
install.sh
View file @
655afb59
...
...
@@ -5,4 +5,5 @@ conda install numpy==1.26.4
conda
install
cython
==
3.0.6
conda
install
sep
==
1.2.1
conda
install
mpi4py
==
3.1.6
conda
install
cfitsio
==
3.470
pip
install
-e
.
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