Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
irp
Fresnel
Commits
093e5ec0
Commit
093e5ec0
authored
Feb 22, 2021
by
Leon Merten Lohse
Browse files
use scipy.fft instead of pyfftw
parent
51b0a44d
Pipeline
#175252
passed with stages
in 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fresnel/vacuum.py
View file @
093e5ec0
import
numpy
as
np
from
pyfftw.interfaces.num
py
_
fft
import
fftn
,
ifftn
from
sci
py
.
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment