pisces.models.stars.polytropes.PolytropicStarModel.rename_field#

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

Rename an existing field in the model.

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

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

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

Raises:

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