nn_ma

cosmax.mass_assignment.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