Commit 05512d65 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'flip_fft' into 'NIFTy_6'

Flip fft and ifft

See merge request !451
parents 29933473 50e5d593
Pipeline #74842 passed with stages
in 20 minutes and 42 seconds
Changes since NIFTy 5:
FFT convention adjusted
=======================
When going to harmonic space, NIFTy's FFT operator now uses a minus sign in the
exponent (and, consequently, a plus sign on the adjoint transform). This
convention is consistent with almost all other numerical FFT libraries.
Interface change in EndomorphicOperator.draw_sample()
=====================================================
......
......@@ -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