Commit 093e5ec0 authored by Leon Merten Lohse's avatar Leon Merten Lohse
Browse files

use scipy.fft instead of pyfftw

parent 51b0a44d
Pipeline #175252 passed with stages
in 57 seconds
import numpy as np
from pyfftw.interfaces.numpy_fft import fftn, ifftn
from scipy.fft import fftn, ifftn
from scipy.signal import fftconvolve
from . import hankel
......@@ -58,9 +58,11 @@ class FresnelTFPropagator:
self._kernel = fresnelTFKernel(shape, fresnelNumbers)
def __call__(self, u):
def __call__(self, u, workers=-1):
uprop = ifftn(self._kernel * fftn(u))
ft_u = fftn(u, workers=workers)
ft_u *= self._kernel
uprop = ifftn(ft_u, workers=workers)
return uprop
......
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