RULES_phase_test.txt -- test 3: "exclusively in positive phases": can that test fail?
Written 2026-11-18 ~18:55 UTC, before any band-pass, wavelet or phase was computed on any event list.

The paper (p. 4, eq. 1) turns the 37 S-flares into a binary series and (p. 17-19) takes the 1.7 and
7.3-year periodicities from that series' wavelet spectrum (Torrence & Compo 1998; Figure 6), then
trains an LS-SVM on "the 1.7- and 7-year solar oscillations derived from wavelet analysis for
1978-2017 (Figure 6)" (p. 20) and calls windows where both are positive "high-probability" (p. 20-21).
It gives no code, no wavelet parameters beyond the algorithm, no band limits beyond the peak widths
(1.7 +- 0.2, 7.3 +- 1 years) and no LS-SVM settings. So we emulate the nearest simple version,
labelled as ours, and test whether the extraction alone makes events fall in positive phases.

1. Series. Daily, from 1975-01-01 to 2025-11-30 (the paper's catalog span). S(t) = 1 on the date of
   an S-flare, 0 otherwise. Main event set E37 (events_sflares.csv); variant E39 (+2024-05-14,
   +2024-05-20). Mean removed; zero-padded to the next power of two (as Torrence & Compo do).

2. Extraction. Morlet wavelet, omega0 = 6, Torrence & Compo (1998) continuous transform by FFT,
   scale spacing dj = 1/12, Fourier period = 1.033 x scale. Band component = the T&C reconstruction
   (their eq. 11) summed over the scales whose Fourier period lies in the band. Main bands:
   B17 = [1.5, 1.9] years, B7 = [6.3, 8.3] years (the paper's peak widths). Variants: narrow
   (the single scale nearest 1.7 and 7.3 years) and wide ([1.4, 2.0] and [6.0, 9.0] years).
   "Positive phase" = component > 0 at the event's date. "Joint positive" = both > 0.
   The share of record time that is joint positive is also reported.

3. Statistic. k = number of events in joint positive phase; f = k/N; also the indicator k = N
   ("all events in joint positive phases", the paper's claim for S-flares: p. 21, p. 25).

4. Null for S-flares (does the extraction alone produce the result?). Episodes as in
   RULES_base_rates.txt (30 days or same region). Each draw moves every episode as a block, keeping
   the spacing of its flares. Null J (main): independent uniform shift in [-2, +2] years per episode
   (redrawn if any flare would leave the series). Null U: each episode placed uniformly at random in
   the series. For each draw the two components are re-extracted from the randomized series itself
   and k is counted. 10,000 draws each, seed 20261118. Reported: the distribution of f, P(k = N),
   and P(f_null >= f_obs).
   Reading fixed now: if P(k = N) or P(f_null >= f_obs) under the nulls is large (say > 0.2), the
   "exclusively positive" result is largely produced by the extraction and is not evidence for a
   real modulation; if it is small (< 0.05), the result is not explained by the extraction alone.

5. GLEs against S-flare oscillations (the fairer test). GLE dates: events_gle.csv (Oulu list as
   used by /rieger-tidal-periods/). In-span GLEs: those in [1975.0, 2025.92). Components fixed as
   extracted from the real E37 series (main bands). Statistic k_G = GLEs in joint positive phase.
   Also for the subset of GLEs more than 3 days from every S-flare ("GLEs that are not S-flare
   days"). Null G: GLE episodes (30-day rule) shifted uniformly in [-2, +2] years, components fixed,
   10,000 draws; P(k_G,null >= k_G,obs). Expected share under no relation = the joint-positive share
   of record time.

6. Out-of-span GLEs and the forward windows (emulation of the projection, clearly not the paper's
   LS-SVM). Fit each real E37 component over 1978.0-2017.0 with one sinusoid (period free within
   the band, least squares) and extend it from 1942 to 2035. Report (a) how many of GLE 1-26
   (1942-1973; GLE 1-4 dates from the paper's Table 4, GLE 5-26 from events_gle.csv) fall in joint
   positive phase of the extension, against the extension's joint-positive time share; (b) the
   joint-positive windows of the extension for 2025-2035, next to the paper's A-F.

7. Internal consistency of A-F (arithmetic on the paper's numbers, no data). Whether six windows of
   0.7-0.9 years spaced about 1.7 years apart over 2025.7-2034.9 can all be joint-positive phases of
   a 7.3-year oscillation (positive about half of each 7.3 years): reported as the windows' coverage
   versus the joint-positive share expected from two oscillations.

8. Time box: about two hours. Whatever is not run is reported as not run.
