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 (str or Path) – Path to the existing HDF5 model file.

  • *args – Optional arguments forwarded to __post_init__().

  • **kwargs – Optional arguments forwarded to __post_init__().

Raises: