sarkas.tools.observables.calc_moments#

sarkas.tools.observables.calc_moments(dist, max_moment, species_index_start)[source]#

Calculate the moments of the (velocity) distribution.

Parameters
  • dist (numpy.ndarray) – Distribution of each time step. Shape = (no_dumps, dim, runs * inv_dim * total_num_ptlcs)

  • max_moment (int) – Maximum moment to calculate

  • species_index_start (numpy.ndarray) – Array containing the start index of each species. The last value is equivalent to dist.shape[-1]

Returns

  • moments (numpy.ndarray) – Moments of the distribution. Shape=( no_species, no_dumps, dim, max_moment )

  • ratios (numpy.ndarray) – Ratios of each moments with respect to the expected Maxwellian value. Shape=( no_species, no_dumps, no_dim, max_moment - 1)

Notes

See these equations