Commit 999ec805 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

switch FFT to scipy.fft

parent 4d5cfe1a
Pipeline #65235 failed with stages
in 12 minutes and 22 seconds
......@@ -14,7 +14,6 @@ RUN apt-get update && apt-get install -y \
# more optional NIFTy dependencies
&& pip3 install git+https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git \
&& pip3 install git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git \
&& pip3 install git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft.git \
&& pip3 install jupyter \
&& rm -rf /var/lib/apt/lists/*
......
......@@ -47,7 +47,6 @@ Installation
- [Python 3](https://www.python.org/) (3.5.x or later)
- [SciPy](https://www.scipy.org/)
- [pypocketfft](https://gitlab.mpcdf.mpg.de/mtr/pypocketfft)
Optional dependencies:
- [pyHealpix](https://gitlab.mpcdf.mpg.de/ift/pyHealpix) (for harmonic
......@@ -73,7 +72,6 @@ NIFTy6 and its mandatory dependencies can be installed via:
sudo apt-get install git python3 python3-pip python3-dev
pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_6
pip3 install --user git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft
Plotting support is added via:
......
......@@ -9,7 +9,6 @@ NIFTy6 and its mandatory dependencies can be installed via::
sudo apt-get install git python3 python3-pip python3-dev
pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_6
pip3 install --user git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft
Plotting support is added via::
......
......@@ -15,7 +15,7 @@
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import pypocketfft
import scipy.fft
_nthreads = 1
......@@ -30,13 +30,13 @@ def set_nthreads(nthr):
def fftn(a, axes=None):
return pypocketfft.c2c(a, axes=axes, nthreads=_nthreads)
return scipy.fft.fftn(a, axes=axes, workers=_nthreads)
def ifftn(a, axes=None):
return pypocketfft.c2c(a, axes=axes, inorm=2, forward=False,
nthreads=_nthreads)
return scipy.fft.ifftn(a, axes=axes, workers=_nthreads)
def hartley(a, axes=None):
return pypocketfft.genuine_hartley(a, axes=axes, nthreads=_nthreads)
tmp = scipy.fft.fftn(a, axes=axes, workers=_nthreads)
return tmp.real+tmp.imag
......@@ -40,7 +40,7 @@ setup(name="nifty6",
zip_safe=True,
license="GPLv3",
setup_requires=['scipy'],
install_requires=['scipy'],
install_requires=['scipy>=1.4'],
python_requires='>=3.5',
classifiers=[
"Development Status :: 4 - Beta",
......
......@@ -63,7 +63,7 @@ def test_fft1D(d, dtype, op):
@pmp('dim2', [9, 12])
@pmp('d1', [0.1, 1, 3.7])
@pmp('d2', [0.4, 1, 2.7])
@pmp('nthreads', [0, 1, 2, 3, 4])
@pmp('nthreads', [-1, 1, 2, 3, 4])
def test_fft2D(dim1, dim2, d1, d2, dtype, op, nthreads):
ift.fft.set_nthreads(nthreads)
assert_(ift.fft.nthreads() == nthreads)
......
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