You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyNFFT - Pythonic bindings around the NFFT library (M1 Mac)
"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."
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 (https://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.
Installation only for M1 Mac (MacOS > v12.0)
Step-by-step installation instructions
Install fftw
You need gcc compiler for installing fftw with --enable-openmp. The gcc in M1 Mac (MacOS > v12.0) actually points to clang
Install gcc-12 with brew:
brew install gcc@12
Download FFTW 3.3.10 from fftw.org and extract the folder
cd into the fftw 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 if fftw3 is installed.
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 your PATH
Clone the NFFT git repository:
git clone https://github.com/NFFT/nfft.git
cd into the NFFT 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 if nfft is installed.