InitialConditions1DSpherical#

class pisces.extensions.simulation.core.initial_conditions.InitialConditions1DSpherical(directory: str | Path)[source]#

Initial conditions for 1D spherical simulations.

This subclass enforces that all models are defined in a strictly spherical coordinate system with only a radial dependence (r axis). Bulk positions and velocities are not used—models are implicitly located at the origin with zero translational motion.

Use this class when constructing spherically symmetric ICs, e.g. radial gas/halo profiles. The class ensures that:

  • The model grid uses SphericalCoordinateSystem.

  • The grid has exactly one active axis (r).

  • Only model_name and model are required keys; particles may be added.

Subclasses may extend validation to enforce additional spherical-specific metadata (e.g., radial boundary conditions, outer cutoff radii).

Methods

__init__(directory)

Load an existing set of initial conditions from a target directory.

add_model(name, model, model_config[, ...])

Add a new model to the initial conditions set.

add_particles_to_model(particle_path, model_name)

Attach a particle dataset file to an existing model in the initial conditions.

create_ics(directory, *models[, ...])

Create a new initial conditions (IC) directory and return an InitialConditions instance.

generate_particles(model_name, num_particles)

Generate particles for a stored model using its internal particle generation method.

get_model_coordinate_system(model_name)

Retrieve the coordinate system of a stored model without fully loading it.

get_model_fields(model_name)

Inspect the available fields in a stored model without fully loading it.

get_model_grid(model_name)

Retrieve the grid object of a stored model without fully loading it.

get_model_info(model_name)

Retrieve the configuration information for a specific model.

get_model_metadata(model_name)

Inspect the metadata of a stored model without fully loading it.

get_model_summary(model_name[, include_fields])

Retrieve a combined summary of a stored model without fully loading it.

get_particle_count(model_name)

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

get_particle_fields(model_name)

Inspect the available fields for each particle species in a model.

get_particle_path(model_name)

Retrieve the particle file path associated with a specific model.

get_particle_path_dict()

Retrieve a dictionary mapping model names to their associated particle file paths.

get_particle_species(model_name)

List the particle species present in the stored particle dataset for a given model.

has_model(model_name)

Check if a model with the given name exists in these initial conditions.

has_particles(model_name)

Check if a specific model has associated particles.

list_models()

List all models currently stored in these initial conditions.

list_models_with_particles()

List all models that have associated particle datasets.

load_model(name)

Load a specific model from the initial conditions.

load_particles(model_name, **kwargs)

Load the particle dataset associated with a specific model.

remove_model(name)

Remove a model and its associated files from the initial conditions.

remove_particles_from_model(model_name[, ...])

Detach and optionally delete the particle dataset associated with a specific model.

update_model(model_name, **parameters)

Update parameters of an existing model in the initial conditions.

Attributes

config

The configuration manager for the initial conditions.

directory

The directory where the initial conditions are stored.

logger

Logger instance for the InitialConditions class.

metadata

The metadata associated with the initial conditions.

models

The processed models used in the initial conditions.

ndim

The number of spatial dimensions for the initial conditions.

particles

The particle files associated with the models in the initial conditions.