cosmax.mass_assignment package

Submodules

cosmax.mass_assignment.cic module

cosmax.mass_assignment.cic.cic_ma(pos: Array, weight: Array, elements: int, size: float = 1.0) Array

Periodic cloud in a cell mass (CIC) mass assignment.

Position are assumed to be normalized between 0 and 1. Periodic boundary conditions are used.

Parameters:
  • pos – position of the particle

  • weight – weight of the particle

  • elements – number of elements in each dimension

  • size – size of the box in real space

Returns:

The grid with the mass assigned

cosmax.mass_assignment.nearest_neighbour module

cosmax.mass_assignment.nearest_neighbour.nn_ma(pos: Array, weight: Array, grid_size: int) Array

Nearest Neighbour (NN) mass assignment.

Position are assumed to be normalized between 0 and 1. Periodic boundary conditions are used.

Parameters:
  • pos – position of the particle

  • weight – weight of the particle

  • grid_size – size of the grid

Returns:

The grid with the mass assigned

Module contents