Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

teamtomo/torch-so3

Repository files navigation

Warning

This package has been migrated to the TeamTomo monorepo. Future development, bug fixes, and releases will happen there. This repository is archived and no longer maintained. This package is still published to and installable from the same PyPI project, but development installations should be made from the monorepo.

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)

About

Sample SO(3) space in PyTorch

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages