Skip to content
Snippets Groups Projects
Commit a687fb96 authored by FETICK Romain's avatar FETICK Romain
Browse files

Correct bug: shift undersampled PSF

parent 7aa1235b
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ beta = 1.6 # Phase PSD Moffat beta power law ...@@ -29,7 +29,7 @@ beta = 1.6 # Phase PSD Moffat beta power law
param = [r0,bck,amp,ax,beta] param = [r0,bck,amp,ax,beta]
psf = Pmodel(param) psf = Pmodel(param,dx=0,dy=0)
#%% Plot results #%% Plot results
plt.figure(1) plt.figure(1)
......
...@@ -392,10 +392,10 @@ class Psfao(ParametricPSF): ...@@ -392,10 +392,10 @@ class Psfao(ParametricPSF):
def symmetric(self,value): def symmetric(self,value):
self._symmetric = value self._symmetric = value
if not value: if not value:
bounds_down = [_EPSILON,0,_EPSILON,_EPSILON,_EPSILON,-np.inf,1+_EPSILON] bounds_down = [_EPSILON,0,0,_EPSILON,_EPSILON,-np.inf,1+_EPSILON]
bounds_up = [np.inf for i in range(7)] bounds_up = [np.inf for i in range(7)]
else: else:
bounds_down = [_EPSILON,0,_EPSILON,_EPSILON,1+_EPSILON] bounds_down = [_EPSILON,0,0,_EPSILON,1+_EPSILON]
bounds_up = [np.inf for i in range(5)] bounds_up = [np.inf for i in range(5)]
self.bounds = (bounds_down,bounds_up) self.bounds = (bounds_down,bounds_up)
...@@ -508,7 +508,7 @@ class Psfao(ParametricPSF): ...@@ -508,7 +508,7 @@ class Psfao(ParametricPSF):
else: else:
dlFTO = 1. dlFTO = 1.
X, Y = self._shift_array(self.Npix[0]*self._k,self.Npix[1]*self._k) X, Y = self._shift_array(self.Npix[0]*self._k,self.Npix[1]*self._k)
return np.exp(-Dphi/2.)*dlFTO*np.exp(X*dx + Y*dy) return np.exp(-Dphi/2.)*dlFTO*np.exp(X*dx*self._k + Y*dy*self._k)
def __call__(self,x0,dx=0,dy=0): def __call__(self,x0,dx=0,dy=0):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment