runtraj.particles.write_particles#

runtraj.particles.write_particles(path, particles, release, settings, met_files, metadata=None)[source]#

Write a particle table to a Parquet file that read_particles() reads alone.

age and particle are stored as int32, and time is left out since it is the release time plus age. A release column holds the release id, so a scan of many files can tell releases apart. The release, the run’s settings, and the met files go in the file’s metadata, so the file reads alone.

Parameters:
Returns:

The path written to.

Return type:

Path | UPath

Raises:

ValueError – If age or particle holds a value that is not a whole number.