pisces.extensions.simulation.core.initial_conditions.InitialConditions.get_particle_count#

InitialConditions.get_particle_count(model_name: str) dict[str, int][source]#

Inspect the number of particles in each species group for a stored model.

This is a wrapper around inspect_particle_count().

Parameters:

model_name (str) – The name/identifier of the model whose particle counts should be inspected.

Returns:

Mapping of particle species names to the number of particles in each.

Return type:

dict of str, int

Raises:
  • KeyError – If the model name is not found in the initial conditions.

  • FileNotFoundError – If the referenced particle file does not exist.

  • ValueError – If a particle group is missing the required NUMBER_OF_PARTICLES attribute.