pisces.extensions.simulation.gadget.particles.GadgetParticleDataset.rename_field#
- GadgetParticleDataset.rename_field(group_name: str, old_name: str, new_name: str)#
Rename a field within a particle group.
This method renames the dataset (field) old_name to new_name in the specified group. Metadata is preserved during the renaming. This operation is destructive and cannot be undone.
- Parameters:
- Raises:
KeyError – If the specified group or field does not exist.
ValueError – If the new field name already exists in the group.