units pack¶
8 nodes, in noodlelab and above.
Units¶
Constant¶
units.constant
A named constant: π, the speed of light, standard gravity… with its unit, and with its CODATA uncertainty when it was measured rather than defined. Exact constants without a unit are plain numbers; use unit ‘1’ to feed one into Quantity Math. One node can feed many others: two nodes naming the same measured constant are sampled independently by Monte Carlo. Symbolic Values take constants by name too (a line ‘g = g0’).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
A built-in constant, one from the workspace’s constants.toml, or one of the graph’s own (Constants panel) Default |
|
|
Express it in this unit; empty: as defined. ‘1’ makes a plain number such as π a dimensionless quantity, for Quantity Math Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Convert Units¶
units.convert_units
Express a quantity in another unit of the same dimension. Links do this by themselves; use the node to choose the unit a result is shown in.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Magnitude¶
units.magnitude
The number without its unit, in unit (empty: the quantity’s own).
For array quantities, use Magnitude (Array).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Magnitude (Array)¶
units.magnitude_array
The numbers of an array quantity without the unit, in unit
(empty: the quantity’s own): floats, or complex numbers when the
quantity holds them.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Make Quantity¶
units.make_quantity
Attach a unit to a plain number.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Make Quantity (Array)¶
units.make_quantity_array
Attach a unit to an array of numbers, such as a table column.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Quantity¶
units.quantity
A constant with a unit, typed as text: 9.81 m/s^2, 3 km, 25 degC.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Quantity Math¶
units.quantity_math
Arithmetic on quantities. Add, subtract, minimum, maximum and modulo need the same dimension; the result is in the first input’s unit. A temperature plus or minus a difference (delta_degC) is a temperature, and one temperature minus another is a difference. Power raises A to B and root takes the B-th root of A: B is a plain number, and must be exact when A has a unit, because the result’s unit depends on it. Sqrt, absolute and negate ignore B.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|