Skip to content

Transforming coordinate systems¤

cryojax also provides functions that transform between coordinate conventions.

cryojax.coordinates.cartesian_to_polar(coordinate_or_frequency_grid: Float[Array, 'y_dim x_dim 2'], square: bool = False) -> tuple[Inexact[Array, 'y_dim x_dim'], Inexact[Array, 'y_dim x_dim']] ¤

Convert from cartesian to polar coordinates.

Arguments:

  • coordinate_or_frequency_grid: The cartesian coordinate system in real or fourier space.
  • square: If True, return the square of the radial coordinate \(|r|^2\). Otherwise, return \(|r|\).