FUSION merge-window replay — scpn_mif_core.physics.fusion_merge_window_replay¶
Surface: MIF-side replay of a sampled SCPN-FUSION-CORE FRC compression stroke through the existing merge-trigger and Faraday-recovery path.
The replay fixture keeps the ownership split explicit:
- FUSION owns the FRC compression trajectory and FUS-C.6 status hooks.
- MIF consumes the sampled time, radius, radial-velocity, magnetic-field, and field-rate channels as prescribed inputs.
- The replay validates MIF wiring over that contract; it is not an external Slough Fig. 5 digitised-trajectory parity claim.
The committed fixture is
tests/fixtures/physics/fusion_merge_window_replay.json. It records the sibling
FUSION commit used to produce the stroke, whether that checkout was dirty, the
dirty paths observed at generation time, the source campaign, and the claim
boundary. The field-rate channel is the finite difference of FUSION's
B_ext(t) samples because the FUS-C.6 state exposes field values rather than a
time derivative.
Public Python API¶
Replay FUSION-owned compression strokes through the MIF merge trigger.
The module keeps the repository boundary explicit: SCPN-FUSION-CORE owns the FRC compression trajectory, while this package consumes the sampled radius, velocity, and magnetic-field channels as prescribed inputs to the existing MIF merge-trigger and Faraday-recovery path.
FusionCompressionStroke(*, time_s, radius_m, radial_velocity_m_s, magnetic_field_T, magnetic_field_rate_T_s)
dataclass
¶
Sampled FUSION compression trajectory consumed by MIF.
Parameters¶
time_s : ArrayLike Strictly increasing sample times in seconds. radius_m : ArrayLike Positive separatrix radius samples in metres. radial_velocity_m_s : ArrayLike Radial velocity samples in metres per second. magnetic_field_T : ArrayLike External magnetic-field samples in tesla. magnetic_field_rate_T_s : ArrayLike Magnetic-field rate samples in tesla per second.
Create a validated sampled compression stroke.
expansion_trajectory()
¶
Return the MIF merge-trigger expansion input for this stroke.
FusionMergeWindowFixture(schema, provenance, stroke, expected)
dataclass
¶
Pinned FUSION-stroke replay fixture with provenance and expected output.
magnetic_field_rate_from_samples(time_s, magnetic_field_T)
¶
fusion_merge_window_scenario(stroke)
¶
Build the MIF merge-window scenario driven by a FUSION stroke.
evaluate_fusion_merge_window_stroke(stroke)
¶
Evaluate the MIF merge-trigger decision over a FUSION compression stroke.
fusion_merge_window_payload(report, stroke, *, source, field_rate_channel)
¶
Return a JSON-safe summary for a FUSION-driven merge-window replay.
load_fusion_merge_window_fixture(path)
¶
Load a pinned FUSION merge-window replay fixture from JSON.
Validation¶
The replay tests load the pinned JSON fixture, reconstruct the typed compression stroke, evaluate the real MIF merge-trigger pipeline, and compare the resulting JSON-safe summary to the pinned expected payload. They also verify the finite difference field-rate channel and invalid replay-channel failures.