aquakin.read_influent_csv#
- aquakin.read_influent_csv(path, model, *, column_order=None, column_map=None, fractions=None, delimiter=None)[source]#
Read a CSV influent file.
- Parameters:
path (str | Path) – Path to the CSV file.
model (CompiledModel) – Kinetic model whose species ordering
Cis built against.column_order (list[str], optional) – Positional column layout, used when
column_mapis not given. The first column is timet, the column named"Q"is the flow, and every other name must be a species the model declares. Defaults to the standard BSM1 ordering.column_map (dict, optional) – Map of role -> CSV header name, for an arbitrary-header file (a lab / SCADA export) – no renaming the file. Roles are
"t","Q", optional"T", any ASM species name (mapped directly), and the aggregate measurementstotal_cod/tkn/ammonia/nox/alkalinity/filtered_cod/flocculated_filtered_cod/soluble_inert_cod. When aggregates are mapped, each row is fractionated into ASM1 states (seeaquakin.plant.characterize.fractionate()); a directly-mapped species overrides its fractionated value, and any species neither mapped nor produced is zero. Requires a header row in the file.fractions (InfluentFractions, optional) – Fractionation parameters for the aggregate columns (defaults to the SUMO Sumo1 raw-influent values).
delimiter (str, optional) – Field delimiter. Defaults to auto-sniffing (whitespace and comma both work).
- Return type: