stilt.particles.write_particles#
- stilt.particles.write_particles(path, particles, receptor, settings, met_files, metadata=None)[source]#
Write a particle table to a Parquet file that
read_particles()reads alone.ageandparticleare stored as int32, andtimeis left out since it is the receptor time plusage. Areceptorcolumn holds the receptor id, so a scan of many files can tell receptors apart. The receptor, the run’s settings, and the met files go in the file’s metadata, so the file reads alone.- Parameters:
particles (
DataFrame) – The particle table.receptor (stilt.receptor.Receptor) – Receptor the particles were released from.
settings (
Mapping[str,Any]) – The run’s settings, as its folder records them (stilt.config.Variant.run_settings).metadata (
dict[bytes,bytes] |None) – More file metadata, such as the settings hash.
- Returns:
The path written to.
- Return type:
Path|UPath- Raises:
ValueError – If
ageorparticleholds a value that is not a whole number.