Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

torch-refine-tilt-axis-angle

License PyPI Python Version CI codecov

Tilt-axis angle optimization for tilt series using common lines.

Overview

torch-refine-tilt-axis-angle finds the tilt-axis angle of a translationally aligned tilt series from its common line: the line through the origin of Fourier space that all tilt images share, oriented perpendicular to the tilt axis. Each image's Fourier transform is coherently summed across the stack, and a two-stage angular grid search (coarse, then a finer search around the coarse optimum) locates the orientation of highest power in the summed power spectrum. The whole search is evaluated as batched tensor operations, so every candidate angle is scored in parallel rather than in a Python loop.

Rectangular images are handled natively, without cropping to square, so no image data is discarded.

Installation

pip install torch-refine-tilt-axis-angle

Usage

import torch
from torch_refine_tilt_axis_angle import refine_tilt_axis_angle

# Load or create your tilt series
# tilt_series shape: (batch, height, width) - batch is number of tilt images
# Example: tilt_series with shape (61, 512, 512) - 61 tilt images of 512x512 pixels
tilt_series = torch.randn(61, 512, 512)

# Specify an initial guess for the tilt axis angle (the default is 90.0,
# which searches the full [0, 180] range). This can be the value from an
# MDOC file.
initial_tilt_axis_angle = 50.0

# Run tilt axis angle refinement.
new_tilt_axis_angle = refine_tilt_axis_angle(
    tilt_series=tilt_series,
    tilt_axis_angle=initial_tilt_axis_angle,
)

License

This package is distributed under the BSD 3-Clause License.

Release files for torch-refine-tilt-axis-angle 0.6.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torch-refine-tilt-axis-angle 0.6.0rc2
File Size Uploaded
torch_refine_tilt_axis_angle-0.6.0rc2.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torch-refine-tilt-axis-angle 0.6.0rc2
File Interpreter ABI Platform
torch_refine_tilt_axis_angle-0.6.0rc2-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / torch_refine_tilt_axis_angle-0.6.0rc2.tar.gz

Download URL torch_refine_tilt_axis_angle-0.6.0rc2.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
23fbe81dc662d9cc97a2d2e9771264831f126ff35d0269bcd65d88ea88660431
BLAKE2b-256 checksum
How to use checksums
26d007e3408362b4c114f26a2e5016d93658baa0abcbbf676c4b86f38ce8bd28
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

Release files / torch_refine_tilt_axis_angle-0.6.0rc2-py3-none-any.whl

Download URL torch_refine_tilt_axis_angle-0.6.0rc2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e34c8f8e66a0efd5cd5f8c7293725f9d3ca10542a1bf1a6ab314202417e9d39
BLAKE2b-256 checksum
How to use checksums
d1e65b505ad94c8ca84978b1e3eb5de33086a0624bd89447dae150cef1e38119
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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page