pisces.particles.base.ParticleDataset.copy#
- ParticleDataset.copy(output_path: str | Path, overwrite: bool = False, **kwargs) ParticleDataset [source]#
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
ParticleDataset
instance pointing to the copied file.- Parameters:
- Returns:
A new dataset instance pointing to the copied file.
- Return type:
- Raises:
FileExistsError – If output_path exists and overwrite is False.
IsADirectoryError – If output_path is a directory.