Commit fe6d77e5 authored by rfetick's avatar rfetick
Browse files

compensate odd pixel shift

parent f7a8f1ad
......@@ -77,9 +77,9 @@ if __name__ == "__main__":
self.xy_step = xy_step
self.z_central = z_central
nwvl = 10
nx = 30
ny = 36
nwvl = 3
nx = 15
ny = 15
xy_step = muse_wfm.resolution_mas*1e-3 # comply with Muse resolution for this dummy cube
z_central = 0.8 # [um]
for_cube = MuseCube((nwvl,nx,ny), xy_step, z_central)
......
......@@ -606,6 +606,9 @@ class ParametricPSFfromPSD(ParametricPSF):
# Compensate oversampling shift
dx += (self._k-1)/(2*self._k)
dy += (self._k-1)/(2*self._k)
# Compensate odd pixel shift
dx -= (self.npix[1]%2)/2
dy -= (self.npix[0]%2)/2
return _np.exp(-2j*_np.pi*self._k*(dx*X/nx + dy*Y/ny))
def __call__(self,x0,dx=0,dy=0,grad=False):
......
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