Commit 262afba0 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

flip fft/ifft

parent f9d8ed85
Pipeline #73057 passed with stages
in 19 minutes and 45 seconds
......@@ -74,11 +74,11 @@ class FFTOperator(LinearOperator):
self._check_input(x, mode)
ncells = x.domain[self._space].size
if x.domain[self._space].harmonic: # harmonic -> position
func = fft.fftn
fct = 1.
else:
func = fft.ifftn
fct = ncells
else:
func = fft.fftn
fct = 1.
axes = x.domain.axes[self._space]
tdom = self._tgt(mode)
tmp = func(x.val, axes=axes)
......
......@@ -82,8 +82,7 @@ def test_cartesian():
vol = ift.full(dom, 1.).s_integrate()
res1 = fft(fld).val
# FIXME: we don't understand the conjugate() yet
np.testing.assert_allclose(res, res1.conjugate()*vol)
np.testing.assert_allclose(res, res1*vol)
@pmp('eps', [1e-2, 1e-6, 2e-13])
......
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