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

Functions

 config ()
 prepared (config)
 _totals (trace)
 layer_x (prepared)
 _cockpit (prepared, config, *, bool card)
 _table (rows)
 test_the_cockpit_firing_enginedesigns_card_is_layer_xs_burn (prepared, config, layer_x)
 test_and_the_simplified_engine_on_the_same_path_is_not (prepared, config, layer_x)
 test_layer_x_totals_its_own_burn_as_the_report_does (prepared, layer_x)

Variables

 feedtwin = pytest.importorskip("feedtwin", reason="lib/feedtwin is not installed (pip install -e ../lib/feedtwin)")
str FIXTURE = Path(__file__).parent / "fixtures" / "ethalox_6500N_doublet_cad_2026-09-28.yaml"
str GN2 = "copv_study_gn2"
 pytestmark
int AGREE = 3e-3

Detailed Description

Layer X and the feed-twin cockpit fire the same engine, and get the same burn.

On 2026-10-06 the two gave "entirely different thrust curves" on LE4: the cockpit 7,193 N at
O/F 1.92, Layer X 6,205 N at O/F 1.59. Their solver agreed to a newton given the same inputs;
the inputs had drifted apart:

* the cockpit fired a three-week-old copy of the design (a different plate and throat), +1,606 N;
* through feedtwin's simplified engine, not EngineDesign's: -5 % thrust, +11 % impulse;
* from the operator's T-0 (dome, bottle, a 95 % fill), not Layer X's: a different burn, rightly.

The cockpit now fires EngineDesign's engine card, built from the engine's own config by the
endpoint it calls (``engine.layerx.card.card_for_config_text``), sent as JSON and installed the
one way a card goes on an engine (``EngineCard.install``). This checks the contract that buys:
put at the same T-0, the cockpit's way of firing (command Fire, tick at the console's step,
total the burn from the session's samples) reproduces Layer X's burn. And that the check can
fail: the simplified engine, on the same path, does not.

Function Documentation

◆ _cockpit()

test_layerx_cockpit_parity._cockpit ( prepared,
config,
* ,
bool card )
protected
The cockpit's way: the engine from its YAML, the card as JSON off the wire, the cockpit's
own Setup, put at Layer X's T-0, Fire commanded, ticked at the console's step.

Definition at line 86 of file test_layerx_cockpit_parity.py.

References min, and Setup.

Referenced by test_and_the_simplified_engine_on_the_same_path_is_not(), and test_the_cockpit_firing_enginedesigns_card_is_layer_xs_burn().

◆ _table()

test_layerx_cockpit_parity._table ( rows)
protected
The two burns side by side, printed (``pytest -s``): a parity test that passes in silence
tells nobody how close the tools are (D-66).

Definition at line 121 of file test_layerx_cockpit_parity.py.

Referenced by test_the_cockpit_firing_enginedesigns_card_is_layer_xs_burn().

◆ _totals()

test_layerx_cockpit_parity._totals ( trace)
protected

Definition at line 66 of file test_layerx_cockpit_parity.py.

Referenced by layer_x().

◆ config()

test_layerx_cockpit_parity.config ( void )

Definition at line 53 of file test_layerx_cockpit_parity.py.

◆ layer_x()

test_layerx_cockpit_parity.layer_x ( prepared)
Layer X's own pass: its model, its setup, its plan.

Definition at line 77 of file test_layerx_cockpit_parity.py.

References _totals().

◆ prepared()

test_layerx_cockpit_parity.prepared ( config)

Definition at line 58 of file test_layerx_cockpit_parity.py.

◆ test_and_the_simplified_engine_on_the_same_path_is_not()

test_layerx_cockpit_parity.test_and_the_simplified_engine_on_the_same_path_is_not ( prepared,
config,
layer_x )
The check can fail: it is the card that makes the cockpit agree, not the path.

Definition at line 150 of file test_layerx_cockpit_parity.py.

References _cockpit().

◆ test_layer_x_totals_its_own_burn_as_the_report_does()

test_layerx_cockpit_parity.test_layer_x_totals_its_own_burn_as_the_report_does ( prepared,
layer_x )
Layer X keeps its own summary (engine/layerx/analysis.py); the totals in it are the same
arithmetic as feedtwin.session.report's -- right-endpoint impulse, O/F and Isp from what was
burned -- so a number quoted by either tool is the same number.

Definition at line 157 of file test_layerx_cockpit_parity.py.

◆ test_the_cockpit_firing_enginedesigns_card_is_layer_xs_burn()

test_layerx_cockpit_parity.test_the_cockpit_firing_enginedesigns_card_is_layer_xs_burn ( prepared,
config,
layer_x )

Definition at line 129 of file test_layerx_cockpit_parity.py.

References _cockpit(), _table(), and max.

Variable Documentation

◆ AGREE

int test_layerx_cockpit_parity.AGREE = 3e-3

Definition at line 49 of file test_layerx_cockpit_parity.py.

◆ feedtwin

test_layerx_cockpit_parity.feedtwin = pytest.importorskip("feedtwin", reason="lib/feedtwin is not installed (pip install -e ../lib/feedtwin)")

Definition at line 28 of file test_layerx_cockpit_parity.py.

◆ FIXTURE

str test_layerx_cockpit_parity.FIXTURE = Path(__file__).parent / "fixtures" / "ethalox_6500N_doublet_cad_2026-09-28.yaml"

Definition at line 38 of file test_layerx_cockpit_parity.py.

◆ GN2

str test_layerx_cockpit_parity.GN2 = "copv_study_gn2"

Definition at line 39 of file test_layerx_cockpit_parity.py.

◆ pytestmark

test_layerx_cockpit_parity.pytestmark
Initial value:
1= pytest.mark.skipif(
2 not (shipped_drawings_dir() / f"{GN2}.json").is_file(),
3 reason="feed-twin's shipped drawings are not next to this checkout",
4)

Definition at line 41 of file test_layerx_cockpit_parity.py.