Commit 2455e563 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fix FFT calls

parent 65592f80
...@@ -75,14 +75,13 @@ class FFTOperator(LinearOperator): ...@@ -75,14 +75,13 @@ class FFTOperator(LinearOperator):
target.check_codomain(adom) target.check_codomain(adom)
def apply(self, x, mode): def apply(self, x, mode):
from pyfftw.interfaces.numpy_fft import fftn, ifftn
self._check_input(x, mode) self._check_input(x, mode)
ncells = x.domain[self._space].size ncells = x.domain[self._space].size
if x.domain[self._space].harmonic: # harmonic -> position if x.domain[self._space].harmonic: # harmonic -> position
func = fftn func = fft.fftn
fct = 1. fct = 1.
else: else:
func = ifftn func = fft.ifftn
fct = ncells fct = ncells
axes = x.domain.axes[self._space] axes = x.domain.axes[self._space]
tdom = self._tgt(mode) tdom = self._tgt(mode)
......
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