Commit 933d1c00 authored by rfetick's avatar rfetick
Browse files

minor modif

parent e82b852d
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment