pisces.extensions.simulation.gadget.particles.GadgetParticleDataset.update_field_metadata#

GadgetParticleDataset.update_field_metadata(group_name: str, field_name: str, metadata: dict)#

Update the metadata attributes for a specific field in a particle group.

This method allows you to modify or add metadata attributes for a given field in a particle group. It updates the attributes in memory and writes them back to the HDF5 file.

Parameters:
  • group_name (str) – The name of the particle group containing the field.

  • field_name (str) – The name of the field whose metadata is to be updated.

  • metadata (dict) – A dictionary containing the metadata attributes to update or add.

Raises:

KeyError – If the specified group or field does not exist in the dataset.