torch-phase-shift
torch-fourier-shift is a package for shifting 1D, 2D and 3D images with subpixel precision by applying phase shifts to Fourier transforms in PyTorch.
import torch
from torch_fourier_shift import fourier_shift_image_2d
# create a dummy image
my_image = torch.tensor(
[[0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0]]
)
# shift the image by 1 pixel in dim 0, 2 pixels in dim 1
shifted_image = fourier_shift_image_2d(image=my_image, shifts=torch.tensor([1, 2]))
API's are equivalent for 1D and 3D images.
Installation
torch-fourier-shift is available on PyPI.
pip install torch-fourier-shift
Usage
Please check the the docs at teamtomo.org/torch-fourier-shift
Metadata
Release files for torch-fourier-shift 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| torch_fourier_shift-0.6.0.tar.gz | 8.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| torch_fourier_shift-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / torch_fourier_shift-0.6.0.tar.gz
| Download URL | torch_fourier_shift-0.6.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c666e5c9c73d9d8acaaec93192f49aa6db8e7eff22d85fb9f50f52bdda4325b
|
|
BLAKE2b-256 checksum How to use checksums |
b610dffa4a75c9e6eacbe333ca964f17bde0bc569f09d5235c4dd01f28597d6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logRelease files / torch_fourier_shift-0.6.0-py3-none-any.whl
| Download URL | torch_fourier_shift-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00aa63ebd57cff04eb3b8ad7e75fb8a3eb9e160d553ce6fc3319b5c242e0534d
|
|
BLAKE2b-256 checksum How to use checksums |
90694e0f5466437f66b35788248cf24a95437abd371211895fd8cb12344848f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logSecurity for torch-fourier-shift 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for torch_fourier_shift-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.