This release is a pre-release and may not be stable for production use.
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
Release files for torch-fourier-shift 0.6.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| torch_fourier_shift-0.6.0rc2.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| torch_fourier_shift-0.6.0rc2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / torch_fourier_shift-0.6.0rc2.tar.gz
| Download URL | torch_fourier_shift-0.6.0rc2.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54641c8809b85faef4ad8a1df1fe94d48e2c669c64a56c9301c4454d5a27e671
|
|
BLAKE2b-256 checksum How to use checksums |
26866ce6847ed5e2cde26ea5fc556ccc2ae446b4c016797611a2dc2968964b71
|
| 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.0rc2-py3-none-any.whl
| Download URL | torch_fourier_shift-0.6.0rc2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e503a66d4c9ce0270f122f1a260f6320bc76bf4085c6eb762be4e0e576aa9d6
|
|
BLAKE2b-256 checksum How to use checksums |
f8b0a92e8145f8da353fca47913f4cc113d00e53d3ba958c53e97e5b64892a17
|
| 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 log