Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LAM-GRD-public
maoppy
Commits
933d1c00
Commit
933d1c00
authored
Jun 04, 2021
by
rfetick
Browse files
minor modif
parent
e82b852d
Changes
1
Hide whitespace changes
Inline
Side-by-side
maoppy/psfmodel.py
View file @
933d1c00
...
...
@@ -793,10 +793,12 @@ class Psfao(ParametricPSFfromPSD):
moff
=
moffat
(
f2D
,
param
,
norm
=
Fao
,
removeInside
=
removeInside
)
moff
*=
maskin
# Warning: Numerical normalization! (not compatible with analytical gradient)
moff
[
nx0
,
ny0
]
=
0.0
# Set Moffat PSD = 0 at null frequency
#moff = moff / (_np.sum(moff)*pix**2) # normalize moffat numerically to get correct A=sigma² in the AO zone
# Warning: Moffat numerical normalization generates strehlOTF jump when "_k" is changed
numericalNorm
=
False
# set to true in order to activate code below
if
numericalNorm
:
moff
[
nx0
,
ny0
]
=
0.0
# Set Moffat PSD = 0 at null frequency
moff
=
moff
/
(
_np
.
sum
(
moff
)
*
pix
**
2
)
# normalize moffat numerically to get correct A=sigma² in the AO zone
if
grad
:
raise
ValueError
(
"PSFAO analytical gradient computation is not compatible with numerical Moffat normalization"
)
# Warning: Moffat numerical normalization generates strehlOTF jump when "_k" is changed
PSD
+=
maskin
*
(
C
+
A
*
moff
)
# before I wrote "moffat(f2D,param,norm=Fao)" instead of "moff", so no numerical normalization
PSD
[
nx0
,
ny0
]
=
0.0
# Set PSD = 0 at null frequency
...
...
@@ -807,7 +809,6 @@ class Psfao(ParametricPSFfromPSD):
integral_out
=
0.0229
*
6
*
_np
.
pi
/
5
*
(
r0
*
fmax
)
**
(
-
5.
/
3.
)
# analytical sum
integral
=
integral_in
+
integral_out
# TODO: finish gradient computation!
if
grad
:
g
=
_np
.
zeros
((
len
(
x0
),)
+
F2
.
shape
)
# derivative towards r0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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