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
Liu Dezi
csst_msc_sim
Commits
053e6079
Commit
053e6079
authored
1 year ago
by
Zhang Xin
Browse files
Options
Download
Email Patches
Plain Diff
merge accuracy skybackground model and set sky background back model
parent
7ef97412
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ObservationSim/SimSteps.py
+20
-1
ObservationSim/SimSteps.py
config/obs_config_Calibration.yaml
+8
-1
config/obs_config_Calibration.yaml
config/obs_config_SCI_WIDE_phot.yaml
+5
-0
config/obs_config_SCI_WIDE_phot.yaml
with
33 additions
and
2 deletions
+33
-2
ObservationSim/SimSteps.py
+
20
-
1
View file @
053e6079
...
...
@@ -109,6 +109,25 @@ class SimSteps:
return
chip
,
filt
,
tel
,
pointing
def
add_sky_background
(
self
,
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
):
if
not
hasattr
(
self
,
'h_ext'
):
_
,
_
=
self
.
prepare_headers
(
chip
=
chip
,
pointing
=
pointing
)
chip_wcs
=
galsim
.
FitsWCS
(
header
=
self
.
h_ext
)
if
"flat_level"
not
in
obs_param
or
"flat_level_filt"
not
in
obs_param
:
chip
,
filt
,
tel
,
pointing
=
self
.
add_sky_background_sci
(
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
)
else
:
if
obs_param
.
get
(
'flat_level'
)
is
None
or
obs_param
.
get
(
'flat_level_filt'
)
is
None
:
chip
,
filt
,
tel
,
pointing
=
self
.
add_sky_background_sci
(
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
)
else
:
chip
,
filt
,
tel
,
pointing
=
self
.
add_sky_flat_calibration
(
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
)
chip
,
filt
,
tel
,
pointing
=
self
.
add_sky_background_sci
(
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
)
return
chip
,
filt
,
tel
,
pointing
def
add_sky_background_sci
(
self
,
chip
,
filt
,
tel
,
pointing
,
catalog
,
obs_param
):
flat_normal
=
np
.
ones_like
(
chip
.
img
.
array
)
if
obs_param
[
"flat_fielding"
]
==
True
:
flat_normal
=
flat_normal
*
chip
.
flat_img
.
array
/
np
.
mean
(
chip
.
flat_img
.
array
)
...
...
@@ -524,5 +543,5 @@ SIM_STEP_TYPES = {
"gain"
:
"apply_gain"
,
"quantization_and_output"
:
"quantization_and_output"
,
"led_calib_model"
:
"add_LED_Flat"
,
"sky_flatField"
:
"add_sky_flat_calibration"
,
#
"sky_flatField":"add_sky_flat_calibration",
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config/obs_config_Calibration.yaml
+
8
-
1
View file @
053e6079
...
...
@@ -24,12 +24,19 @@ call_sequence:
LED_TYPE
:
[
'
LED5'
]
LED_TIME
:
[
1.
]
sky_flatField
:
# flat_level: set the total skybackground value (e-) in the exptime,if none,set null, or delete the key
# flat_level_filt: the vale of "flat_level" is in the filter "flat_level_filt", can set NUV, u, g, r, i, z, y, if
# none,set null,or delete the key
sky_background
:
exptime
:
150.
# [s]
shutter_effect
:
YES
flat_fielding
:
YES
enable_straylight_model
:
YES
flat_level
:
20000
flat_level_filt
:
g
# Apply PRNU to accumulated photons
PRNU_effect
:
{}
# Accumulate photons caused by cosmic rays
...
...
This diff is collapsed.
Click to expand it.
config/obs_config_SCI_WIDE_phot.yaml
+
5
-
0
View file @
053e6079
...
...
@@ -23,11 +23,16 @@ call_sequence:
flat_fielding
:
YES
field_dist
:
YES
# Accumulate fluxes from sky background
# flat_level: set the total skybackground value (e-) in the exptime,if none,set null, or delete the key
# flat_level_filt: the vale of "flat_level" is in the filter "flat_level_filt", can set NUV, u, g, r, i, z, y, if
# none,set null,or delete the key
sky_background
:
exptime
:
150.
# [s]
shutter_effect
:
YES
flat_fielding
:
YES
enable_straylight_model
:
YES
flat_level
:
null
flat_level_filt
:
null
# Apply PRNU to accumulated photons
PRNU_effect
:
{}
# Accumulate photons caused by cosmic rays
...
...
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