PREPROD
ReaderAuthor

piper

Conversion Matrix

`UnitConversion.matrix` scopes the conversion rule to a specific environmental medium — for example "groundwater", "soil", or "air" — because unit relationships can differ by matrix.

1 min read · 2 depth levelsstratum-piper · vdevMatches production
Everyday

The matrix field on a UnitConversion is important because the same numeric units can represent different concentration scales in different media. A conversion valid for groundwater concentrations (typically in ug/L or mg/L) may not be appropriate for soil concentrations (typically in mg/kg). By filtering UnitConversion lookups by matrix, piper selects the correct factor when normalizing results. When matrix is null or omitted, the conversion is treated as matrix-agnostic and applies to all media.

Technical section
Data model, API, and internals — visible to developers.
View as developer →
Was this helpful?