pisces.models.stars.polytropes.PolytropicStarModel.add_profile#
- PolytropicStarModel.add_profile(name: str, profile: BaseProfile, overwrite: bool = False)#
Add a new analytic profile to the model.
Profiles represent analytic functions (e.g., NFW, Vikhlinin) that can generate fields or describe physical quantities. This method saves the profile in both memory and the on-disk HDF5 file.
- Parameters:
- Raises:
KeyError – If the profile already exists and
overwrite=False
.