"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
gcc
compiler for installingfftw
with--enable-openmp
. Thegcc
in M1 Mac (MacOS > v12.0) actually points toclang
Install
gcc-12
with brew:brew install gcc@12
Download FFTW 3.3.10 from fftw.org and extract the folder
cd
into thefftw
folder 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 iffftw3
is installed.
- Install
- Install
NFFT
You need
autoconf automake libtool
for this step. Install it with:brew install autoconf automake libtool
Make sure you edit your
.zshrc
tp add it yourPATH
Clone the NFFT git repository:
git clone https://github.com/NFFT/nfft.git
cd
into theNFFT
folder 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 ifnfft
is installed.
- Install
- Install
pyNFFT
Clone this repository:
git clone https://github.com/rohandahale/pyNFFT.git
Install
cython
withpip
orconda
to run thissetup.py
:pip install Cython==0.29.32
or:
conda install -c anaconda cython==0.29.32
cd
into pyNFFT folder and buildpynfft
fromsetupy.py
using:python setup.py build_ext -I /usr/local/include/ -L /usr/local/lib/ -R /usr/local/lib/
While being inside the folder, install
pynfft
with:python -m pip install .
or:
pip install .
Done.
- Install
See the tutorial section of the documentation.
- Python 2.7 or greater (recommended 3.8.16)
- Numpy 1.6 or greater (recommended 1.21.1)
- NFFT library 3.2 or greater, compiled with openMP support
- Cython 0.12 or greater (recommended 0.29.32)
See the CONTRIBUTING file.
The pyNFFT project is licensed under the GPLv3. See the bundled COPYING file for more details.