Skip to main content

Generate uniform 3D euler angles (ZYZ)

Project description

torch-so3

License PyPI Python Version CI codecov

Generate uniform sets of proper Euler angles (ZYZ format) over the SO(3) group using PyTorch. Note that Euler angles are returned in the order of $(\phi, \theta, \psi)$.

Examples

See the /examples directory for brief notebooks outlining the usage of the package.

Installation

Install via pip

pip install torch-so3

Install via source by first cloning the repository then running.

git clone https://github.com/teamtomo/torch-so3.git
cd torch-so3
pip install -e .

And for development and testing use

pip install -e ".[dev,test]"

For those contributing make sure to run tests before, and to adhere to the pre-commit hooks.

python -m pytest
pre-commit run

Usage

A basic example of generating uniform Euler angles in 4.0 and 6.0 degree increments across the entire SO(3) group is shown below.

from torch_so3 import get_uniform_euler_angles

angles = get_uniform_euler_angles(
    psi_step=4.0,  # units of degrees
    theta_step=6.0,
)
angles.shape  # (103320, 3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_so3-0.5.2rc1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_so3-0.5.2rc1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file torch_so3-0.5.2rc1.tar.gz.

File metadata

  • Download URL: torch_so3-0.5.2rc1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for torch_so3-0.5.2rc1.tar.gz
Algorithm Hash digest
SHA256 4ba0e7ccefcc96697b69dd09ebe1b81716c153aedf6a01795146ab71a7399b06
MD5 f16c2cbd74b894d3a8da78a6e469c0e6
BLAKE2b-256 61879d33c879927ce4a8b5d474c35a4d70b6b0428462c53e1661e16e9bb39781

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_so3-0.5.2rc1.tar.gz:

Publisher: deploy.yml on teamtomo/teamtomo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_so3-0.5.2rc1-py3-none-any.whl.

File metadata

  • Download URL: torch_so3-0.5.2rc1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for torch_so3-0.5.2rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 4632c125eddb80ccd59728fdae4b7f64499b6f2b370e5c87c7160e9e10f1fa2d
MD5 b22c14ee5dc66d7890d3d745e8097094
BLAKE2b-256 7ec1fc6c44ef04184cb0257ea7cd2c01237fe9075dde3d2914a747bbd97b8b09

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_so3-0.5.2rc1-py3-none-any.whl:

Publisher: deploy.yml on teamtomo/teamtomo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page