Return full convolution and rely on internal padding
This commit is contained in:
parent
54661ee478
commit
3f57539cb2
@ -119,7 +119,7 @@ class Airy(IPSF):
|
||||
# Normalize the kernel
|
||||
kernel = kernel / np.sum(kernel)
|
||||
# Convolve the PSF with gaussian kernel
|
||||
psf = fftconvolve(np.pad(psf, int(n_points), mode="constant", constant_values=0), kernel, mode="same")
|
||||
psf = fftconvolve(psf, kernel, mode="full")
|
||||
# Reduce the PSF to the positive x-domain
|
||||
psf = psf[int((psf.shape[0] - 1) / 2):]
|
||||
# Scale the integral of the disturbed PSF equal to the undisturbed PSF
|
||||
|
@ -176,8 +176,7 @@ class Zemax(IPSF):
|
||||
# Normalize kernel
|
||||
kernel = kernel / np.sum(kernel)
|
||||
# Convolve PSF with gaussian kernel
|
||||
psf = fftconvolve(np.pad(psf, int((jitter_grid_length - 1) / 2), mode="constant", constant_values=0),
|
||||
kernel, mode="same")
|
||||
psf = fftconvolve(psf, kernel, mode="full")
|
||||
# Calculate new center point
|
||||
center_point = [x + int((jitter_grid_length - 1) / 2) for x in center_point]
|
||||
# Save the values as object attribute
|
||||
|
Loading…
Reference in New Issue
Block a user