pisces.models.stars.polytropes.PolytropicStarModel.__init__#
- PolytropicStarModel.__init__(filepath: str | Path, *args, **kwargs)#
Load a Pisces model from an existing HDF5 file.
This loads the model from disk, verifies that the file matches the expected model class, and reads its core components:
Metadata (from root attributes)
Analytical profiles (from
/PROFILES)The spatial grid (from
/GRID)Physical field data (from
/FIELDS)
Subclasses may extend loading behavior by overriding
__post_init__()or modifying the__init__method directly.- Parameters:
filepath (
strorPath) – Path to the existing HDF5 model file.*args – Optional arguments forwarded to
__post_init__().**kwargs – Optional arguments forwarded to
__post_init__().
- Raises:
FileNotFoundError – If the specified file does not exist.
TypeError – If the file does not belong to this model class.