Quantity Split
Shippingquantity_splitDecompose a quantity into its magnitude, σ, relative uncertainty, and unit label as separate outputs
Signature
Inputs
valueScalar|Signalrequired— The quantity to decompose into value / σ / relative / unit components.
Outputs
valueScalar|Signal— Magnitude only: the unit is stripped and σ is dropped (exact).sigmaScalar|Signal— The standard uncertainty $\sqrt{\sigma^2}$ in the input's unit; an exact input yields 0. The output is itself exact.relativeScalar|Signal— The relative uncertainty σ/|value| (dimensionless). A zero value with nonzero σ yields NaN (loud-NaN policy); exact yields 0.unitText— The unit symbol of the input, emitted as Text.
Description
Quantity Split is the inverse of composing : it fans a quantity out into four parallel outputs so every component becomes first-class, plottable, processable data. You can threshold the error band, plot relative noise over time, or route the unit label to a display — things the packed quantity cannot do directly.
The four outputs:
- value — the magnitude only, with the unit stripped and σ dropped (exact).
- sigma — the standard uncertainty , carrying the input's unit; an exact input yields .
- relative — (dimensionless). A zero value with nonzero σ yields (the engine's loud-NaN policy — an infinite relative error is surfaced, not hidden); an exact input yields .
- unit — the unit symbol as a Text value.
Each numeric output is itself exact — there is no σ-of-σ, since first-order propagation has no meaningful spread for the spread. For a Signal input every output is computed per-sample from the corresponding variance; a missing or mismatched-length variance array is treated as all-zero (exact).
Mathematics
Examples
Split a scalar into four parts
Input with () produces: value (unitless, exact); sigma ; relative ; unit "V" (Text).
Exact signal yields zero σ
An exact signal [3, 4] (no variance) gives sigma [0, 0] and relative [0, 0]; the value output is the same samples, stripped of unit and variance.
Zero value with uncertainty is a loud NaN
A signal [2, 0] V with gives sigma [0.1, 0.2] and relative [0.05, NaN] — the second sample's zero value makes its relative error infinite, surfaced as NaN rather than silently swallowed.
Applications
- Plotting the standard uncertainty as its own trace to visualise how the error band evolves over time.
- Thresholding or alarming on relative uncertainty (σ/|value|) to flag samples that have degraded past a confidence limit.
- Extracting the magnitude alone (unit stripped, exact) to feed a node that must not carry uncertainty.
- Routing the unit symbol to a text/label display, or reusing it via set_unit elsewhere in the graph.
Neat
Every output is exact by design — Captyse does not model a σ-of-σ, because first-order propagation has no meaningful spread for the spread itself.
A zero value with nonzero σ deliberately produces NaN on the relative output: an infinite relative error is a real, honest fact and the loud-NaN policy makes it visible instead of hiding it.
The sigma output keeps the quantity's unit while value and relative are made dimensionless — each component lands in exactly the unit that makes physical sense.
Known issues
The relative output is NaN wherever the value is exactly zero and σ is nonzero — expected under the loud-NaN policy, but downstream nodes must tolerate NaN (or gate those samples).
The value and relative outputs are always dimensionless; only the sigma output carries the input's unit, so re-attaching a unit downstream is the caller's responsibility.