mr2.phantoms.random_b0_sh_coefficients

mr2.phantoms.random_b0_sh_coefficients(max_degree: int = 3, sigma: float = 1000.0, scaling_power: float = -1.0, seed: int | None = None) → Tensor[source]

Sample coefficients for a real spherical-harmonic B0 map.

Parameters:
  • max_degree (int, default: 3) – Maximum spherical harmonic degree.

  • sigma (float, default: 1000.0) – Standard deviation of the degree-one coefficients. This sets the unit of the coefficients and resulting map.

  • scaling_power (float, default: -1.0) – Exponent controlling the standard deviation for degree n as sigma * n**scaling_power.

  • seed (int | None, default: None) – Random seed.

Returns:

coefficients – Coefficients in degree-major order, excluding the constant term.