Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/jyhmiinlin/pynufft
16 May 2025, 09:07:29 UTC
  • Code
  • Branches (16)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/gh-pages
    • refs/heads/master
    • refs/tags/0.3.1.7
    • refs/tags/0.3.1.8
    • refs/tags/2020.0.0
    • refs/tags/2020.1.2
    • refs/tags/2020.2.1
    • refs/tags/2020.2.3
    • refs/tags/2022.2.1
    • refs/tags/2022.2.2
    • refs/tags/2022.2.3
    • refs/tags/2022.2.3rc1
    • refs/tags/2024.1.2
    • refs/tags/v0.3.1.8
    • refs/tags/v2020.0.0
    • refs/tags/v2020.1.2
    No releases to show
  • d699f46
  • /
  • README.md
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:38fdc82a1870f780e30e95166e7647bb311b1e86
origin badgedirectory badge Iframe embedding
swh:1:dir:d699f46b03469520a1ecd91b60d80100c1e3c6a0
origin badgerevision badge
swh:1:rev:4f6d6637a032111295abc3b878c9b670f234395a
origin badgesnapshot badge
swh:1:snp:d5748894d6b108b912fc14cb751e8ef2fdc0eb18
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 4f6d6637a032111295abc3b878c9b670f234395a authored by Your Name on 24 December 2016, 10:52:16 UTC
version 0.3.1.8
Tip revision: 4f6d663
README.md
# 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

>>> pynufft.pynufft.test_2D() # test the 2D case


### Features

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

### Summary

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 x22x() 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

The speed of pynufft is suboptimal, because FFTW is currently unsupported in Numpy/Scipy. 

However, pynufft can enjoy the full speed of MKL FFT inside the Anaconda Python environment.

### 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.

### Bibtex of this page

@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} }

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top