Skip to content

Rotations in cryo-EM¤

cryojax.rotations implements an engine and utility functions for rotations in cryo-EM.

Representing rotations¤

The engine for handling rotations in cryoJAX is the cryojax.rotations.SO3 class. This is based on the implementation in the package jaxlie.

cryojax.rotations.SO3 ¤

A rotation in 3D space, represented by the SO3 matrix lie group.

The class is almost exactly derived from the jaxlie.SO3 object.

jaxlie was written for Yi, Brent, et al. 2021.

__init__ ¤
__init__(wxyz: Float[NDArrayLike, '4'])

Arguments:

  • wxyz: A quaternion represented as \((q_w, q_x, q_y, q_z)\).
apply ¤
apply(target: Float[Array, '3']) -> Float[Array, '3']
compose ¤
compose(other: typing.Self) -> typing.Self
inverse ¤
inverse() -> typing.Self
from_x_radians classmethod ¤
from_x_radians(angle: Float[Array, '']) -> typing.Self

Generates a x-axis rotation.

from_y_radians classmethod ¤
from_y_radians(angle: Float[Array, '']) -> typing.Self

Generates a x-axis rotation.

from_z_radians classmethod ¤
from_z_radians(angle: Float[Array, '']) -> typing.Self

Generates a x-axis rotation.

identity classmethod ¤
identity() -> typing.Self
from_matrix classmethod ¤
from_matrix(matrix: Float[Array, '3 3']) -> typing.Self
as_matrix ¤
as_matrix() -> Float[Array, '3 3']
exp classmethod ¤
exp(tangent: Float[Array, '3']) -> typing.Self
log ¤
log() -> Float[Array, '3']
adjoint ¤
adjoint() -> Float[Array, '3 3']

Computes the adjoint, which transforms tangent vectors between tangent spaces.

normalize ¤
normalize() -> typing.Self
sample_uniform classmethod ¤
sample_uniform(key: PRNGKeyArray) -> typing.Self

Utilities for converting between angular parametrizations¤