Skip to main content
Version: v0.0.2

Interface: UcumAtom

A UCUM unit atom, from the essence <base-unit> / <unit> table. An atom is a symbol like m, L, [in_i], 10*, or Cel, before any prefix or exponent is applied.

Properties

arbitrary

readonly arbitrary: boolean

An arbitrary unit (essence isArbitrary, e.g. [IU], [arb'U]) - not commensurable with any other unit. Modeled as its own dimension axis keyed by the atom code, so [IU]/[IU] reduces to unity but [IU] is never equated with a mass or another arbitrary unit.


base

readonly base: boolean

A base unit (one of the 7: m s g rad K C cd) - its own dimension, factor 1.


code

readonly code: string

The case-sensitive atom symbol (the essence Code, e.g. "m", "[iU]", "m[Hg]").


dim?

readonly optional dim?: string

A base unit's dimension key (its own code), or undefined for derived atoms.


metric

readonly metric: boolean

Whether a metric prefix may attach to this atom (essence isMetric). Only metric atoms prefix.


special

readonly special: boolean

A special unit (essence isSpecial, e.g. Cel, B, [pH]) - defined by a non-linear function, so it has no linear factor/dimension and is never reduced to one. Compared only by identity of its normalized representation (never claimed equal to a linear unit).


value?

readonly optional value?: object

The linear definition: 1 <atom> = value × <unit> (essence <value value Unit>), for derived atoms. undefined for base units (they define the dimensions) and for special units (non-linear).

factor

readonly factor: number

unit

readonly unit: string