calamari.exceptions.UnknownUnitError#
- exception calamari.exceptions.UnknownUnitError#
A data column was found, but its unit suffix is not recognised.
Quantum Design instruments record the operator’s chosen unit system in the data-column name itself – a moment column is
Moment (emu)orMoment (Am2)depending on a menu setting, and susceptibility and drive-field columns vary likewise. AMeasurementaccessor therefore has to read the suffix to know what it is returning.This is raised when the column calamari was looking for is present but carries a unit token it cannot convert. The alternative – returning the numbers unscaled, as though they were already in the accessor’s declared unit – would be a silent unit error of exactly the kind DM-2 exists to prevent, and could be wrong by orders of magnitude (A m^2 and emu differ by 1000x). Returning
Noneinstead would be almost as bad: it is indistinguishable from “this file has no moment column at all”, so a real measurement would vanish without explanation.Encountering this means the unit vocabulary needs extending, not that the file is bad. The message names the column, the token, and the tokens that are recognised.