pisces.models.stars.polytropes.PolytropicStarModel.rename_profile#

PolytropicStarModel.rename_profile(old_name: str, new_name: str)#

Rename an existing profile in the model.

Changes the profile name in both memory and the HDF5 file.

Parameters:
  • old_name (str) – Current name of the profile.

  • new_name (str) – New name for the profile.

Raises:

KeyError – If old_name does not exist or new_name already exists.