Skip to main content

Python non-uniform fast Fourier transform (pynufft)

Project description

# pynufft: Python non-uniform fast Fourier transform

FFT is the standard method that estimates the frequency components on equispaced grids.

NUFFT can calculate the frequency components outside grids.

### Installation:

From pypi:

$ pip install pynufft

From github:

$ git clone https://github.com/jyhmiinlin/pynufft

$ python setup.py install

### Example:

Inside the Python environment, type:

>>> import pynufft.pynufft as pnft
>>> pnft.test_installation() # test required files
>>> pnft.test_2D() # test the 2D case

### Features

pynufft is written in Python, using the standard Numpy/Scipy packages. Numpy, Scipy, Matplotlib are prerequisites.

### Summary

A “getting start” tutorial will become availabe in the near future (Early ).

Currently, please find the example in test_2D().

The forward transform (the forward() method) involves the following steps:

  1. Scaling (the x2xx() method)

  2. FFT (the xx2k() method)

  3. Convert spectrum from array to vector: (the k2vec() method)

  4. Interpolation (the vec2y() method)

The adjoint transform (the adjoint() method) involves the following steps:

  1. Adjoint interpolation (the y2vec() method)

  2. Convert kspectrum from vector to array: (the vec2k() method)

  3. IFFT (the k2xx() method)

  4. Rescaling (the x2xx() method)

If y is the data from the forward transform: >>>> y=pynufft.forward(image)

The inverse transform (the inverse_DC() method) implemented the density compensation method of J. Pipe, Magnetic Resonance in Medicine, 1999 >>>>image=pynufft.inverse_DC(y)

k-space spectrum can be obtained from the data (y): >>>>kspectrum = pynufft.y2k_DC(y)

### Limitations

In Numpy, the default fft library is fftpack, so the speed of NUFFT transform may be suboptimal. However, pynufft can run with the fast FFT inside the Anaconda Python environment (which is based on Intel’s Math Kernel library (MKL)).

### Other nufft implementations in Python:

Python-nufft: Python bindings to Fortran nufft. (https://github.com/dfm/Python-nufft/), MIT license

pynfft: Python bindings around the NFFT C-library, which uses the speed of FFTW, (https://github.com/ghisvail/pyNFFT), GPL v3

nufftpy: Pure Python NUFFT of Python-nufft (https://github.com/jakevdp/nufftpy).

### Acknowledgements

pynufft was funded by the Ministry of Science and Technology, Cambridge Overseas Trust and Ministry of Education.

If you find pynufft useful, please cite Fessler’s min-max NUFFT paper. Fessler JA, Sutton BP. Nonuniform fast Fourier transforms using min-max interpolation. IEEE Trans Signal Process 2003;51(2):560-574.

Please open an issue if you have any question related to pynufft.

### Cite pynufft

@Misc{pynufft, author = {Jyh-Miin Lin}, title = {{Pynufft}: {Python} non-uniform fast {F}ourier transform}, year = {2013–}, url = “https://github.com/jyhmiinlin/pynufft”, note = {Online; https://github.com/jyhmiinlin/pynufft; Dec 2016} }

[![DOI](https://zenodo.org/badge/49985083.svg)](https://zenodo.org/badge/latestdoi/49985083)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynufft-0.3.2.8.tar.gz (7.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynufft-0.3.2.8-py3.4.egg (7.8 MB view details)

Uploaded Egg

File details

Details for the file pynufft-0.3.2.8.tar.gz.

File metadata

  • Download URL: pynufft-0.3.2.8.tar.gz
  • Upload date:
  • Size: 7.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pynufft-0.3.2.8.tar.gz
Algorithm Hash digest
SHA256 6fc200682aa810e6946336095fb29954fe3c85def2fd7c68d308734dcca84dfc
MD5 4d285e1b344c8f5f295f3fbf1c8a58c5
BLAKE2b-256 00a3c804486770d50beb36b7700ad39d2c6ecdb172d780674438f79d969ba6ce

See more details on using hashes here.

File details

Details for the file pynufft-0.3.2.8-py3.4.egg.

File metadata

  • Download URL: pynufft-0.3.2.8-py3.4.egg
  • Upload date:
  • Size: 7.8 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pynufft-0.3.2.8-py3.4.egg
Algorithm Hash digest
SHA256 4d787278b624f9d25931ab169eb859a3c066ea5e9acb6b347a1bc793889c12fa
MD5 074c8e6872ce6f12cf449826b4dd1101
BLAKE2b-256 2d8f7e42b20fc94d664222d72d24688cd7e97a73408f91c3416aa62ed0c714fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page