Expand description
Equation-editor formulas: parsing and grid-cell evaluation.
The grammar follows the VERDI formula editor: arithmetic (+ - * / ^ **),
elementary functions, and per-cell aggregation over time or vertical
layers. NAME[n] references variable NAME in the n-th opened dataset
(1-based); an unqualified NAME refers to the dataset being viewed.
Structs§
Enums§
Constants§
- FUNCTION_
NAMES - Names accepted by the parser, listed in the formula editor and docs.
Traits§
- Formula
Inputs - Data access used while evaluating a formula.
Functions§
- depends_
on - Whether the result varies along
axis, i.e. some reference is not enclosed by an aggregation over that axis. - evaluate
- Evaluate
exprat the given time and layer indices into a displayable slice. - evaluate_
constant - Evaluate a formula that contains only numbers and functions.
- is_
identifier - Whether
textis a plain identifier usable as a formula name. - is_
identifier_ char - Characters that may appear in an unquoted variable name after the first.
- parse
- Parse a formula expression (without a
name =prefix). - references
- Unique variable references in order of first appearance.