# ResonanT4 Simulation Artifacts v1.2.0

Working copy. Release v1.0.0 (`../resonant4-simulations-v1.0.0/`) reproduces Paper II
Figures 1-8; v1.1.0 adds the Section 10.4 instrumentation and changes none of that output;
v1.2.0 adds a corrected inference protocol for Section 10.4 and changes none of the earlier
output either. Both released files are kept here, so every figure this paper has published
stays reproducible.

## What v1.1.0 added

- `isi_cv()`: coefficient of variation of the inter-event interval. A drive-independent
  organisation metric, so drives of different spectral character can be compared.
- `drive_rms`: exact power matching across drive shapes. The amplitude parameter `A` is
  not a power; a sine at amplitude A has mean square A^2/2, broadband has A^2.
- Drive types `scrambled` (carrier at f0 with phase re-randomised every `scramble_tau`
  seconds) and `dc` (steady bias).
- `--efficiency`: minimum drive power to reach a fixed, drive-independent target, per arm.
- `--coherence`: fixed power and centre frequency, varying drive coherence time.

## What v1.2.0 adds, and why

`--efficiency` compares driven runs against a target fixed at 90% of a **single** undriven
realisation, and records the first power level to dip below it. Independent review found that
rule unsound. Between-seed spread in the undriven baseline is 0.191 +/- 0.016 over 400
realisations, the same order as the 10% effect being detected, and no crossing has to persist.
Substituting an arm that carries no drive at all, the rule reports the target reached in 3 of
40 baseline seeds.

`--efficiency-paired` is the corrected protocol. `--efficiency` is left exactly as it was.

- **Paired baseline.** Every driven run is divided by an undriven run at its own seed.
- **Sustained crossing.** A crossing counts only across two consecutive swept powers. The run
  is deliberately local rather than extending to the sweep limit: the coherent arm is
  non-monotone and loses the target at high power, where over-driving destroys regularity,
  so a persist-to-the-top rule inverts the comparison.
- **Bootstrap intervals** on the crossing power, over seeds.
- **A null arm**, an undriven run carried through the identical pipeline.

## Reproducing Section 10.4

```bash
python plasmoid_entrainment_sim-v1.2.0.py --efficiency-paired --outdir eff_run
python plasmoid_entrainment_sim-v1.2.0.py --coherence --outdir eff_run
```

Defaults: 24 seeds, 2000 resamples, T=200s, dt=0.01, noise 0.12, threshold drive mode.
The paired run takes a few minutes because it carries an undriven partner per seed.

Expected, for a target of 10% reduction in ISI CV against each run's own baseline:

| Arm | Min power | Relative | 95% CI | Never reached |
|---|---:|---:|---|---:|
| coherent at f0 | 0.00202 | 1x | [0.00202, 0.0036] | 0% |
| off-resonant (1.6 f0) | 0.0784 | 38.7x | [0.0784, 0.0784] | 0% |
| scrambled at f0 | not reached | >60x | | 98.6% |
| broadband | not reached | >60x | | 100% |
| dc | not reached | >60x | | 99.0% |
| **null (no drive)** | not reached | >60x | | 100% |

The scrambled arm is the load-bearing comparison: same centre frequency, same power. It is
**not** spectrum-matched, and no stronger match is available, because coherence time and
bandwidth are conjugate.

Section 10.4.1, where the drive is coupled so that it does work on the state:

```bash
python plasmoid_entrainment_sim-v1.2.0.py --efficiency-paired --drive-mode additive \
  --eff-rms 0.02,0.05,0.08,0.12,0.17,0.24,0.32,0.45,0.60,0.80,1.10,1.50
```

| Arm | Min power | Relative |
|---|---:|---:|
| dc | 0.0064 | **0.22x** |
| coherent at f0 | 0.0289 | 1x |
| off-resonant, scrambled, broadband | not reached | >78x |

A steady bias reaches the target 4.5x more cheaply than coherent drive here, which fails the
kill criterion Section 10.4 states in advance. ISI CV is drive-independent but not invariant
to the operating point: constant drive raises the loading rate and steepens the ramp to
threshold, taking the event count from 106 undriven to 417 while the coherent arm reaches 134.
Note that `additive` and `parametric` coincide at the default `a = 1.0`.

Coherence sweep at fixed power 0.0100, mean inter-event interval 1.87s:

| tau_c | 0.3s | 3s | 7s | 30s | pure sine |
|---|---:|---:|---:|---:|---:|
| ISI CV | 0.215 | 0.186 | 0.150 | 0.110 | 0.109 |

Monotone in tau_c, so the scrambled result is not an artifact of the scramble period.
At short coherence the drive leaves the system less regular than no drive at all.

## Reproducing the superseded v1.1.0 figures

```bash
python plasmoid_entrainment_sim-v1.1.0.py --efficiency --outdir eff_v110
```

Gives coherent 0.0036, off-resonant 21.8x, and the rest not reached beyond 34x, as reported
in v1.2.0 and v1.2.1 of the paper. `--efficiency` in v1.2.0 returns the same values.

## Limits

A gated relaxation-oscillator proxy. No magnetic field, no helicity, no Taylor state.
It shows that where relaxation proceeds through intermittent events, drive coherence buys
organisation that drive power does not, in gated coupling and among timed drives. Whether
that transfers to plasma is unmeasured.
