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
25dafa5a
Commit
25dafa5a
authored
Apr 21, 2022
by
Zhang Xin
Browse files
modify PSF interp for DiretImgSLS
parent
3e9d0f8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ObservationSim/PSF/PSFInterp.py
View file @
25dafa5a
...
...
@@ -305,7 +305,19 @@ class PSFInterp(PSFModel):
if
bandpass
.
blue_limit
<
bandwave
and
bandwave
<
bandpass
.
red_limit
:
return
twave
return
-
1
def
_findWave_sencondary
(
self
,
bandpass
):
w_dist
=
np
.
zeros
(
self
.
nwave
)
for
twave
in
range
(
self
.
nwave
):
bandwave
=
self
.
PSF_data
[
twave
][
0
][
'wavelength'
]
d1
=
bandwave
-
bandpass
.
blue_limit
d2
=
bandwave
-
bandpass
.
red_limit
if
d1
*
d2
<=
0
:
w_dist
[
twave
]
=
0
else
:
w_dist
[
twave
]
=
np
.
min
([
abs
(
d1
),
abs
(
d2
)])
minTwawe
=
np
.
where
(
w_dist
==
np
.
min
(
w_dist
))
return
minTwawe
[
0
][
0
]
def
get_PSF
(
self
,
chip
,
pos_img
,
bandpass
,
galsimGSObject
=
True
,
findNeighMode
=
'treeFind'
,
folding_threshold
=
5.e-3
,
pointing_pa
=
0.0
):
"""
...
...
@@ -325,8 +337,7 @@ class PSFInterp(PSFModel):
assert
self
.
iccd
==
int
(
chip
.
getChipLabel
(
chipID
=
chip
.
chipID
)),
'ERROR: self.iccd != chip.chipID'
twave
=
self
.
_findWave
(
bandpass
)
if
twave
==
-
1
:
print
(
"!!!PSF bandpass does not match."
)
exit
()
twave
=
self
.
_findWave_sencondary
(
bandpass
)
PSFMat
=
self
.
psfMat
[
twave
]
cen_col
=
self
.
cen_col
[
twave
]
cen_row
=
self
.
cen_row
[
twave
]
...
...
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