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
a8b75053
Commit
a8b75053
authored
Jul 04, 2023
by
Zhang Xin
Browse files
add straylight limit for big value
parent
d008c206
Changes
1
Show whitespace changes
Inline
Side-by-side
ObservationSim/Instrument/Filter.py
View file @
a8b75053
...
...
@@ -115,10 +115,14 @@ class Filter(object):
sl
=
Straylight
(
jtime
=
jtime
,
sat_pos
=
sat_pos
,
pointing_radec
=
pointing_radec
,
sun_pos
=
sun_pos
)
if
self
.
filter_type
in
[
"GU"
,
"GV"
,
"GI"
]:
s_pix
,
spec
=
sl
.
calculateStrayLightGrating
(
grating
=
self
.
filter_type
.
upper
())
if
s_pix
>
0.8
:
s_pix
=
0.8
self
.
sky_background
=
s_pix
self
.
zodical_spec
=
spec
elif
self
.
filter_type
.
lower
()
in
[
"nuv"
,
"u"
,
"g"
,
"r"
,
"i"
,
"z"
,
"y"
]:
s_pix
=
sl
.
calculateStrayLightFilter
(
filter
=
self
.
filter_type
.
lower
())
if
s_pix
>
1
:
s_pix
=
1
self
.
sky_background
=
s_pix
self
.
zodical_spec
=
None
...
...
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