"The NFFT is a C subroutine library for computing the nonequispaced discrete Fourier transform (NDFT) in one or more dimensions, of arbitrary input size, and of complex data."
The NFFT library is licensed under GPLv2.
This wrapper provides a somewhat Pythonic access to some of the core NFFT library functionalities and is largely inspired from the pyFFTW project developped by Henry Gomersall (http://hgomersall.github.io/pyFFTW/).
The documentation is hosted on pythonhosted, the source code is available on github and the Python package index page is here.
Step-by-step installation instructions
- Install
fftw You need
gcccompiler for installingfftwwith--enable-openmp. Thegccin M1 Mac (MacOS > v12.0) actually points toclangInstall
gcc-12with brew:brew install gcc@12
Download FFTW 3.3.10 from fftw.org and extract the folder
cdinto thefftwfolder and using this configuration:./configure CC="gcc-12" --enable-shared --enable-threads --enable-openmp sudo make sudo make check sudo make install
Check
/usr/local/lib/and/usr/local/include/to see iffftw3is installed.
- Install
- Install
NFFT You need
autoconf automake libtoolfor this step. Install it with:brew install autoconf automake libtool
Make sure you edit your
.zshrctp add it yourPATHClone the NFFT git repository:
git clone https://github.com/NFFT/nfft.git
cdinto theNFFTfolder and using this configuration:./bootstrap.sh ./configure CC="gcc-12" --enable-all --enable-openmp --enable-shared --with-fftw3-libdir=/usr/local/lib/ --with-fftw3-includedir=/usr/local/include/ sudo make sudo make check sudo make install
Check
/usr/local/lib/and/usr/local/include/to see ifnfftis installed.
- Install
- Install
pyNFFT Clone this repository:
git clone https://github.com/rohandahale/pyNFFT.git
Install
cythonwithpiporcondato run thissetup.py:pip install Cython
or:
conda install -c anaconda cython
cdinto pyNFFT folder and buildpynfftfromsetupy.pyusing:python setup.py build_ext -I /usr/local/include/ -L /usr/local/lib/ -R /usr/local/lib/
While being inside the folder, install
pynfftwith:python -m pip install .
or:
pip install .
Done.
- Install
See the tutorial section of the documentation.
- Python 2.7 or greater
- Numpy 1.6 or greater
- NFFT library 3.2 or greater, compiled with openMP support
- Cython 0.12 or greater
See the CONTRIBUTING file.
The pyNFFT project is licensed under the GPLv3. See the bundled COPYING file for more details.