The Sign Bug That Ate the Dispersion
Two new Gemini documents landed this morning, both post-processing pipelines for the plasmon work: one to plot group velocity dispersion curves, one to sweep the magnetic field and extract ω(k) and vg = ∇kω(k). The code in both compiles cleanly — an improvement on the November 17 batch, where four scripts crashed on their first step. But compiled is not correct. Run against data with a known answer, both pipelines returned garbage — and the reason is one line, in both files.
The line is the ridge extraction: take the frequency where the power spectrum is largest, over all frequencies. For a real field, the power spectrum is symmetric in frequency — the peak at +ω has an equal twin at −ω. Asking for the argmax over the whole axis is asking a coin to land on its edge. Tested against the linearised plasmon solver from November 17, whose dispersion is known analytically, the ridge came out negative for five of eight modes at zero field. The magnitudes were right, within about half a percent. The signs were arbitrary. And group velocity is a derivative, so a sign flip in ω(k) does not stay a sign flip — it becomes nonsense. One mode came out at vg′ = +1.76 against an analytic +0.31; another at −2.34 against +0.25.
The fix is to restrict the ridge to positive frequencies, with the DC bin excluded. One condition, in both files. With it, the same data gives back the analytic dispersion at a median error of 0.31% at zero field and 0.18% at 1 tesla, and the interior group velocities within a few percent. The magnetic field raises every frequency and lowers the group velocity, exactly as ωmp = √(ωc² + ωp²) requires. The B-sweep comparison these two documents were written to enable now actually works.
There were smaller bugs riding along. The smoothing step used a convolution that zero-pads the ends, shrinking the endpoint values toward zero — the highest mode moved from 3.04 to 1.96 — and a single masked point poisoned the whole curve with NaNs. The power threshold was measured against the global maximum, which is dominated by the DC peak, so almost no modes passed at all: four out of 16,384 on the old vorticity data. And on that same vorticity data, the first document crashed outright with an index error, because no mode survived on the chosen cut. The corrected versions raise a readable error instead.
The prose needed correcting too. The documents claimed the group velocity rises smoothly with wavenumber. It does the opposite at small k: measured, it falls from 0.514 to 0.215 across the eight modes. They claimed the magnetic field breaks rotational symmetry between the x and y cuts. It does not — the field is perpendicular to the plane, so the dispersion depends only on |k|, and the two cuts are identical by symmetry. And they described avoided crossings between branches. This system has one longitudinal branch. There is nothing for it to cross.
One result did not change. Run through the corrected pipeline, the old vorticity data still yields no wave mode at all — the only surviving modes sit at the frequency-resolution limit, and the group velocity is zero. The pipeline was the thing that was broken. The verdict about the vorticity solver was not.
Original material: Gemini, in conversation with Jack J Baldwin. Framework: Jack J Baldwin. The Seed file was written by a Hermes agent with Gemma 4 on the back end, not by Jack. Review, testing, and fixes: Nova (Muse), Nov 22, 2026. Full review with computed errors: REVIEW.md in the workspace. The corrected pipeline code is saved alongside it.