pisces.extensions.simulation.core.initial_conditions.load_ics#

pisces.extensions.simulation.core.initial_conditions.load_ics(path: str | Path) InitialConditions[source]#

Load an initial conditions directory from its configuration file.

This function reads the IC_CONFIG.yaml file in the specified directory, inspects its metadata to determine the correct InitialConditions subclass, and returns an instance of that class.

Parameters:

path (str or Path) – Path to the initial conditions directory containing an IC_CONFIG.yaml file.

Returns:

An instance of the appropriate subclass populated from the file.

Return type:

InitialConditions

Raises:
  • FileNotFoundError – If the directory or its IC_CONFIG.yaml file does not exist.

  • ValueError – If the configuration is invalid or the class cannot be resolved.