pisces.particles.gadget.GadgetLikeParticleDataset.copy#
- GadgetLikeParticleDataset.copy(output_path: str | Path, overwrite: bool = False, **kwargs) ParticleDataset#
Create a full copy of this particle dataset at a new location.
This method replicates the entire contents of the HDF5 file, including all particle groups, fields, field metadata, and global attributes, into a new file. It returns a new
ParticleDatasetinstance pointing to the copied file.- Parameters:
- Returns:
A new dataset instance pointing to the copied file.
- Return type:
ParticleDataset- Raises:
FileExistsError – If output_path exists and overwrite is False.
IsADirectoryError – If output_path is a directory.