Skip to content

Units of measure

Think of a lab notebook. When you write “peak at 2500 cm⁻¹”, the number and the unit travel together, and a colleague can read both. If the notebook silently rewrote your “cm⁻¹” as “1/cm”, you would wonder what else it changed. MTRL treats units the same careful way: it keeps the text you declared, understands the spellings it knows, and never rewrites a unit behind your back.

Every field of a record can carry one unit, written exactly as your instrument or notebook reports it. A wavenumber axis might say "cm^-1" or "cm⁻¹"; a time axis might say "s"; a normalised intensity often says "a.u.". The declaration is part of the record, so it survives save, load, correction and export unchanged.

MTRL does not guess. A field with no declared unit stays undeclared, and a unit it does not recognise is preserved verbatim rather than rewritten or dropped.

Behind the scenes MTRL matches the spellings it knows against QUDT — Quantities, Units, Dimensions and Types, a public standard vocabulary for measurement. QUDT separates two ideas that are easy to blur:

  • The quantity kind is the property being measured: an inverse length, a time, a dimensionless ratio.
  • The unit is the measure of that property: per centimetre, seconds, unitless.

A recognised spelling carries both, so a check can compare meaning rather than text. Two fields that disagree fail their check with the disagreement named, instead of one being converted to match the other.

The recognised set is deliberately small. Each row shows the spellings that map to the same standard terms:

You write QUDT unit Quantity kind
cm^-1, cm⁻¹, 1/cm per centimetre inverse length
s, second seconds time
a.u. unitless dimensionless

Anything else — "K", "MPa", "counts", your own domain unit — is kept exactly as you wrote it, with no standard terms attached. It still records, exports and round-trips; it plays no part in unit-checked comparisons until the recognised set grows.

Declared units do real work in three places. A transform preserves the declarations of the fields its output keeps, so derived records stay labelled. Machine-learning dataset specifications can require an expected_unit for a channel, feature or target, and a mismatch fails the build with the field and its declared unit named. And exports carry the declared text, so a colleague reading your CSV or workbook sees the same unit you wrote.

Use the spelling your instrument reports; that is the honest record. When you are free to choose, prefer the canonical forms from the table above (cm^-1, s, a.u.) so the standard terms attach. Keep one spelling per field across a study, because comparisons read the declaration you wrote. And when a check fails on units, change the declaration or the data deliberately — MTRL will not choose for you.