|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Classes | |
| class | Override |
| class | MeasurementStore |
Functions | |
| Optional[Dict[str, Any]] | _element (Dict[str, Any] payload, str target) |
| Tuple[Dict[str, Any], List[Dict[str, Any]], List[str]] | apply_overrides (Mapping[str, Any] payload, List[Override] overrides) |
| Optional[float] | absolute_psia (str parameter, float value, str unit, str symbol="") |
| List[Dict[str, Any]] | parameter_table (Mapping[str, Any] payload) |
| Dict[str, Any] | override_view (Override o, List[Dict[str, Any]] rows) |
| str | lineage (Any drawing) |
Variables | |
| tuple | PROVENANCES = ("measured", "manufacturer", "estimated") |
| SIGNED_PARAMETERS = frozenset({"elevation_change"}) | |
| float | _PSI = 6894.757293168361 |
Phase 5: what has been measured, put where the assumption used to be. A drawing carries every number the twin needs, each with a provenance: * measured; * manufacturer; * estimated; * default. Most of the numbers that move a burn are the last two, for example the dome regulator's supply-pressure effect, its droop, the tank walls and the line fittings. They are not wrong to have, but they are not known. An **override** replaces one drawing parameter with a stated value and its provenance. That value is usually measured, with the test named and an uncertainty. It goes into the drawing's JSON before the twin reads it, so the twin's own assembly report sees a measured number where an estimate used to be. Nothing downstream knows overrides exist. Overrides belong to a person and a drawing (by content id). They live in that person's data directory, never in the drawing itself, because the drawing is the shared hardware record (ADR-0002). A measurement that should be permanent belongs on the drawing in pid-designer, with its source. Engine-side measurements are different: a cold-flow Cd, a patternated E_m, a nozzle efficiency. They belong to the engine and live in the engine config's ``measurements`` block (engine/pipeline/measurements.py). The engine card is built from the config with them applied, so Layer X picks them up without duplicating them here.
|
protected |
Definition at line 96 of file measurements.py.
Referenced by apply_overrides().
| Optional[float] engine.layerx.measurements.absolute_psia | ( | str | parameter, |
| float | value, | ||
| str | unit, | ||
| str | symbol = "" ) |
An absolute pressure on the drawing as the twin reads it, in psia; None for anything else. A bare ``psi`` on a tank's ``pressure`` or a regulator's ``dome_pressure`` is gauge (``feedtwin.model.pressure.drawn_unit``, ADR 0004), so a drawn 3750 psi is 3764.7 psia. A person reads and types psia (ADR 0007): the restatement table shows that number, not the drawing's spelling. Differences (droop, bias, relief set) are the same in either and stay as drawn.
Definition at line 135 of file measurements.py.
Referenced by override_view(), and parameter_table().
| Tuple[Dict[str, Any], List[Dict[str, Any]], List[str]] engine.layerx.measurements.apply_overrides | ( | Mapping[str, Any] | payload, |
| List[Override] | overrides ) |
A copy of ``payload`` with ``overrides`` written into its parameters. Returns ``(payload, applied, missing)``: what was written, as the report shows it, and the keys whose element the drawing no longer has (a drawing edited since the measurement was entered). Those are reported, not dropped silently.
Definition at line 104 of file measurements.py.
References _element().
| str engine.layerx.measurements.lineage | ( | Any | drawing | ) |
What stays the same when a drawing is edited: the shipped file or the pid-designer document (without its release). An upload has no identity beyond its content: two different files uploaded under one name must not share restatements, so an upload's lineage is its content id.
Definition at line 200 of file measurements.py.
Referenced by engine.layerx.measurements.MeasurementStore._key(), and engine.layerx.measurements.MeasurementStore.put().
| Dict[str, Any] engine.layerx.measurements.override_view | ( | Override | o, |
| List[Dict[str, Any]] | rows ) |
A stored restatement as the table shows it: on an absolute pressure, with ``psia`` too, so a restatement saved as a bare (gauge) psi before the table spoke psia reads back as what it means.
Definition at line 188 of file measurements.py.
References absolute_psia().
| List[Dict[str, Any]] engine.layerx.measurements.parameter_table | ( | Mapping[str, Any] | payload | ) |
Every parameter on the drawing, as the drawing states it: what a person reviews before deciding what to measure next. An absolute pressure also carries ``psia``, the number it means (:func:`absolute_psia`): the table shows and takes that one.
Definition at line 156 of file measurements.py.
References absolute_psia().
|
protected |
Definition at line 132 of file measurements.py.
| tuple engine.layerx.measurements.PROVENANCES = ("measured", "manufacturer", "estimated") |
Definition at line 41 of file measurements.py.
| engine.layerx.measurements.SIGNED_PARAMETERS = frozenset({"elevation_change"}) |
Definition at line 93 of file measurements.py.