Skip to content

Converting between common conventions¤

Here, helper functions for converting between common conventions are described.

cryojax.constants.convert_b_factor_to_variance(b_factor: Float[Array | np.ndarray, ...] | float) -> Float[Array, ...] ¤

From the B-factor of a gaussian, return the corresponding value of the variance of the gaussian. This simply does the conversion

\[\sigma^2 = B / (8 \pi^2)\]

The purpose of this function is to make it easy to convert between conventions when defining gaussians.

Arguments:

  • b_factor: The B-factor of the gaussian.

Returns:

The variance.

cryojax.constants.convert_variance_to_b_factor(variance: Float[Array | np.ndarray, ...] | float) -> Float[Array, ...] ¤

From the variance of a gaussian, return the corresponding value of the B-factor of the gaussian. This simply does the conversion

\[B = 8 \pi^2 * \sigma^2\]

The purpose of this function is to make it easy to convert between conventions when defining gaussians.

Arguments:

  • variance: The variance of the gaussian.

Returns:

The B-factor.