|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| float | PSI = 6894.757293168361 |
Every limit a Layer X burn is graded against, in one place (DATA-CONTRACT section 1). Before this module the thresholds lived three times: the UI's ``VERDICT`` and ``verdictItems`` (``frontend/src/components/layerx/format.ts``, ``LayerXResult.tsx``), the optimiser's ``grade`` (``engine/layerx/optimize.py``) and the uncertainty sweep's crossings (``engine/layerx/uncertainty.py``). They agreed by copy. :data:`THRESHOLDS` holds each number once, with the reasoning that the UI kept in its hint, and :func:`grade` turns a result into the graded list the GUI draws as margin bars. What each entry carries (one dict per limit): * ``key``, ``label``, ``group`` (stability | injector | tanks | pressurant | propellant | flight | hardware | model); * ``value`` and ``unit``; ``limit`` (the red line) and ``warn`` (the amber edge), either of which may be ``None`` when the limit has only one; ``direction`` ``"min"`` (stay above) or ``"max"`` (stay below); * ``grade``: ``ok`` | ``warn`` | ``bad`` | ``info``. ``info`` is reported and never counts; * ``t_worst`` and ``index_worst``: the time [s from Fire] and the ``series`` index of the worst point, ``None`` when the quantity is not time-resolved; * ``series_ref``: the dotted path of its history in the result, for the margin bar to jump to; * ``basis`` (what the value is computed from) and ``hint`` (one sentence: why this threshold). A limit whose data is absent from the result is skipped, never guessed. An old saved run therefore grades exactly as the UI graded it, and a run carrying the new ``diagnostics`` blocks grades them too. Nothing here burns, solves or reads a file: it reads the result. It never raises on a malformed block; the entry is skipped and the reason goes in a ``model`` health entry instead.