"""Shared track-column constants.

Column names and dtypes here must match the `rssa_core::tracks::Column` variants on
the Rust side (see `crates/rssa-core/src/tracks.rs`); they are kept in one place so
`scan.py`'s Polars schema and `plotting.py`'s filters can't drift apart.
"""

import polars as pl

#: Leading-digit particle-type code used by MCNP to indicate a neutron track.
NEUTRON_PARTICLE_TYPE = 8

#: Schema of the tracks DataFrame, in canonical column order.
TRACK_SCHEMA = pl.Schema(
    {
        "history": pl.Int64,
        "particle_type": pl.Int64,
        "weight": pl.Float64,
        "energy": pl.Float64,
        "time": pl.Float64,
        "x": pl.Float64,
        "y": pl.Float64,
        "z": pl.Float64,
        "u": pl.Float64,
        "v": pl.Float64,
        "w": pl.Float64,
        "surface_id": pl.Int64,
    }
)
