loss

cosmax.tools.loss(pos: Array, mass: Array, field_truth: Array, size: float = 1.0) Array

Loss function for fitting a 3D density field with particles

Parameters:
  • pos – particle positions

  • mass – particle masses

  • field_truth – 3D density field

Returns:

mean squared error

Return type:

loss