tomodrgn.lie_tools#

Tools for dealing with SO(3) group and algebra Adapted from pimdh/lie-vae All functions are pytorch-ified

Functions

SO3_to_quaternions

Map batch of SO(3) matrices to quaternions.

SO3_to_s2s2

Map batch of SO(3) matrices to s2s2 representation as first two basis vectors, concatenated as Bx6

expmap

logsumexp

Numerically stable logsumexp.

map_to_lie_algebra

Map a point in R^N to the tangent space at the identity, i.e. to the Lie Algebra.

quaternions_to_SO3

Normalizes q and maps to group matrix.

random_SO3

Generate random rotations as SO3 matrices

random_quaternions

Generate random rotations as quaternions

s2s1rodrigues

s2s2_to_SO3

Normalize 2 3-vectors.

so3_entropy

so3_entropy_old