mmuckley / torchkbnufft

A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
https://torchkbnufft.readthedocs.io/
MIT License
204 stars 44 forks source link

Package refactor, update to v1.0.0 #15

Closed mmuckley closed 3 years ago

mmuckley commented 3 years ago

This PR refactors the repository, rewriting almost the entire package to use native complex tensors in PyTorch. The benefit of doing this is roughly a factor-of-2 speedup in tests on my personal laptop. The updated documentation can be viewed at https://torchkbnufft.readthedocs.io/en/refactor/index.html.

Since so much has changed, v1.0.0 is very incompatible with v0.3.4, but I think the new design choices are much better, so this is worth it.

A summary of changes follows:

Testing:

The test suite has also been completely redone. Tests are largely done on an integration basis by using the core modules, KbInterp, KbInterpAdjoint, KbNufft, KbNufftAdjoint, and ToepNufft. We also created some small datasets to test accuracy and assert that the new package is computationally equivalent to the old one. Lastly, we now enforce black code formatting and lint with both flake8 and mypy.