STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
engine.layerx.diag.ledger Namespace Reference

Functions

Optional[Dict[str, Optional[float]]] _stats (np.ndarray values, Optional[np.ndarray] weights=None)
Optional[Dict[str, Optional[float]]] _one (Any value)
Any _get (Any d, str path)
Any build_ledger (Mapping[str, Any] result, Any prep=None, Any config=None, *, Optional[Mapping[str, Any]] forward=None, Any runner=None, Optional[Mapping[str, Any]] injector=None)
Dict[str, Any] build_feed_diagnostics (Mapping[str, Any] result, Any prep=None, Any config=None, *, Any runner=None, Optional[Mapping[str, Any]] forward=None, Optional[float] target_N=None, Any sampler=None)

Variables

float G0 = 9.80665

Detailed Description

The assumption ledger: what EngineDesign's design point assumes, against what the burn delivered.

``build_ledger(result, prep=None, config, *, forward=None, runner=None, injector=None)`` ->
``diagnostics.ledger`` (DATA-CONTRACT 3): one row per AUDIT section-4 assumption that a result can
fill, ``{key, label, design_value, unit, delivered: {min, max, mean, start, end}, series_ref,
replaced, note}``.

**The design column is one EngineDesign Forward solve at the burn's lockup on both tanks**
(``engine.layerx.diag.injector.forward_design_point``), not the config's ``design_*`` / ``target_*``
fields: AUDIT 4 found those stale (6.5 kN values on a 6.8 kN engine). Rows that are config constants
EngineDesign uses as they are (densities, nozzle efficiency, A_t before erosion) take the config's
value and say so. Without a Forward solve the Forward rows carry ``design_value: null``.

**The delivered column** is min / max / time-mean / first / last over the firing steps of the series
named in ``series_ref`` (``dt``-weighted mean), or over the replay's points for replay series
(eta_c*), or one value where the quantity is a scalar (burn time, impulse).

``replaced`` reads as AUDIT 4 does: ``yes`` when the burn takes the quantity from the drawing or
the twin, ``partly`` when it takes the operating point but not the model's inputs, ``no`` when the
design's own value is used unchanged.

Function Documentation

◆ _get()

Any engine.layerx.diag.ledger._get ( Any d,
str path )
protected

Definition at line 52 of file ledger.py.

Referenced by build_ledger().

◆ _one()

Optional[Dict[str, Optional[float]]] engine.layerx.diag.ledger._one ( Any value)
protected

Definition at line 47 of file ledger.py.

Referenced by build_ledger().

◆ _stats()

Optional[Dict[str, Optional[float]]] engine.layerx.diag.ledger._stats ( np.ndarray values,
Optional[np.ndarray] weights = None )
protected

Definition at line 35 of file ledger.py.

Referenced by build_ledger().

◆ build_feed_diagnostics()

Dict[str, Any] engine.layerx.diag.ledger.build_feed_diagnostics ( Mapping[str, Any] result,
Any prep = None,
Any config = None,
* ,
Any runner = None,
Optional[Mapping[str, Any]] forward = None,
Optional[float] target_N = None,
Any sampler = None )
Every feed-diagnostic block of DATA-CONTRACT 3 this package builds, keyed as the contract
keys them under ``result["diagnostics"]``: ladder, regulator, solenoids, pressurant,
saturation, cavitation, injector, thrust_shape, ledger. One Forward solve at the lockup is
shared by the injector and the ledger. Each block fails on its own (``{available: false,
error}``); this never raises.

Definition at line 260 of file ledger.py.

References build_ledger().

◆ build_ledger()

Any engine.layerx.diag.ledger.build_ledger ( Mapping[str, Any] result,
Any prep = None,
Any config = None,
* ,
Optional[Mapping[str, Any]] forward = None,
Any runner = None,
Optional[Mapping[str, Any]] injector = None )
``diagnostics.ledger`` (a list of rows). Never raises: a failure is ``{available: false, error}``.

Definition at line 60 of file ledger.py.

References _get(), _one(), and _stats().

Referenced by build_feed_diagnostics().

Variable Documentation

◆ G0

float engine.layerx.diag.ledger.G0 = 9.80665

Definition at line 32 of file ledger.py.