Auto-Research PipelineA durable, human-gated pipeline for computational research

← All examples

Research runce7d9f527492· 24 October 2026

Does the solar activity cycle keep time like a clock, or does its phase perform a random walk? A likelihood test on sunspot-cycle minima epochs in the SILSO v2.0 record with propagated measurement uncertainty

CompleteArchived runPhysics · Modelled on Physical Review Letters

Paper

Phase Diffusion, Not a Clock: A Calibrated Likelihood Test of the Sunspot-Cycle Phase

Abstract

We fit 25 SILSO v2.0 minimum epochs by restricted maximum likelihood (random walk, white jitter, propagated errors). Since 1823 the step is 0.88 yr per cycle (68%: 0.69–1.06); earlier cycles scatter more (p = 0.016), giving 1.17 yr overall. No Gaussian-jitter clock replicate of 2×10⁶ reaches the observed likelihood ratio, nor of 10⁶ with amplitude-driven shifts removed (step 0.87 yr if amplitudes are exogenous) or a lost cycle added. Jitter < 0.63 yr and locking slower than 28 yr stay allowed; marker, era and correction change the diffusion coefficient 2–4× from its full-record value.

Is the sunspot cycle paced by a hidden chronometer? Dicke concluded from about 25 maxima that it is [1] and later revisited the phase variations [2]; Hoyng found the record too short to decide [3]. Tidal synchronization at an 11.07-yr period has been modelled and is still advocated [4,5], although its earlier evidence rests on a series that imposes nine cycles per century [6], and dynamo models synchronize only under very strong forcing [7]. Weisshaar et al. [8] rejected the clock at 95% with 28 sunspot cycles and beyond 99% with 84 ¹⁴C cycles, whose Eddington–Plakidis fit [9] gave an accumulating amplitude of 1.9 yr per cycle and a negligible clock term.

A self-sustained oscillator driven by noise has a diffusing phase [10–13]; one entrained by a pacemaker keeps a bounded phase error [12]. For the telescopic record, published tests are moment ratios [1,8]. We add a joint likelihood estimate of both noise amplitudes with intervals, propagated epoch errors, calibrated boundary tests, a bound on a restoring force, and a test of amplitude-dependent shifts of the minima [14]. We reject a pure clock with or without those shifts and find a random-walk phase with a step of 0.88 yr per cycle since 1823 and no detectable white jitter; how fast the phase diffuses differs 2–4-fold from the full-record value depending on how it is defined.

Keywordssolar cyclephase diffusionrandom walknoisy oscillatorslikelihood-ratio testsunspot number

§Ask about this paper

Grounded in this run

Questions are answered from this run's record — the paper, the executed analysis, the data provenance and the referee report. Nothing else is consulted.

This run is finished, so the recorded paper cannot be rewritten. Questions are still answered from its record.

Pipeline

1.Literature review

Attempt 3Done

Literature review complete (live:agent:claude-opus-5-5): 10 key papers, 66 grounded sources, 5 open gaps.

Summary

Whether the roughly 11-yr sunspot cycle is paced by a clock or performs a random walk of phase is a 45-year-old question with a thin literature. In the clock picture an external or internal pacemaker (planetary tides, a high-Q internal oscillator) fixes the phase, so the observed epochs of minima or maxima scatter about a linear ephemeris with bounded, non-accumulating jitter and successive cycle lengths are anticorrelated. In the random-walk picture the cycle is a self-sustained dynamo oscillator perturbed by noise: timing errors accumulate, the O-C diagram wanders diffusively and cycle lengths form a renewal sequence. Dicke (1978) used about 25 maxima and a ratio of mean-square residual to mean-square successive difference (expectation 1/2 for a clock, n/15 for a random walk) and concluded in favour of a chronometer. Gough and Hoyng (1996) argued the record is too short and that alpha-effect fluctuations explain apparent phase memory. The closest recent work, Weisshaar, Cameron and Schussler (2023), corrected Gough's variance-ratio statistic and with Monte Carlo percentiles rejected the clock at 95% from 28 sunspot cycles and beyond 99% from 84 cycles reconstructed from annual 14C; an Eddington-Plakidis fit to the 14C minima gave an accumulating amplitude of 1.9 yr per cycle and a negligible clock amplitude. Proponents of tidal synchronization (Stefani et al. 2019, 2021, 2023) maintain that an 11.07-yr phase-stable period is compatible with the data; Nataf (2022) showed that their earlier evidence rests on Schove's series, built by imposing nine cycles per century. Dynamo theory predicts noisy limit-cycle behaviour (Cameron and Schussler 2017, 2019; Charbonneau 2020), although flux-transport models with a meridional-flow clock show some phase locking (Charbonneau and Dikpati 2000). PRL work has treated the cycle as a stochastic relaxation oscillator or a driven nonlinear oscillator (Mininni et al. 2000, 2002; Palus and Novotna 1999) but not as a test of phase memory. Methodologically the field relies on moment ratios with simulated percentile bands and reports only rejection levels; the noise amplitudes, their intervals, and the measurement uncertainty of each epoch are not propagated. The natural statistical model is a linear Gaussian model with two variance components (random-walk step and white jitter) plus known measurement variances, fitted by restricted maximum likelihood; because each null lies on a boundary of a single correlated series, the chi-square mixture is unreliable (Crainiceanu and Ruppert 2004; Shephard and Harvey 1990) and the test must be calibrated by simulation, with KPSS-type locally best invariant tests as distribution-light cross-checks. The SILSO v2.0 monthly record supplies station dispersions and observation counts from 1818, from which the monthly standard error sigma/sqrt(N) follows, while the 18th-century data are sparse and include a probably lost cycle in 1793-1800. A physics reading of the question, whether the dynamo is phase-locked or free-running and what its phase-diffusion coefficient, coherence time and quality factor are, has not been quantified with statistical and systematic uncertainties.

Key papers (10)

  1. Is there a chronometer hidden deep in the Sun?. R. H. Dicke, Nature 276, 676, 1978.
    Original clock-versus-random-walk test on about 25 sunspot maxima since 1705; introduced the Dicke ratio (expectation 1/2 for a clock, n/15 for a random walk) and concluded in favour of an internal chronometer.
  2. Is the solar cycle timed by a clock?. P. Hoyng, Solar Physics 169, 253, 1996.
    Argued the record is too short to demonstrate phase memory, that alpha-effect fluctuations in mean-field theory explain the apparent memory, and that no extra timing device is needed.
  3. No evidence for synchronization of the solar cycle by a 'clock'. E. Weisshaar, R. H. Cameron, M. Schussler, Astronomy & Astrophysics 671, A87, 2023.
    Closest prior work: corrected Gough variance-ratio test with Monte Carlo percentiles rejects the clock at 95% (28 sunspot cycles) and beyond 99% (84 cycles from 14C); Eddington-Plakidis fit gives a 1.9-yr accumulating amplitude for 14C. No joint estimate of both amplitudes with intervals from the sunspot record and no propagated epoch uncertainty.
  4. No evidence for absence of solar dynamo synchronization. F. Stefani, J. Beer, T. Weier, Solar Physics 298, 2023.
    Current statement of the tidal-synchronization claim: a phase-stable 11.07-yr period (Venus-Earth-Jupiter spring tides) is said to be compatible with the 14C-inferred cycles; the hypothesis a clock test must confront.
  5. Tidally synchronized solar dynamo: a rebuttal. H.-C. Nataf, Solar Physics 297, 107, 2022.
    Shows that the earlier clock evidence (Dicke ratio on Schove's series) is invalid because that series imposes nine cycles per century; also shows MHD instabilities can produce nearly clocked series.
  6. Irregularities of period of long-period variable stars. A. S. Eddington, S. Plakidis, Monthly Notices of the Royal Astronomical Society 90, 65, 1929.
    Canonical decomposition of period noise into accumulating (random-walk) and non-accumulating (clock-type) parts; the nested likelihood model is its likelihood-based generalisation.
  7. Understanding solar cycle variability. R. H. Cameron, M. Schussler, The Astrophysical Journal 843, 111, 2017.
    Shows that solar-cycle variability is captured by a weakly nonlinear limit cycle driven by noise, the physical model behind phase diffusion.
  8. Uncertainties in the sunspot numbers: estimation and implications. T. Dudok de Wit, L. Lefevre, F. Clette, Solar Physics 291, 2709, 2016.
    First thorough estimate of sunspot-number uncertainties: Poisson-like errors with a time- and observatory-dependent multiplicative coefficient; basis for an error model where SILSO lists no dispersion (before 1818).
  9. A solar cycle lost in 1793-1800: early sunspot observations resolve the old mystery. I. G. Usoskin, K. Mursula, R. Arlt, G. A. Kovaltsov, The Astrophysical Journal 700, L154, 2009.
    Butterfly-diagram evidence that the 1784-1798 cycle 4 contains a lost short cycle; the largest known systematic in early minimum epochs and a reason to test sensitivity to the pre-1823 record.
  10. Likelihood ratio tests in linear mixed models with one variance component. C. M. Crainiceanu, D. Ruppert, Journal of the Royal Statistical Society B 66, 165, 2004.
    Shows the 50:50 chi-square mixture for boundary variance-component tests holds only when the data split into many i.i.d. subvectors; for a single correlated series the null distribution must be computed exactly or by simulation.

Methods in use

  • Observed-minus-calculated (O-C) diagrams of cycle minimum or maximum epochs against a fitted linear ephemeris t_0 + nP
  • Moment-ratio tests of clock versus random walk: Dicke's ratio of mean-square residual to mean-square successive difference, and the corrected Gough variance ratio S (expectations 7/12 for a clock, N/12 for a random walk), compared with Monte Carlo percentile bands
  • Eddington-Plakidis least-squares fit of the mean accumulated phase error u_x = 2 alpha^2 + epsilon^2 x (1 - x/M), separating non-accumulating and accumulating timing noise
  • Epoch extraction from the 13-month tapered running mean (SILSO standard) or from a tapered 24-month-FWHM Gaussian filter and cycle-shape fits (Hathaway 2015; Hathaway et al. 1994, 2002)
  • Linear Gaussian models with variance components (structural time series: random-walk plus white noise with a linear trend) fitted by restricted maximum likelihood
  • Boundary likelihood-ratio tests for variance components, with chi-square mixtures (Chernoff; Self-Liang) or finite-sample parametric-bootstrap calibration
  • Locally best invariant (Nyblom-Makelainen, KPSS) stationarity tests and moving-average unit-root tests as distribution-light checks of a random-walk component
  • Phase-diffusion characterisation of noisy oscillators: diffusion coefficient, correlation (coherence) time and quality factor; Allan-variance separation of white phase noise from random-walk phase
  • Measurement-error propagation for monthly sunspot means using the SILSO standard error sigma/sqrt(N) and Poisson-like error models

Open gaps

  • No analysis of the telescopic record estimates the random-walk step and the clock jitter jointly, with intervals, while propagating the measurement uncertainty of each minimum epoch; without that uncertainty the clock jitter is not identified.
  • Sunspot-record significance has been reported only as at least 95% from moment ratios; a likelihood-ratio test should be more powerful, but its boundary null makes the chi-square mixture unreliable, and a finite-sample calibration with enough replicates to resolve the quoted significance is missing.
  • Phase locking with a finite restoring time (mean-reverting phase), which interpolates between clock and random walk, has never been bounded; a lower limit on that relaxation time is what tidal-synchronization models would have to satisfy.
  • The phase-diffusion coefficient, coherence time and spectral quality factor of the dynamo oscillator have not been quoted with separate statistical and systematic uncertainties.
  • Sensitivity of the amplitude estimates to epoch-extraction choices (smoothing kernel, sub-month interpolation, pre-1818 error model) and to the doubtful early record (probable lost cycle 1793-1800, ambiguous 1810 minimum) is unquantified, as is the goodness of fit of the Gaussian phase model itself.
Grounded search sources (66) · mode: live:agent:claude-opus-5-5

2.Ideation

Attempt 2Done

3 candidate ideas generated; selected: “Phase diffusion versus phase locking of the solar dynamo: a boundary-calibrated likelihood test on the SILSO v2.0 minimum epochs with propagated measurement uncertainty”.

  1. Idea 1Selected

    Phase diffusion versus phase locking of the solar dynamo: a boundary-calibrated likelihood test on the SILSO v2.0 minimum epochs with propagated measurement uncertainty

    Hypothesis. The solar cycle is a free-running noisy oscillator whose phase performs a random walk: the epochs of sunspot-cycle minima carry an accumulating per-cycle phase step sigma_w > 0, and no non-accumulating (clock) jitter sigma_c is detectable beyond the propagated measurement error of each epoch. Equivalently, a strict clock (sigma_w = 0: Dicke's chronometer, or synchronization with white jitter) is rejected, the pure random walk (sigma_c = 0) is not, and any restoring force that pulls the phase back to a fixed ephemeris acts over more than a few cycles.

    Dataset. SILSO monthly mean total sunspot number, version 2.0 sidc_sunspot_monthly

    Test plan, novelty and risk

    Test plan. Data: SILSO v2.0 monthly mean total sunspot number; keep definitive, non-missing months (January 1749 onward) and report the count. Measurement error: monthly standard error sigma/sqrt(N) from the listed dispersion and observation count (1818 onward); for months without them, a Poisson-like model SE^2 = kappa^2 (SN + c) fitted with relative weights on 1818-1847 and inflated by f = 2 before 1818. Epochs: minima of the SILSO 13-month tapered running mean, each the lowest value in a +/-36-month window, refined to sub-month precision by a parabola through the three lowest months (tied flat runs take the run centre), checked month by month against the SILSO table of minima; the epoch uncertainty s_n is propagated by 1000 Monte Carlo replicates of the monthly series perturbed by its standard errors. Model: t_n = t_0 + nP + sum_{i<=n} w_i + c_n + m_n with w ~ N(0, sigma_w^2) (random walk of phase), c ~ N(0, sigma_c^2) (clock jitter) and m ~ N(0, s_n^2) (measurement), fitted by restricted maximum likelihood on the first differences, which removes t_0 while P is profiled by generalised least squares. Estimators: REML sigma_w with profile-likelihood 68% and 95% intervals (exact chi-square interval for sigma_c = 0 as a check), P with its GLS standard error. Tests: likelihood ratios for the clock null (sigma_w = 0) and the random-walk null (sigma_c = 0), both on the parameter boundary, so calibrated by parametric bootstrap (2 x 10^6 and 2 x 10^4 replicates) on a vectorised likelihood grid, with the pile-up at zero and the tail compared against the 50:50 chi-square mixture and a check that the null does not depend on the nuisance jitter; a Neyman-calibrated one-sided 95% upper limit on sigma_c; a phase-locking generalisation phi_n = a phi_{n-1} + eta_n (a = 0 clock, a = 1 random walk) with a Neyman-calibrated 95% lower limit on a and the implied relaxation time -P/ln a. Model-light cross-checks with simulated nulls (10^6 each): the KPSS stationarity statistic, Dicke's ratio, the lag-1 autocorrelation of cycle lengths, and the phase structure function S(k) = <(t_{n+k} - t_n - k Lbar)^2> for k = 1-12. Goodness of fit: Shapiro-Wilk and Ljung-Box on the standardised innovations, and leave-one-epoch-out influence. Systematics: Hathaway's tapered 24-month-FWHM Gaussian kernel, month-quantised epochs, error-model inflation f = 1 and 4, and no measurement error, combined in quadrature; subsamples: minima from 1823 (only epochs with SILSO dispersions) and cycle maxima; a variance-homogeneity test of the pre-1823 versus post-1823 cycle lengths. Physical quantities: phase-diffusion coefficient D_phi = 2 pi^2 sigma_w^2 / P^3 (with <dphi^2> = 2 D_phi t), coherence time tau_c = 1/D_phi, quality factor Q = pi tau_c / P and timing precision sigma_w/P, each with statistical and systematic uncertainty. Refutation: the hypothesis fails if the calibrated clock test gives p >= 0.01, if the random-walk null is rejected at p < 0.05 (a significant non-accumulating component), or if the fitted model fails its goodness-of-fit tests.

    Novelty. Earlier work used moment ratios (Dicke 1978; Gough; Weisshaar et al. 2023) and reported only rejection levels, about 95% for the sunspot record. Here the accumulating and non-accumulating amplitudes are estimated jointly by likelihood, with intervals, while the measurement uncertainty of every epoch is propagated from SILSO's own dispersions. The boundary tests are calibrated exactly in finite samples, not with the chi-square mixture, which fails for a single correlated series. A phase-locked oscillator with a finite restoring time is bounded, which is the quantity tidal-synchronization models must satisfy, and the dynamo is characterised by measured phase-diffusion coefficient, coherence time and quality factor with statistical and systematic errors.

    Expected outcome. sigma_w near the 1.2-yr dispersion of cycle lengths reported by Hathaway et al. (2002); a clock rejected far beyond the 95% level of the moment tests; sigma_c consistent with zero with an upper limit of a fraction of a year; a quality factor of order ten, i.e. phase coherence lost within a few cycles; insensitivity to the smoothing and error-model choices, with possible extra scatter in the sparse 18th-century record.

    Main risk. Only 25 epochs; the 18th-century minima rest on few observers and cycle 4 (1784-1798) may hide a lost cycle, so the random-walk step may differ between eras. Smoothed minima are a definition-dependent phase marker (cycle overlap and the Waldmeier effect shift them), and the measurement model cannot capture correlated errors from interpolated early months.

  2. Idea 2

    Amplitude-phase coupling of the solar dynamo: does the per-cycle phase step scale with inverse amplitude as for an additively forced limit cycle?

    Hypothesis. For a weakly nonlinear limit cycle driven by additive noise, phase diffusion scales as noise variance over squared amplitude, so the variance of the cycle-length deviation is larger for weak cycles: Var(L_n - P) is proportional to 1/A_n^2, where A_n is the smoothed maximum of cycle n.

    Dataset. SILSO monthly mean total sunspot number, version 2.0 sidc_sunspot_monthly

    Test plan, novelty and risk

    Test plan. Same SILSO v2.0 minima and epoch uncertainties as above; A_n is the maximum of the 13-month smoothed series between successive minima. Fit a heteroscedastic random walk with sigma_w,n = sigma_0 (A_n / A_bar)^(-gamma) by REML and estimate gamma with a profile-likelihood interval; test gamma = 1 (additive-noise limit cycle) and gamma = 0 (amplitude-independent diffusion) with parametric-bootstrap calibration; control for the Waldmeier shift of minima by repeating with the 24-month Gaussian kernel. The hypothesis is refuted if gamma = 1 is excluded at 95% or if the gamma interval is consistent only with zero.

    Novelty. Amplitude-period anticorrelation is documented, but the scaling of phase diffusion with amplitude, which separates additive from multiplicative noise in normal-form dynamo models (Cameron and Schussler 2017), has not been measured from timing data with intervals.

    Expected outcome. A positive but imprecise gamma; with 24 cycles the interval is likely to include both 0 and 1, giving a power estimate for future 14C-based work.

    Main risk. Twenty-four cycles give little leverage on a variance exponent, and amplitude and minimum timing are coupled through cycle overlap, which can bias gamma.

  3. Idea 3

    Line shape of the Schwabe peak: is the 11-yr spectral line of the monthly sunspot number as broad as the timing phase diffusion implies?

    Hypothesis. If the cycle is a phase-diffusing oscillator, the 11-yr peak of the sunspot-number power spectrum is a Lorentzian whose quality factor equals the timing-derived Q = pi tau_c / P, with no additional broadening from amplitude modulation at the level of the measurement errors.

    Dataset. SILSO monthly mean total sunspot number, version 2.0 sidc_sunspot_monthly

    Test plan, novelty and risk

    Test plan. Compute the multitaper spectrum of the square-root-transformed monthly sunspot number (definitive months, 1749 onward), fit a Lorentzian plus red-noise background to the 11-yr band by Whittle likelihood, and estimate Q with a parametric-bootstrap interval; compare with Q derived from the minimum epochs. The hypothesis is refuted if the spectral Q is significantly smaller than the timing Q, meaning amplitude modulation dominates the line width.

    Novelty. Links two observables usually studied separately, cycle timing and spectral width, through one phase-diffusion parameter.

    Expected outcome. A spectral Q of order 10, broadly consistent with the timing value but with a larger interval because the record spans only about 25 cycles.

    Main risk. The sunspot number is a rectified, non-sinusoidal signal, so harmonics and amplitude modulation broaden the line, and a 275-yr record barely resolves a line of width 1/(Q P).

Ranking rationale

Idea 0 answers the posed question directly: it is a sharp, falsifiable likelihood test of clock versus random walk, with finite-sample calibration, propagated epoch uncertainty and measured physical parameters, and it runs in well under two minutes. Ideas 1 and 2 are follow-ups that rest on the phase-diffusion parameters idea 0 measures and are weaker in power (idea 1) or in model validity (idea 2).

3.Experimentation

Attempt 4Done

Experiment succeeded in 1 round (61.342s).

Reviewer feedback applied: Editor's consistency revision. The Chinese edition of this study runs the same script on the same data snapshot. At its independent referee's request it added: the test of amplitude-driven shifts of the minimum epoch, with amplitude-corrected fits (sigma_w 1.19 -> 0.87 yr on 24 epochs, conditional on amplitudes being exogenous; the clock rejection strengthens, q 24.35 -> 28.41); the lost-cycle variant (1784-1798 as two cycles); Monte Carlo errors on the Neyman limits from non-overlapping streams; the post-1823 forecast; and the kernel and SILSO-1996 checks. Its executed script is a superset of this edition's. Re-run with it so every number the editions share is identical, and bring this paper into agreement: report the amplitude correction and its exogeneity caveat, the lost-cycle variant, the definition dependence of D_phi (about 2-4x across marker, era and correction), and the Monte Carlo errors on the limits, within the Letter's length. Align the analysis record with the paper (no 'Z > 4.89'; the clock test stated by replicate count; the post-1823 sample leading).
Succeeded1 round · exit 0 · 61.342s

Data provenance

Datasetsidc_sunspot_monthly

SILSO monthly mean total sunspot number, version 2.0

Source
WDC-SILSO, Royal Observatory of Belgium, Brussels
Citation
SILSO, World Data Center (1749-present) Sunspot Number and Long-term Solar Observations. Royal Observatory of Belgium, on-line Sunspot Number catalogue, https://www.sidc.be/SILSO/, DOI: 10.24414/qnza-ac80. Series revision: Clette, F., Svalgaard, L., Vaquero, J.M. and Cliver, E.W. (2014) Revisiting the sunspot number: a 400-year perspective on the solar cycle. Space Science Reviews 186(1-4), 35-103.
Licence
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0). Academic and non-commercial research use is permitted with explicit credit to WDC-SILSO.
File
https://www.sidc.be/SILSO/DATA/SN_m_tot_V2.0.csv
Observations
3,332
Variables (7)
year, month, decimal_year, sunspot_number, sd, n_observations, definitive
Units
sunspot_number is the monthly mean total sunspot number, a dimensionless index. sd is the mean standard deviation of the individual daily values contributing to that month and n_observations the count of observations used, both available only from 1818 onwards. decimal_year is the mid-month date as a fraction of a year. definitive is True for finalised values and False for provisional recent months. The file's -1 missing marker is converted to NaN by the loader.
Retrieved
24 Oct 2026, 04:06
Checksum
sha256 6383f7c67fc2e67e…

Real, publicly available data — downloaded and checksum-verified before the analysis ran, never simulated.

Result (RESULT_JSON)

{
  "n_months": 3327,
  "first_month": 1749.042,
  "last_month": 2026.204,
  "n_months_with_silso_se": 2498,
  "n_zero_dispersion_months": 3,
  "err_model": {
    "kappa": 0.25889294802203006,
    "c": 2.0032084932320005,
    "f_baseline": 2
  },
  "N_epochs": 25,
  "epochs": [
    1755.162,
    1766.42,
    1775.442,
    1784.695,
    1798.319,
    1810.623,
    1823.331,
    1833.887,
    1843.542,
    1855.974,
    1867.225,
    1878.955,
    1890.169,
    1902.062,
    1913.57,
    1923.595,
    1933.739,
    1944.155,
    1954.309,
    1964.778,
    1976.221,
    1986.701,
    1996.386,
    2008.924,
    2019.945
  ],
  "epoch_sd": [
    0.1,
    0.011,
    0.011,
    0.18,
    0.016,
    0.301,
    0.038,
    0.01,
    0.007,
    0.004,
    0.045,
    0.028,
    0.153,
    0.269,
    0.019,
    0.029,
    0.003,
    0.006,
    0.002,
    0.003,
    0.083,
    0.001,
    0.091,
    0.003,
    0.001
  ],
  "silso_diff_months": [
    0.44,
    -0.45,
    -0.2,
    -0.16,
    0.33,
    0.98,
    -0.53,
    0.14,
    0,
    0.19,
    0.2,
    -0.03,
    -0.47,
    0.24,
    0.34,
    -0.36,
    0.37,
    0.36,
    0.21,
    -0.16,
    0.15,
    -0.08,
    -2.87,
    -0.42,
    -0.16
  ],
  "cycle_lengths": {
    "mean": 11.03262739983731,
    "sd": 1.1766810145692224,
    "min": 9.021400335519049,
    "max": 13.623821052631456
  },
  "sw": 1.1660711261813876,
  "sw68": [
    0.991731742740653,
    1.3646169498597711
  ],
  "sw95": [
    0.7734222236798834,
    1.6115575521782808
  ],
  "sw68_exact_chi2": [
    1.0357715610643567,
    1.3969565010547322
  ],
  "sc": 0,
  "sc_ul95_chi2": 0.6478699859715426,
  "sc_ul95_neyman": 0.6157699929401961,
  "P": 11.03255806011324,
  "P_se": 0.23805977538013975,
  "ll_full": -16.81340055878203,
  "ll_clock": -29.44555039483591,
  "ll_rw": -16.813400558819133,
  "sc_clock": 1.7360368990819712,
  "sw_rw": 1.1660698338303588,
  "q_clock": 25.26429967210776,
  "q_clock_grid": 25.26447703373504,
  "B_clock": 2000000,
  "p_clock_boot": 4.99999750000125e-7,
  "z_boot_bound": 4.891638574089865,
  "n_null_exceed": 0,
  "max_q_null": 25.198885640025217,
  "null_frac_q0": 0.5957785,
  "null_q95": 2.401588387889618,
  "null_q99": 5.16584085907746,
  "tail_vs_mixture": {
    "10": {
      "boot": 0.0007205,
      "mixture": 0.0007827011290012741
    },
    "15": {
      "boot": 0.0000605,
      "mixture": 0.00005375558836475028
    },
    "20": {
      "boot": 0.0000055,
      "mixture": 0.000003872108215522042
    },
    "2.706": {
      "boot": 0.041518,
      "mixture": 0.0499856890626296
    },
    "5.412": {
      "boot": 0.0087365,
      "mixture": 0.00999939528593171
    }
  },
  "null_frac_q10_vs_sc_scale": {
    "0.7": 0.00065,
    "1.4": 0.00075
  },
  "p_clock_mixture": 2.499379282111432e-7,
  "z_mixture": 5.026360479721661,
  "q_rw": 7.420908332278485e-11,
  "p_rw_boot": 0.552472376381181,
  "B_rw": 20000,
  "rw_null_frac_q0": 0.4476,
  "neyman_sc": [
    [
      0.3,
      0.5713844302883686,
      0.9356116747563824
    ],
    [
      0.35,
      0.7194908707430798,
      1.1866871567721324
    ],
    [
      0.4,
      0.9261096791501516,
      1.4856925952449085
    ],
    [
      0.45,
      1.1937334772054484,
      1.815535334580209
    ],
    [
      0.5,
      1.5220769502058786,
      1.9307936549047768
    ],
    [
      0.55,
      1.908754663741469,
      2.3267831627314264
    ],
    [
      0.6,
      2.3271657202491056,
      2.4501858412916087
    ],
    [
      0.65,
      2.7380105108672907,
      2.4709856854439725
    ],
    [
      0.7,
      3.206045247725634,
      2.7143982146980465
    ],
    [
      0.75,
      3.7246785955760657,
      2.705542895411742
    ],
    [
      0.8,
      4.287556816614391,
      2.9243864689420027
    ],
    [
      0.85,
      4.888731839548292,
      2.9895628892539707
    ],
    [
      0.9,
      5.485265563387237,
      3.095325781938326
    ],
    [
      0.95,
      6.104272811384057,
      3.180682475854267
    ],
    [
      1,
      6.753971937215937,
      3.1069649873320335
    ]
  ],
  "ar_a_hat": 0.925,
  "ar_2dll_rw_vs_best": 0.06224987988278485,
  "ar_2dll_clock_vs_best": 25.32654955191638,
  "ar_tau_hat_cycles": 12.826837196241176,
  "ar_a_lo95_neyman": 0.6668959144330054,
  "sc_ul95_neyman_note": "interpolated crossing of q_obs and the 95% quantile",
  "ar_tau_lo_cycles": 2.4683965294778636,
  "ar_tau_lo_years": 27.23272802684655,
  "neyman_ar": [
    [
      0.3,
      13.625278861389226,
      2.403602999089984
    ],
    [
      0.32499999999999996,
      12.729759322438092,
      2.3435681093798735
    ],
    [
      0.35,
      11.82244305554356,
      2.540483624899819
    ],
    [
      0.37499999999999994,
      10.824745801329849,
      2.274025204329168
    ],
    [
      0.4,
      9.876410987285524,
      2.3551455382248947
    ],
    [
      0.425,
      8.977252795485178,
      2.244013607484026
    ],
    [
      0.45,
      8.127057768862294,
      2.082736537190178
    ],
    [
      0.475,
      7.325581210857806,
      2.393392276932808
    ],
    [
      0.49999999999999994,
      6.57254292408355,
      2.1519840602579356
    ],
    [
      0.5249999999999999,
      5.853781429705229,
      2.400449481618723
    ],
    [
      0.5499999999999999,
      5.063782407750956,
      2.246437833617292
    ],
    [
      0.575,
      4.334537095159213,
      2.214106510290862
    ],
    [
      0.6,
      3.665580315297099,
      2.075559893673078
    ],
    [
      0.625,
      3.056371439463554,
      2.0875039797431625
    ],
    [
      0.6499999999999999,
      2.5062809456706105,
      2.3190897072277292
    ],
    [
      0.6749999999999999,
      2.0145736180614975,
      2.1043594547350866
    ],
    [
      0.7,
      1.580387330888847,
      1.8541256951492369
    ],
    [
      0.725,
      1.2027059551447865,
      1.9864035175616952
    ],
    [
      0.7499999999999999,
      0.880324331664383,
      1.6901594727187943
    ],
    [
      0.7749999999999999,
      0.611802365117839,
      1.7065088033346665
    ],
    [
      0.7999999999999999,
      0.39540392844208583,
      1.4911109384684014
    ],
    [
      0.825,
      0.22901410980971804,
      1.3356059090245682
    ],
    [
      0.85,
      0.11002479395855858,
      1.2016886396468354
    ],
    [
      0.8749999999999999,
      0.035172475536121794,
      0.981820337816774
    ],
    [
      0.8999999999999999,
      0.0003010368392111218,
      0.7302866465654008
    ]
  ],
  "era_homogeneity": {
    "n_early": 6,
    "sd_early": 1.884157671299333,
    "sd_late": 0.8821576912569331,
    "F": 4.561860870733855,
    "p_F": 0.01609055830508082,
    "sw_early": 1.7711184174761632,
    "sw_late": 0.8797324544028946,
    "q_LR": 4.92297947695835,
    "p_LR": 0.026501775242002392
  },
  "tests": {
    "kpss": {
      "obs": 0.4359107248446686,
      "mean_clock": 0.07200060656921202,
      "mean_rw": 0.2802147513618689,
      "p_clock": 0.000001999998000002,
      "p_rw": 0.8483941516058484
    },
    "dicke": {
      "obs": 2.1883196285863376,
      "mean_clock": 0.47822849358806085,
      "mean_rw": 1.6491514252747907,
      "p_clock": 9.99999000001e-7,
      "p_rw": 0.7925052074947925
    },
    "r1": {
      "obs": 0.10228530745490748,
      "mean_clock": -0.4603943272233894,
      "mean_rw": -0.04795684184640358,
      "p_clock": 0.000268999731000269,
      "p_rw": 0.7800662199337801
    }
  },
  "dicke_expect": {
    "clock": 0.46017699115044247,
    "rw": 1.7163814180929096
  },
  "structure_fn": {
    "1": {
      "obs": 1.3268874512956692,
      "rw_mean": 1.3239293405890074,
      "rw_90": [
        0.7534488874102454,
        2.0234177217980736
      ],
      "p_rw_two": 0.9154170845829154,
      "clock_mean": 6.038493633616015,
      "clock_90": [
        3.0648243764402987,
        9.941587948327491
      ],
      "p_clock_low": 0.00024999975000025
    },
    "2": {
      "obs": 3.05016832746383,
      "rw_mean": 2.5153393806795767,
      "rw_90": [
        1.2362182539913564,
        4.21287635061442
      ],
      "p_rw_two": 0.49913750086249914,
      "clock_mean": 6.044877242412001,
      "clock_90": [
        3.042679907853006,
        10.003550972267686
      ],
      "p_clock_low": 0.050645949354050646
    },
    "4": {
      "obs": 4.46669977827347,
      "rw_mean": 4.554803110790463,
      "rw_90": [
        1.6582567611202303,
        9.045060635423663
      ],
      "p_rw_two": 0.8628591371408628,
      "clock_mean": 6.123371803264238,
      "clock_90": [
        3.0234391004395156,
        10.22454704971537
      ],
      "p_clock_low": 0.2424877575122425
    },
    "8": {
      "obs": 8.859371507535245,
      "rw_mean": 7.271499360068323,
      "rw_90": [
        1.7366008439426366,
        18.00028995828064
      ],
      "p_rw_two": 0.5550874449125551,
      "clock_mean": 6.481697578299172,
      "clock_90": [
        3.0035805001792326,
        11.20900298199486
      ],
      "p_clock_low": 0.8355391644608355
    },
    "12": {
      "obs": 10.260413650893016,
      "rw_mean": 8.1821792734906,
      "rw_90": [
        1.5495861910332116,
        21.556952868188155
      ],
      "p_rw_two": 0.5426714573285427,
      "clock_mean": 7.098133130794039,
      "clock_90": [
        2.874121696506638,
        13.398900054031724
      ],
      "p_clock_low": 0.8494501505498494
    }
  },
  "gof": {
    "shapiro_W": 0.9811192699257532,
    "shapiro_p": 0.9155523170782895,
    "ljungbox_Q5": 3.5934738582986485,
    "ljungbox_p": 0.6092934289748702,
    "max_abs_z": 2.161292749450622,
    "max_z_cycle_start": 1784.6951789473685,
    "skew": 0.2393941407194159,
    "ex_kurt": -0.6483456948997204
  },
  "jackknife_sw": {
    "min": 1.010140042541832,
    "max": 1.1931235929725277,
    "most_influential_epoch": 1784.6951789473685
  },
  "derived": {
    "D_phi": 0.019987163236534378,
    "tau_c": 50.03211251970505,
    "N_coh": 4.534951209601113,
    "Q": 14.246969404471004,
    "eps": 0.1056936315066552
  },
  "derived_stat68": {
    "D_phi": [
      0.014365063190347275,
      0.02755409763058722
    ],
    "tau_c": [
      36.292242751216826,
      69.61333805144403
    ],
    "N_coh": [
      3.3015746932888774,
      6.28749185775187
    ],
    "Q": [
      10.372202801714312,
      19.752738229818917
    ],
    "eps": [
      0.08976280422346383,
      0.1238724039764956
    ]
  },
  "syst": {
    "sw": 0.01840938638398246,
    "P": 0.033248458076530873,
    "D_phi": 0.0004956733087052101,
    "tau_c": 1.2385914424584237,
    "N_coh": 0.12230639917261184,
    "Q": 0.38423688512769766,
    "eps": 0.0014222272994812426
  },
  "variants": {
    "baseline": {
      "N": 25,
      "first": 1755.1615363636363,
      "last": 2019.9445939597315,
      "sw": 1.1660711261813876,
      "sw68": [
        0.991731742740653,
        1.3646169498597711
      ],
      "sc": 0,
      "P": 11.03255806011324,
      "P_se": 0.23805977538013975,
      "q_clock": 25.26429967210776,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": 7.420908332278485e-11,
      "s_median": 0.01584755328035394,
      "s_max": 0.3010929596658589,
      "D_phi": 0.019987163236534378,
      "tau_c": 50.03211251970505,
      "N_coh": 4.534951209601113,
      "Q": 14.246969404471004,
      "eps": 0.1056936315066552,
      "derived68": {
        "D_phi": [
          0.014365063190347275,
          0.02755409763058722
        ],
        "tau_c": [
          36.292242751216826,
          69.61333805144403
        ],
        "N_coh": [
          3.3015746932888774,
          6.28749185775187
        ],
        "Q": [
          10.372202801714312,
          19.752738229818917
        ],
        "eps": [
          0.08976280422346383,
          0.1238724039764956
        ]
      }
    },
    "gauss24": {
      "N": 25,
      "first": 1755.5369377591994,
      "last": 2019.5216958083656,
      "sw": 1.1510359970007795,
      "sw68": [
        0.9624769072091944,
        1.344162599177127
      ],
      "sc": 0,
      "P": 10.99937812582715,
      "P_se": 0.23495829031964316,
      "q_clock": 23.981671566688185,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": -6.411937647499144e-11,
      "s_median": 0.006920152405419616,
      "s_max": 0.05328953362840795,
      "D_phi": 0.019651837143987817,
      "tau_c": 50.885827756105485,
      "N_coh": 4.626245881721507,
      "Q": 14.533780075716322,
      "eps": 0.10464555212426814,
      "derived68": {
        "D_phi": [
          0.01366260300890654,
          0.026975749362258227
        ],
        "tau_c": [
          37.07033256318359,
          73.19249482313937
        ],
        "N_coh": [
          3.3824494500978695,
          6.633299588957324
        ],
        "Q": [
          10.626278343566302,
          20.83912525772852
        ],
        "eps": [
          0.08739172730091689,
          0.1223825426682087
        ]
      }
    },
    "monthly": {
      "N": 25,
      "first": 1755.123,
      "last": 2019.958,
      "sw": 1.166617746323619,
      "sw68": [
        0.992348739864374,
        1.3657439568940029
      ],
      "sc": 0,
      "P": 11.03468212820992,
      "P_se": 0.23818156473933855,
      "q_clock": 25.114454654281,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": 1.5994316981959855e-11,
      "s_median": 0.043460198951312666,
      "s_max": 0.31966069128620933,
      "D_phi": 0.019994355828537935,
      "tau_c": 50.0141144118632,
      "N_coh": 4.532447226912248,
      "Q": 14.239102910850947,
      "eps": 0.1057228230744578,
      "derived68": {
        "D_phi": [
          0.014374495031341078,
          0.02758340533263969
        ],
        "tau_c": [
          36.25368180398999,
          69.56766118181366
        ],
        "N_coh": [
          3.297413003645377,
          6.282122311011318
        ],
        "Q": [
          10.35912846810377,
          19.735869301225687
        ],
        "eps": [
          0.08980115771298144,
          0.1239505494715854
        ]
      }
    },
    "err_f1": {
      "N": 25,
      "first": 1755.1615363636363,
      "last": 2019.9445939597315,
      "sw": 1.1699364230493772,
      "sw68": [
        0.9948872322332628,
        1.368332917000554
      ],
      "sc": 0,
      "P": 11.032576402642812,
      "P_se": 0.23883919086401403,
      "q_clock": 25.227731732534764,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": -2.2659207843389595e-11,
      "s_median": 0.01379775551039828,
      "s_max": 0.2671370597349224,
      "D_phi": 0.020119789546168883,
      "tau_c": 49.70230914718565,
      "N_coh": 4.505050074729566,
      "Q": 14.153032218824556,
      "eps": 0.1060438088395312,
      "derived68": {
        "D_phi": [
          0.014456023582256092,
          0.02770609125967508
        ],
        "tau_c": [
          36.09314611099449,
          69.17531604108895
        ],
        "N_coh": [
          3.2835783672513035,
          6.247793861607598
        ],
        "Q": [
          10.315665676043064,
          19.628023296769832
        ],
        "eps": [
          0.09004752560267763,
          0.1242113942180241
        ]
      }
    },
    "err_f4": {
      "N": 25,
      "first": 1755.1615363636363,
      "last": 2019.9445939597315,
      "sw": 1.1634549427990075,
      "sw68": [
        0.9899760771017992,
        1.3621658246096449
      ],
      "sc": 0,
      "P": 11.032357411270253,
      "P_se": 0.2376313929697065,
      "q_clock": 25.288640446205484,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": -7.148059921746608e-12,
      "s_median": 0.02761411591018709,
      "s_max": 0.3218949467391163,
      "D_phi": 0.01989866358942229,
      "tau_c": 50.25463119702064,
      "N_coh": 4.555203328137497,
      "Q": 14.310593311284537,
      "eps": 0.10545841649496096,
      "derived68": {
        "D_phi": [
          0.014315088290294197,
          0.027455558988409196
        ],
        "tau_c": [
          36.42249645771795,
          69.85636272170336
        ],
        "N_coh": [
          3.313408793732766,
          6.309571519470122
        ],
        "Q": [
          10.409380724730676,
          19.822103532866723
        ],
        "eps": [
          0.08960560897844501,
          0.12365099608273608
        ]
      }
    },
    "no_err": {
      "N": 25,
      "first": 1755.1615363636363,
      "last": 2019.9445939597315,
      "sw": 1.1766801602551051,
      "sw68": [
        1.0011959684694856,
        1.3740411138757558
      ],
      "sc": 0,
      "P": 11.032627393378991,
      "P_se": 0.24018883915154987,
      "q_clock": 25.281337709248675,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": -1.1368683772161605e-12,
      "s_median": 0.001,
      "s_max": 0.001,
      "D_phi": 0.02035212447727166,
      "tau_c": 49.134919605899384,
      "N_coh": 4.453600928767585,
      "Q": 13.991399959836926,
      "eps": 0.10665457268694362,
      "derived68": {
        "D_phi": [
          0.014638348340357972,
          0.027941313358600627
        ],
        "tau_c": [
          35.78929834707249,
          68.3137179652295
        ],
        "N_coh": [
          3.2561745880044106,
          6.1696252031087315
        ],
        "Q": [
          10.229574164480429,
          19.38244921348883
        ],
        "eps": [
          0.09061617755658805,
          0.12473297711193938
        ]
      }
    },
    "from1823": {
      "N": 19,
      "first": 1823.3309393063585,
      "last": 2019.9445939597315,
      "sw": 0.881071535473275,
      "sw68": [
        0.6854725060604661,
        1.058358550045338
      ],
      "sc": 0,
      "P": 10.923017966486883,
      "P_se": 0.20768107102523617,
      "q_clock": 17.304095151669742,
      "p_clock_2e4": 0.00004999750012499375,
      "q_rw": 4.480149584651372e-11,
      "s_median": 0.0103787889732159,
      "s_max": 0.268866048187077,
      "D_phi": 0.011757747753436264,
      "tau_c": 85.0503022322234,
      "N_coh": 7.786337301025029,
      "Q": 24.46150006327241,
      "eps": 0.08066191396704711,
      "derived68": {
        "D_phi": [
          0.0070938044302531495,
          0.017040513932472405
        ],
        "tau_c": [
          58.683676088806195,
          140.96808134930697
        ],
        "N_coh": [
          5.385621900803441,
          12.88249529850049
        ],
        "Q": [
          16.91943019857639,
          40.471552589674175
        ],
        "eps": [
          0.06270975920434395,
          0.09698782033621914
        ]
      }
    },
    "maxima": {
      "N": 24,
      "first": 1761.4354119530417,
      "last": 2014.2959324009323,
      "sw": 1.9471891545275264,
      "sw68": [
        1.408199270729444,
        2.333991874971202
      ],
      "sc": 0.2889733617799077,
      "P": 10.995150188100276,
      "P_se": 0.4063982962642297,
      "q_clock": 9.154069598711018,
      "p_clock_2e4": 0.0010999450027498626,
      "q_rw": 0.009411098179263888,
      "s_median": 0.006787192742131368,
      "s_max": 0.19693543504530475,
      "D_phi": 0.05630442491764419,
      "tau_c": 17.760593442925455,
      "N_coh": 1.61531158184153,
      "Q": 5.074650998771858,
      "eps": 0.17709527575484244,
      "derived68": {
        "D_phi": [
          0.029171911595809192,
          0.0822484471651962
        ],
        "tau_c": [
          12.158284252971946,
          34.279549926500486
        ],
        "N_coh": [
          1.1159193110619634,
          3.1014818352277067
        ],
        "Q": [
          3.505763909631248,
          9.743592548793552
        ],
        "eps": [
          0.12780578392275033,
          0.21306824706344263
        ]
      }
    }
  },
  "prediction": {
    "rw_next_min": 2030.9771520198449,
    "rw_next_sd": 1.1901240809125628
  },
  "seeds": {
    "mc": 11,
    "boot_clock": 21,
    "boot_rw": 22,
    "neyman_sc": 23,
    "neyman_ar": 24,
    "sims": 31,
    "variants": 41
  },
  "hypothesis_supported": true,
  "runtime_s": 60.52796196937561,
  "referee2": {
    "streams": "numpy SeedSequence(20261025).spawn(10): pivot, ney_sc, ney_ar, amp_clock, amp_rw, amp_corr, lost_clock, lost_rw, silso, bands",
    "ney_sc": {
      "limit": 0.6255491579772532,
      "mcse": 0.004517835139693136,
      "B_per_point": 20000,
      "q_obs": [
        0.5713844302883686,
        0.7194908707430798,
        0.9261096791501516,
        1.1937334772054484,
        1.5220769502058786,
        1.908754663741469,
        2.3271657202491056,
        2.7380105108672907,
        3.206045247725634,
        3.7246785955760657,
        4.287556816614391,
        4.888731839548292,
        5.485265563387237,
        6.104272811384057,
        6.753971937215937
      ],
      "q95": [
        0.9533976104512254,
        1.1917021000827843,
        1.4948303198892503,
        1.7693792814377045,
        1.9863885852855845,
        2.328170777945178,
        2.4689414072641367,
        2.6023295256482384,
        2.682354172743301,
        2.9551080713431523,
        3.0759415525088194,
        2.9088476341264635,
        2.9574888963496497,
        3.029927609864765,
        3.0657062891946723
      ],
      "q95_mcse": [
        0.011001130093223751,
        0.013871018979477977,
        0.01987671849742864,
        0.02297742834475567,
        0.02336836489579109,
        0.03076175940988126,
        0.03663215414611246,
        0.031546795701962026,
        0.04196755080170895,
        0.04636196303639123,
        0.05336294496777629,
        0.05101855241097373,
        0.048378847720713374,
        0.05133839415698096,
        0.04121373725227297
      ]
    },
    "ney_ar": {
      "limit": 0.6715353886844642,
      "mcse": 0.0018761209920940608,
      "B_per_point": 20000,
      "q_obs": [
        13.625278861389226,
        12.729759322438092,
        11.82244305554356,
        10.824745801329849,
        9.876410987285524,
        8.977252795485178,
        8.127057768862294,
        7.325581210857806,
        6.57254292408355,
        5.853781429705229,
        5.063782407750956,
        4.334537095159213,
        3.665580315297099,
        3.056371439463554,
        2.5062809456706105,
        2.0145736180614975,
        1.580387330888847,
        1.2027059551447865,
        0.880324331664383,
        0.611802365117839,
        0.39540392844208583,
        0.22901410980971804,
        0.11002479395855858,
        0.035172475536121794,
        0.0003010368392111218
      ],
      "q95": [
        2.526017497684821,
        2.440721883666538,
        2.404662139870845,
        2.3984197611059948,
        2.278595153844301,
        2.2738913316118454,
        2.32605544375092,
        2.401123555900918,
        2.331569066115021,
        2.2807842197543784,
        2.169714149631259,
        2.2737363795791015,
        2.1547232827434617,
        2.1176458912894716,
        2.094798305029192,
        2.0807729067672196,
        1.9955156759115225,
        1.9550817569821484,
        1.7952483582146406,
        1.6892237565490662,
        1.5763392765559372,
        1.3920345015359072,
        1.1804062905346695,
        0.9569099086994212,
        0.726714157589208
      ],
      "q95_mcse": [
        0.04792999869035831,
        0.04700940621504643,
        0.05179366834864975,
        0.04113804054396302,
        0.04121522112787874,
        0.03782520253364415,
        0.05278524645085396,
        0.04642164087268473,
        0.03866475174389752,
        0.03998242630614011,
        0.03745682037196122,
        0.0450580216226468,
        0.04331539389953301,
        0.03983979892083853,
        0.04072746959677178,
        0.04096466497043309,
        0.0388010509016781,
        0.04094224472244053,
        0.0350240964818806,
        0.029200168976105965,
        0.03019163782163405,
        0.020778521146077485,
        0.018105499539002166,
        0.015553975121530918,
        0.009795718965951083
      ],
      "tau_lo_years": 27.70686823391963,
      "tau_lo_years_mcse": 0.19477037524692517,
      "tau_lo_cycles": 2.51137298194606
    },
    "pivot": {
      "0.7": 0.000645,
      "1.4": 0.00077
    },
    "amplitude": {
      "A": [
        144.125,
        192.97916666666663,
        264.25,
        235.2833333333333,
        81.99166666666666,
        81.1625,
        119.24166666666666,
        244.87083333333337,
        219.94166666666663,
        186.15416666666667,
        234.02083333333331,
        124.4125,
        146.54583333333332,
        107.07916666666664,
        175.66666666666666,
        130.22916666666666,
        198.64166666666668,
        218.73333333333332,
        285.00416666666666,
        156.62916666666663,
        232.91666666666663,
        212.48333333333335,
        180.275,
        116.425,
        160.89166666666665
      ],
      "current_cycle_peak_year": 2024.791,
      "current_cycle_peak": 160.89166666666665,
      "last_smoothed_year": 2025.705,
      "last_smoothed": 113.10833333333332,
      "corr": {
        "prev_oc": -0.5080434692800648,
        "next_oc": -0.27848864481357577,
        "own_len": -0.3246645404368285,
        "next_len": -0.6968100131054781
      },
      "p_corr_rw_mc": {
        "prev_oc": 0.012889871101288988,
        "next_oc": 0.1863681363186368,
        "own_len": 0.11928880711192888,
        "next_len": 0.00007999920000799993
      },
      "p_corr_naive": {
        "prev_oc": 0.011256911141511464,
        "next_oc": 0.1776575322003653,
        "own_len": 0.12164808043110054,
        "next_len": 0.00015487198278343582
      },
      "B_corr": 100000,
      "fits": {
        "prev": {
          "N": 24,
          "sw": 0.7926064759241721,
          "sw68": [
            0.5929986989432469,
            1.0933588996655617
          ],
          "sc": 0.4633676350445267,
          "P": 11.029113854536265,
          "P_se": 0.16727854695069364,
          "beta": [
            -1.083418731130004
          ],
          "beta_se": [
            0.31548034608230247
          ],
          "beta_z": [
            -3.4341877222594452
          ],
          "q_clock": 24.365663356255997,
          "q_rw": 0.9169936852486416,
          "sc_clock": 1.561399962793007,
          "sw_rw": 1.0352842901377453
        },
        "next": {
          "N": 25,
          "sw": 1.1386062618212256,
          "sw68": [
            0.9387416922098736,
            1.3371355651650965
          ],
          "sc": 0,
          "P": 11.03597407799251,
          "P_se": 0.23246602542366024,
          "beta": [
            -0.5005502969350404
          ],
          "beta_se": [
            0.34031204545374605
          ],
          "beta_z": [
            -1.4708568316106616
          ],
          "q_clock": 24.388842036365027,
          "q_rw": -4.3016257222916465e-11,
          "sc_clock": 1.7058432949555935,
          "sw_rw": 1.138608015213315
        },
        "both": {
          "N": 24,
          "sw": 0.8657084704734762,
          "sw68": [
            0.6557655846254505,
            1.0533292679654027
          ],
          "sc": 0.13385940961129936,
          "P": 10.999785776829794,
          "P_se": 0.1807955309390705,
          "beta": [
            -1.0982222054950328,
            -0.7880784155438292
          ],
          "beta_se": [
            0.27977260152960226,
            0.27844554456333886
          ],
          "beta_z": [
            -3.9254101348406407,
            -2.830278418639098
          ],
          "q_clock": 28.409703605787044,
          "q_rw": 0.009860005660726756,
          "sc_clock": 1.5718776637306977,
          "sw_rw": 0.8862498623290821,
          "q_clock_grid": 28.57121472051761,
          "B_clock": 1000000,
          "n_null_exceed": 0,
          "max_q_null": 21.280217544599488,
          "p_clock_boot": 9.99999000001e-7,
          "p_clock_ub95": 0.0000029957277863525433,
          "null_frac_q0": 0.598126,
          "null_q99": 5.211899781642038,
          "p_rw_boot": 0.5008249587520623,
          "derived": {
            "D_phi": 0.01111527963420355,
            "tau_c": 89.96624762573089,
            "N_coh": 8.178909067050913,
            "Q": 25.6948006394261,
            "eps": 0.07870230275729775
          },
          "derived68": {
            "D_phi": [
              0.006363934758520239,
              0.016506151097603974
            ],
            "tau_c": [
              60.58347546237837,
              157.13548896163147
            ],
            "N_coh": [
              5.517131754689786,
              14.26801390124727
            ],
            "Q": [
              17.33258058942039,
              44.82428765347548
            ],
            "eps": [
              0.05958725339323311,
              0.0958249169956934
            ]
          }
        },
        "base_same_24": {
          "N": 24,
          "sw": 1.1919029362118905,
          "sw68": [
            1.0138973328127792,
            1.3999152748962154
          ],
          "sc": 0,
          "P": 11.022796829242342,
          "P_se": 0.24852942168726316,
          "beta": [],
          "beta_se": [],
          "beta_z": [],
          "q_clock": 24.34990240604192,
          "q_rw": 2.900435447372729e-11,
          "sc_clock": 1.7737398166305958,
          "sw_rw": 1.1919043273925432
        }
      },
      "corr_after": {
        "prev_oc": -0.09140070242250543,
        "next_oc": 0.07945255872791665
      }
    },
    "lost_cycle": {
      "N": 25,
      "n_cycles": 25,
      "sw": 1.5615161761937704,
      "sw68": [
        1.356248982049664,
        1.8240212082124183
      ],
      "sc": 0,
      "P": 10.591212358589974,
      "P_se": 0.3123289563063569,
      "q_clock": 30.277629494966614,
      "q_rw": 1.0089706847793425e-12,
      "sc_clock": 2.616610446390789,
      "B_clock": 1000000,
      "n_null_exceed": 0,
      "max_q_null": 21.935451299039222,
      "p_clock_boot": 9.99999000001e-7,
      "p_clock_ub95": 0.0000029957277863525433,
      "p_rw_boot": 0.5457727113644317,
      "sw_early": 2.7427294342986173,
      "sw_late": 0.8813287444272844,
      "era_q_LR": 12.864654781867287,
      "era_p_LR": 0.0003348466609302122,
      "derived": {
        "D_phi": 0.04051218697707305,
        "tau_c": 24.683930308821076,
        "N_coh": 2.330604795097064,
        "Q": 7.321810902698081,
        "eps": 0.14743507384471494
      }
    },
    "era2": {
      "sw_early": 1.7711599540078935,
      "sw_early68": [
        1.3539323700899597,
        2.4463831272855416
      ],
      "sw_late": 0.8797302201195205,
      "sw_late68": [
        0.7469590846564854,
        1.056078478432928
      ],
      "P": 10.95635409039468,
      "P_se": 0.19932998791784828,
      "derived_early": {
        "D_phi": 0.04708115745980162,
        "tau_c": 21.2399196186672,
        "N_coh": 1.9385937551331984,
        "Q": 6.090271899421506,
        "eps": 0.1616559614078784
      },
      "derived_early68": {
        "D_phi": [
          0.027436237965392175,
          0.09002852445239858
        ],
        "tau_c": [
          11.107590689534591,
          36.44814574291822
        ],
        "N_coh": [
          1.0150997386554057,
          3.321566481968052
        ],
        "Q": [
          3.1890298816207405,
          10.435008858160923
        ],
        "eps": [
          0.12349906078611196,
          0.22339876684479815
        ]
      },
      "derived_late": {
        "D_phi": 0.011615304100110711,
        "tau_c": 86.09331201156141,
        "N_coh": 7.8578431566974,
        "Q": 24.68614233414138,
        "eps": 0.08029406615205788
      }
    },
    "ratios": {
      "D_phi_maxima_over_minima": 2.8170293228368593,
      "sw_amp_over_base": 0.7424148073269514,
      "sw_amp_over_base_same_24": 0.7263246395087116,
      "D_phi_early_over_late": 4.053372779052153
    },
    "pred_1823": {
      "next_min": 2030.8676119262184,
      "sd": 0.9052179173455548
    },
    "kernel_shift": {
      "max_abs": 0.7550834513733662,
      "at_epoch": 1890.169007082153,
      "rms": 0.29736753397890153
    },
    "silso_epochs": {
      "table": {
        "sw": 1.1558814345384945,
        "sw68": [
          0.9885131701935276,
          1.3498920567338573
        ],
        "sc": 0,
        "P": 11.03471746937612,
        "q_clock": 25.60890340957529,
        "p_clock_2e4": 0.00004999750012499375,
        "epoch_1996": 1996.625
      },
      "1996_only": {
        "sw": 1.1423324743714305,
        "sw68": [
          0.978785500836003,
          1.3369784757443215
        ],
        "sc": 0,
        "P": 11.03255517244413,
        "q_clock": 25.78692620875812,
        "p_clock_2e4": 0.00004999750012499375,
        "epoch_1996": 1996.625
      }
    },
    "oc_table": {
      "epoch": [
        1755.1615363636363,
        1766.4204430379748,
        1775.4418433734938,
        1784.6951789473685,
        1798.319,
        1810.623,
        1823.3309393063585,
        1833.8869705882353,
        1843.5419794007491,
        1855.973874015748,
        1867.224695652174,
        1878.955475409836,
        1890.169007082153,
        1902.061819148936,
        1913.5696025641023,
        1923.5946666666664,
        1933.7390831134564,
        1944.1546,
        1954.308863387978,
        1964.778302238806,
        1976.220747433265,
        1986.701498960499,
        1996.3858793103448,
        2008.9236363636364,
        2019.9445939597315
      ],
      "oc": [
        -0.32001960375419003,
        -0.1314073865505634,
        -2.1803015081659396,
        -3.997260391425584,
        -1.4437337959290062,
        -0.21002825306334216,
        1.4276165961604192,
        0.9133534209026948,
        -0.5019322237183133,
        0.8596679341461595,
        1.040195113437676,
        1.700680413964733,
        1.8439176291473132,
        2.6664352387957706,
        3.1039241968273927,
        2.0586938422566163,
        1.132815831912012,
        0.47803826132133054,
        -0.4379928078353714,
        -1.0388484141424217,
        -0.666697676818103,
        -1.2562406067183929,
        -2.642154714007347,
        -1.1746921178505545,
        -1.224028978889578
      ],
      "s_n": [
        0.10040031910448122,
        0.011182461362944542,
        0.01136666415463259,
        0.1803177545712704,
        0.01584755328035394,
        0.3010929596658589,
        0.03764252513551634,
        0.0103787889732159,
        0.007155580327196084,
        0.0037191134378070944,
        0.04451956136309784,
        0.02790431364967151,
        0.1525258251485671,
        0.268866048187077,
        0.01903125599811658,
        0.02901522146294456,
        0.0025515748470152444,
        0.006271656558206018,
        0.0016952477177513468,
        0.0026865822133295193,
        0.08330041390331315,
        0.001,
        0.09126906986256192,
        0.002567960735512122,
        0.001
      ],
      "amplitude_next": [
        144.125,
        192.97916666666663,
        264.25,
        235.2833333333333,
        81.99166666666666,
        81.1625,
        119.24166666666666,
        244.87083333333337,
        219.94166666666663,
        186.15416666666667,
        234.02083333333331,
        124.4125,
        146.54583333333332,
        107.07916666666664,
        175.66666666666666,
        130.22916666666666,
        198.64166666666668,
        218.73333333333332,
        285.00416666666666,
        156.62916666666663,
        232.91666666666663,
        212.48333333333335,
        180.275,
        116.425,
        160.89166666666665
      ],
      "clock90": [
        [
          -2.6364225138201443,
          2.636116457569182
        ],
        [
          -2.679805482201733,
          2.6471891857466217
        ],
        [
          -2.689710164664838,
          2.681036834669164
        ],
        [
          -2.694180212289065,
          2.72902746339842
        ],
        [
          -2.716637423185691,
          2.7132796228253913
        ],
        [
          -2.789545369687921,
          2.772684149030472
        ],
        [
          -2.7499646764813757,
          2.7510703841699
        ],
        [
          -2.7713011449997764,
          2.769436559030219
        ],
        [
          -2.7681170133241344,
          2.7820614681851197
        ],
        [
          -2.774254470702503,
          2.77958543938302
        ],
        [
          -2.8103093573171627,
          2.7948425968149513
        ],
        [
          -2.8089057525629704,
          2.7777354385223494
        ],
        [
          -2.8227160811881227,
          2.8213172241957336
        ],
        [
          -2.835267834154811,
          2.8251691129851664
        ],
        [
          -2.7975631604204896,
          2.7684720040122355
        ],
        [
          -2.7919945509450432,
          2.799265159519344
        ],
        [
          -2.7787016187964726,
          2.785625348114769
        ],
        [
          -2.7630967562703677,
          2.765661154775304
        ],
        [
          -2.736396535621526,
          2.7436386194406457
        ],
        [
          -2.7427504581309674,
          2.739449307727767
        ],
        [
          -2.727119422268336,
          2.731150461114742
        ],
        [
          -2.709308096289897,
          2.707402573139896
        ],
        [
          -2.6756781166451424,
          2.685603061770864
        ],
        [
          -2.6586083718842586,
          2.6424465829657673
        ],
        [
          -2.641236963632871,
          2.6183975399147226
        ]
      ],
      "rw90": [
        [
          -3.19918052425018,
          3.198173860868027
        ],
        [
          -2.672040339800313,
          2.684291115003627
        ],
        [
          -2.299167026475783,
          2.31552423299896
        ],
        [
          -2.0902709353421582,
          2.108111330898028
        ],
        [
          -1.9886961797539011,
          1.99324380726226
        ],
        [
          -2.076204952538276,
          2.094185956242584
        ],
        [
          -2.159454236828308,
          2.1451923049604043
        ],
        [
          -2.310239715625803,
          2.286136449041034
        ],
        [
          -2.453779871268291,
          2.45437411896624
        ],
        [
          -2.5909995211869705,
          2.566560421245925
        ],
        [
          -2.697577737949141,
          2.683167042745284
        ],
        [
          -2.754619819813134,
          2.748967356571145
        ],
        [
          -2.7739895392738427,
          2.774796359419501
        ],
        [
          -2.7698966159730576,
          2.791150207257519
        ],
        [
          -2.6817832266206643,
          2.6923370811922394
        ],
        [
          -2.5732127457815555,
          2.57749875089228
        ],
        [
          -2.4482285220127813,
          2.460789762187978
        ],
        [
          -2.31367817264453,
          2.311645221457488
        ],
        [
          -2.148730067420748,
          2.169619792269872
        ],
        [
          -2.028552724632375,
          2.0308791573309217
        ],
        [
          -1.9879479423930184,
          1.9928467475502636
        ],
        [
          -2.0763387794288515,
          2.0639293302224497
        ],
        [
          -2.300873102343999,
          2.285583363900856
        ],
        [
          -2.6945032135392952,
          2.678866884896004
        ],
        [
          -3.2119343159840468,
          3.181665587800961
        ]
      ],
      "oc_amp_corrected": [
        null,
        -0.3681702867168042,
        -1.3231681314919117,
        -2.5899960286267287,
        -1.5669474203630216,
        -2.027560567413502,
        -0.10322920120506753,
        0.7864567497847474,
        0.5500960445203873,
        1.367345479874075,
        1.5497366158435852,
        1.867803578216808,
        0.9774246764193322,
        1.727686102335838,
        2.2679655626459407,
        1.613594149326218,
        0.7235544865131942,
        0.9741351866987316,
        0.7967203117502777,
        -0.09233103695828504,
        -0.5331188185605242,
        -0.4501872569007901,
        -2.3186327750659075,
        -1.7123783998006274,
        -2.116799020817325
      ]
    },
    "derived68_P_exponent": {
      "D_phi": 3,
      "tau_c": 3,
      "N_coh": 2,
      "Q": 2,
      "eps": 1
    },
    "main_clock_p_ub95": 0.0000014978650149760734,
    "hypothesis_supported_amp_corrected": true,
    "hypothesis_supported_lost_cycle": true
  }
}
Experiment script · experiment_v1.py
"""Clock or random walk? REML likelihood tests on SILSO v2.0 sunspot-minimum epochs with propagated uncertainty.
Revision: amplitude-corrected fits, lost-cycle variant, Neyman limits with Monte Carlo errors (new analyses on independent streams)."""
import json, time
import numpy as np
from scipy import optimize, stats, ndimage
from scipy.linalg import solve_triangular
from statsmodels.stats.diagnostic import acorr_ljungbox
from dataset import load

T0 = time.time()
SEEDS = dict(mc=11, boot_clock=21, boot_rw=22, neyman_sc=23, neyman_ar=24, sims=31, variants=41)  # every random step seeded
df0 = load()
print('loaded', df0.shape, df0.dtypes.astype(str).to_dict(), 'NaN per column', df0.isna().sum().to_dict())
df = df0[df0['definitive'] & df0['sunspot_number'].notna()].reset_index(drop=True)   # explicit filter
assert (np.diff(df.year.to_numpy() * 12 + df.month.to_numpy()) == 1).all(), 'months not contiguous'
M = len(df); x = df.sunspot_number.to_numpy(float); ty = df.decimal_year.to_numpy(float); yr = df.year.to_numpy()
print(f'analysed {M} definitive months {ty[0]:.3f}-{ty[-1]:.3f} (dropped {len(df0) - M} provisional)')

# ---- monthly standard errors: SILSO sigma/sqrt(N) from 1818; Poisson-like model fitted on 1818-1847 before that
sd = df['sd'].to_numpy(float); no = df['n_observations'].to_numpy(float)
has = np.isfinite(sd) & np.isfinite(no) & (no > 0)
se = np.full(M, np.nan); se[has] = sd[has] / np.sqrt(no[has])
n_zero = int((se[has] == 0).sum()); se[has] = np.maximum(se[has], se[has & (se > 0)].min())
cal = has & (yr <= 1847)
kap2, kap2c = np.polyfit(x[cal], se[cal] ** 2, 1, w=1 / se[cal] ** 2)     # SE^2 = kappa^2 (SN + c), relative weights
def se_for(f):
    e = se.copy(); e[~has] = f * np.sqrt(kap2 * x[~has] + kap2c); return e

K13 = np.r_[0.5, np.ones(11), 0.5] / 12.0                                   # SILSO 13-month tapered running mean
tg = np.arange(-23, 24.0); KG = np.exp(-tg ** 2 / 288) - np.exp(-2) * (3 - tg ** 2 / 288); KG /= KG.sum()  # Hathaway 24-mo Gaussian
def smooth(X, k):
    S = ndimage.convolve1d(np.atleast_2d(X).astype(float), k, axis=1, mode='nearest'); h = len(k) // 2
    S[:, :h] = np.nan; S[:, -h:] = np.nan; return S

def extrema(S, sign, refine=True, half=36):
    y = sign * S; idx = [i for i in range(half, M - half) if np.isfinite(y[i - half:i + half + 1]).all()
                         and y[i] <= np.min(y[i - half:i + half + 1]) + 1e-9]
    out = []
    for g in np.split(np.array(idx), np.where(np.diff(idx) > 1)[0] + 1):
        i = g[0]; den = y[i - 1] - 2 * y[i] + y[i + 1]
        out.append(g.mean() if len(g) > 1 else i + (0.5 * (y[i - 1] - y[i + 1]) / den if refine and den > 0 else 0.0))
    return np.array(out)                                                    # fractional month index; tied runs -> centre

def mc_sd(ifr, k, e, sign, R, seed, refine=True):                           # propagate monthly SE to the epochs
    rng = np.random.default_rng(seed); S = sign * smooth(x[None, :] + e[None, :] * rng.standard_normal((R, M)), k)
    out = np.empty((R, len(ifr))); r = np.arange(R)
    for j, i0 in enumerate(np.rint(ifr).astype(int)):
        W = S[:, i0 - 24:i0 + 25]; a = np.clip(np.argmin(W, axis=1), 1, 47)
        ym, y0, yp = W[r, a - 1], W[r, a], W[r, a + 1]; den = ym - 2 * y0 + yp
        out[:, j] = i0 - 24 + a + (np.where(den > 0, 0.5 * (ym - yp) / np.where(den > 0, den, 1), 0) if refine else 0)
    return np.interp(out, np.arange(M), ty).std(axis=0, ddof=1)

def epochs(k=K13, sign=1, f=2.0, refine=True, err=True, R=1000, seed=SEEDS['mc']):
    ifr = extrema(smooth(x, k)[0], sign, refine); t = np.interp(ifr, np.arange(M), ty)
    s = mc_sd(ifr, k, se_for(f), sign, R, seed, refine) if err else np.zeros(len(t))
    q2 = 0.0 if refine else (1 / 12) ** 2 / 12                               # month-grid epochs: add quantisation variance
    return t, np.arange(len(t)), np.sqrt(np.maximum(s ** 2 + q2, 1e-6))      # floor 0.001 yr keeps V positive definite

# ---- model: t_n = t0 + nP + random walk (step sw) + white jitter (sc) + measurement (s_n); REML on the differences
def Vmat(n, s2, sw, sc, a=None):
    Dm = np.diff(np.eye(len(n)), axis=0); g = np.diff(n).astype(float)
    if a is None: return np.diag(g * np.asarray(sw) ** 2 * np.ones(len(g))) + Dm @ np.diag(sc ** 2 + s2) @ Dm.T
    k = np.abs(n[:, None] - n[None, :]).astype(float)                       # AR(1) phase: a=0 clock, a=1 random walk
    G = -0.5 * k if a >= 1 else (a ** k - 1) / (1 - a * a)
    return Dm @ (sw ** 2 * G + np.diag(sc ** 2 + s2)) @ Dm.T
def reml(t, n, s2, sw, sc, a=None, full=False):
    L = np.linalg.cholesky(Vmat(n, s2, sw, sc, a)); g = np.diff(n).astype(float)
    ld = solve_triangular(L, np.diff(t), lower=True); lg = solve_triangular(L, g, lower=True)
    c = lg @ lg; P = (lg @ ld) / c; r = ld - P * lg; ll = -0.5 * (2 * np.log(np.diag(L)).sum() + np.log(c) + r @ r)
    return (ll, P, c ** -0.5, r) if full else ll
def argmax1(fun, hi=8.0):                                                    # max over [0, hi] incl. the boundary
    r = optimize.minimize_scalar(lambda u: -fun(u), bounds=(0, hi), method='bounded', options={'xatol': 1e-5})
    return (-r.fun, r.x) if -r.fun > fun(0.0) else (fun(0.0), 0.0)
def fit(t, n, s2):
    prof = lambda w: argmax1(lambda c: reml(t, n, s2, w, c))[0]
    ll, sw = argmax1(prof); sc = argmax1(lambda c: reml(t, n, s2, sw, c))[1]
    llc, scc = argmax1(lambda c: reml(t, n, s2, 0.0, c)); llr, swr = argmax1(lambda w: reml(t, n, s2, w, 0.0))
    _, P, Pse, _ = reml(t, n, s2, sw, sc, full=True)
    return dict(ll=ll, sw=sw, sc=sc, P=P, P_se=Pse, ll_clock=llc, sc_clock=scc, ll_rw=llr, sw_rw=swr, prof=prof,
                q_clock=2 * (ll - llc), q_rw=2 * (ll - llr))
def bounds(fun, xh, lmax, delta, hi=8.0):
    f = lambda v: fun(v) - (lmax - delta / 2)
    return (optimize.brentq(f, 1e-4, xh) if xh > 1e-4 and f(1e-4) < 0 else 0.0), (optimize.brentq(f, xh, hi) if f(hi) < 0 else hi)

# ---- vectorised grid REML for parametric-bootstrap calibration and Neyman constructions
def prep(n, s2, pars):
    g = np.diff(n).astype(float); m = len(g); iu = np.triu_indices(m); Wf, A, ld, c = [], [], [], []
    for sw, sc, a in pars:
        L = np.linalg.cholesky(Vmat(n, s2, sw, sc, a)); Li = solve_triangular(L, np.eye(m), lower=True); W = Li.T @ Li
        Wf.append((W * (2 - np.eye(m)))[iu]); A.append(W @ g); c.append(g @ W @ g); ld.append(2 * np.log(np.diag(L)).sum())
    return np.array(Wf), np.array(A), np.array(ld) + np.log(c), np.array(c), iu, g
def gz(pr, Dd):                                                              # -2 x REML log-likelihood (+const) on the grid
    Wf, A, ldc, c, iu, g = pr; Z = Wf @ (Dd[iu[0]] * Dd[iu[1]]); T = A @ Dd; np.square(T, out=T); T /= c[:, None]; Z -= T; Z += ldc[:, None]
    return Z
def boot(pr, Vtrue, B, seed, mask, arg=False, chunk=2000):                 # LR statistic q = 2(lnL_max - lnL_max|mask)
    g = pr[5]; rng = np.random.default_rng(seed); L0 = np.linalg.cholesky(Vtrue); q, am = [], []
    for b0 in range(0, B, chunk):
        Z = gz(pr, L0 @ rng.standard_normal((len(g), min(chunk, B - b0))) + 11.0 * g[:, None]); q.append(Z[mask].min(0) - Z.min(0))
        if arg: am.append(Z.argmin(0))
    return np.concatenate(q), (np.concatenate(am) if arg else None)
def neyman(pr, Zo, sel, scan, null, side, seed, B=4000):                  # one-sided Neyman construction on a scanned parameter
    rows = []
    for i, v0 in enumerate(scan):
        mk = np.isclose(sel, v0); qo = Zo[mk].min() - Zo.min(); qb, am = boot(pr, null(v0), B, seed + i, mk, arg=True)
        rows.append((v0, qo, np.percentile(np.where(side * (sel[am] - v0) > 0, qb, 0.0), 95)))
    r = np.array(rows); ok = r[:, 1] <= r[:, 2]; j = np.where(ok)[0]
    if len(j) == 0: return rows, None
    k = j.max() if side < 0 else j.min(); k2 = k + (1 if side < 0 else -1)   # interpolate the crossing to the first rejected point
    if 0 <= k2 < len(r) and not ok[k2]:
        d1, d2 = r[k, 1] - r[k, 2], r[k2, 1] - r[k2, 2]; return rows, r[k, 0] + (r[k2, 0] - r[k, 0]) * d1 / (d1 - d2)
    return rows, r[k, 0]

# ======================= baseline =======================
t, n, s = epochs(); s2 = s ** 2; N = len(t); F = fit(t, n, s2); L = np.diff(t)
SILSO = [(1755,2),(1766,6),(1775,6),(1784,9),(1798,4),(1810,7),(1823,5),(1833,11),(1843,7),(1855,12),(1867,3),(1878,12),(1890,3),
         (1902,1),(1913,7),(1923,8),(1933,9),(1944,2),(1954,4),(1964,10),(1976,3),(1986,9),(1996,8),(2008,12),(2019,12)]
dsil = (t - np.array([y + (mo - 0.5) / 12 for y, mo in SILSO])) * 12 if N == 25 else np.full(N, np.nan)
print(f'{N} minima {t[0]:.3f}-{t[-1]:.3f}; s_n median {np.median(s):.3f} max {s.max():.3f}; max |t - SILSO| {np.nanmax(abs(dsil)):.2f} mo')
w68, w95 = bounds(F['prof'], F['sw'], F['ll'], 1.0), bounds(F['prof'], F['sw'], F['ll'], 3.841)
profc = lambda c: argmax1(lambda w: reml(t, n, s2, w, c))
sc_ul_chi2 = bounds(lambda c: profc(c)[0], F['sc'], F['ll'], 2.706)[1]
m1 = N - 2; w68_exact = [float(np.sqrt(m1 * L.var(ddof=1) / stats.chi2.ppf(q, m1))) for q in (0.8413, 0.1587)]   # pure RW, s_n -> 0
early = t[:-1] < 1823                                                      # cycles starting before the SILSO-dispersion era
Fst = L[early].var(ddof=1) / L[~early].var(ddof=1); dfe = (early.sum() - 1, (~early).sum() - 1)
r2 = optimize.minimize(lambda p: -reml(t, n, s2, np.where(early, abs(p[0]), abs(p[1])), 0.0), [1.5, 0.9], method='Nelder-Mead')
era = dict(n_early=int(early.sum()), sd_early=float(L[early].std(ddof=1)), sd_late=float(L[~early].std(ddof=1)), F=float(Fst),
           p_F=float(2 * min(stats.f.cdf(Fst, *dfe), stats.f.sf(Fst, *dfe))), sw_early=abs(r2.x[0]), sw_late=abs(r2.x[1]),
           q_LR=float(2 * (-r2.fun - F['ll_rw'])), p_LR=float(stats.chi2.sf(2 * (-r2.fun - F['ll_rw']), 1)))
print('fit', {k: round(float(v), 4) for k, v in F.items() if k != 'prof'}, 'sw68', w68, 'sc_ul(chi2)', sc_ul_chi2, 'era', era)

# ---- clock-null and random-walk-null calibration (grid includes the Neyman scan values of sigma_c)
C_SCAN = np.round(np.arange(0.30, 1.001, 0.05), 3)
gw, gc = np.r_[0, np.geomspace(0.05, 6, 48)], np.unique(np.r_[0, np.geomspace(0.02, 8, 40), C_SCAN])
pars = [(w, c, None) for w in gw for c in gc]; PR = prep(n, s2, pars); pw, pc = np.array([p[0] for p in pars]), np.array([p[1] for p in pars])
Zo = gz(PR, np.diff(t)[:, None])[:, 0]; q_clock_grid = Zo[pw == 0].min() - Zo.min()
B_c, B_r = 2000000, 20000
qc = boot(PR, Vmat(n, s2, 0.0, F['sc_clock']), B_c, SEEDS['boot_clock'], pw == 0)[0]
qr = boot(PR, Vmat(n, s2, F['sw_rw'], 0.0), B_r, SEEDS['boot_rw'], pc == 0)[0]
p_clock = (1 + (qc >= F['q_clock']).sum()) / (B_c + 1); p_rw = (1 + (qr >= F['q_rw']).sum()) / (B_r + 1)
mixsf = lambda q: 0.5 * stats.chi2.sf(q, 1)
tail = {str(q): dict(boot=float((qc >= q).mean()), mixture=float(mixsf(q))) for q in [2.706, 5.412, 10, 15, 20]}
pivot = {str(f): float((boot(PR, Vmat(n, s2, 0.0, f * F['sc_clock']), 100000, SEEDS['boot_clock'] + k, pw == 0)[0] >= 10).mean())
         for k, f in enumerate([0.7, 1.4], start=1)}                       # clock-null tail at other jitter amplitudes
print(f'q_clock {F["q_clock"]:.2f} (grid {q_clock_grid:.2f}) null max {qc.max():.2f} p<={p_clock:.1e} P(q=0) {(qc < 1e-6).mean():.3f}; '
      f'q_rw {F["q_rw"]:.3f} p {p_rw:.3f}; t={time.time() - T0:.1f}s')
ney_sc, sc_ul = neyman(PR, Zo, pc, C_SCAN, lambda c0: Vmat(n, s2, profc(c0)[1], c0), -1, SEEDS['neyman_sc'])   # upper limit
# ---- AR(1) phase locking, profile in a, and a Neyman-calibrated lower limit on a (relaxation time)
agrid = np.r_[np.linspace(0, 0.95, 39), 0.97, 0.98, 0.99, 1.0]
lla = np.array([argmax1(lambda e: reml(t, n, s2, e, 0.0, a))[0] for a in agrid]); a_hat = agrid[lla.argmax()]
pa = [(e, 0.0, a) for a in agrid for e in np.geomspace(0.05, 8, 45)]; PRa = prep(n, s2, pa); paa = np.array([p[2] for p in pa])
Zoa = gz(PRa, np.diff(t)[:, None])[:, 0]
ney_ar, a_lo = neyman(PRa, Zoa, paa, agrid[12:37], lambda a0: Vmat(n, s2, argmax1(lambda e: reml(t, n, s2, e, 0.0, a0))[1], 0.0, a0),
                      +1, SEEDS['neyman_ar'])                                # lower limit on the AR(1) coefficient
a_lo = 0.0 if a_lo is None else a_lo
print('neyman sc', [(round(c, 2), round(q, 2), round(c95, 2)) for c, q, c95 in ney_sc], 'UL', sc_ul)
print('neyman ar', [(round(a, 3), round(q, 2), round(c95, 2)) for a, q, c95 in ney_ar], 'a_lo', a_lo, f't={time.time() - T0:.1f}s')

# ---- model-light statistics with simulated nulls: KPSS, Dicke ratio, lag-1 autocorrelation of lengths, structure function
X = np.c_[np.ones(N), n]; Mp = np.eye(N) - X @ np.linalg.solve(X.T @ X, X.T); KS = [1, 2, 4, 8, 12]
def stats_of(T):
    E = Mp @ T; Ld = np.diff(T, axis=0); Lc = Ld - Ld.mean(0)
    return np.array([(np.cumsum(E, 0) ** 2).sum(0) / (N ** 2 * (E ** 2).mean(0)), (E[1:] ** 2).sum(0) / (np.diff(E, axis=0) ** 2).sum(0),
                     (Lc[:-1] * Lc[1:]).sum(0) / (Lc ** 2).sum(0)] + [((T[k:] - T[:-k] - k * Ld.mean(0)) ** 2).mean(0) for k in KS])
def simulate(sw, sc, B, seed):
    rng = np.random.default_rng(seed); out = []
    for _ in range(B // 50000):
        Z = rng.standard_normal((2, N, 50000))
        out.append(stats_of(11.0 * n[:, None] + np.cumsum(sw * Z[0], 0) + np.sqrt(sc ** 2 + s2)[:, None] * Z[1]))
    return np.concatenate(out, axis=1)
obs = stats_of(t[:, None])[:, 0]; SC = simulate(0.0, F['sc_clock'], 1000000, SEEDS['sims']); SR = simulate(F['sw_rw'], 0.0, 1000000, SEEDS['sims'] + 1)
up = lambda S, o: float((1 + (S >= o).sum()) / (S.size + 1)); dn = lambda S, o: float((1 + (S <= o).sum()) / (S.size + 1))
tests = {nm: dict(obs=float(obs[i]), mean_clock=float(SC[i].mean()), mean_rw=float(SR[i].mean()), p_clock=up(SC[i], obs[i]),
                  p_rw=dn(SR[i], obs[i])) for i, nm in enumerate(['kpss', 'dicke', 'r1'])}          # all three grow under a random walk
dicke_exp = dict(clock=(N ** 2 - 1) / (2 * (N ** 2 + 2 * N + 3)), rw=(N + 2) * (N ** 2 - 1) / (3 * (5 * N ** 2 + 6 * N - 3)))
sfun = {str(k): dict(obs=float(obs[3 + i]), rw_mean=float(SR[3 + i].mean()), rw_90=np.percentile(SR[3 + i], [5, 95]).tolist(),
                     p_rw_two=float(2 * min(up(SR[3 + i], obs[3 + i]), dn(SR[3 + i], obs[3 + i]))), clock_mean=float(SC[3 + i].mean()),
                     clock_90=np.percentile(SC[3 + i], [5, 95]).tolist(), p_clock_low=dn(SC[3 + i], obs[3 + i])) for i, k in enumerate(KS)}

# ---- goodness of fit of the best model (standardized innovations) and leave-one-epoch-out influence
_, P, Pse, z = reml(t, n, s2, F['sw'], F['sc'], full=True)
lb = acorr_ljungbox(z, lags=[5], return_df=True); swt = stats.shapiro(z)
gof = dict(shapiro_W=float(swt.statistic), shapiro_p=float(swt.pvalue), ljungbox_Q5=float(lb.lb_stat.iloc[0]), ljungbox_p=float(lb.lb_pvalue.iloc[0]),
           max_abs_z=float(abs(z).max()), max_z_cycle_start=float(t[int(abs(z).argmax())]), skew=float(stats.skew(z)), ex_kurt=float(stats.kurtosis(z)))
jk = np.array([fit(np.delete(t, j), np.delete(n, j), np.delete(s2, j))['sw'] for j in range(N)])

# ---- systematic variants of the epoch extraction, subsamples, derived quantities
def derived(sw, P):                     # <dphi^2> = 2 D_phi t; correlation time 1/D_phi; Lorentzian line quality factor pi*tau_c/P
    Dphi = 2 * np.pi ** 2 * sw ** 2 / P ** 3; return dict(D_phi=Dphi, tau_c=1 / Dphi, N_coh=1 / Dphi / P, Q=np.pi / Dphi / P, eps=sw / P)
def dint(w68, sw, P, Pse):              # 68% intervals: sigma_w profile interval combined in quadrature with the error of P (log scale)
    D0 = derived(sw, P); out = {}
    for q in D0:
        v = [np.log(derived(w, P)[q] / D0[q]) for w in w68]; e = dict(D_phi=3, tau_c=3, N_coh=2, Q=2, eps=1)[q] * Pse / P   # |d ln q / d ln P|
        out[q] = [D0[q] * np.exp(-np.hypot(min(v), e)), D0[q] * np.exp(np.hypot(max(v), e))]
    return out
VARS = dict(baseline=dict(), gauss24=dict(k=KG), monthly=dict(refine=False), err_f1=dict(f=1.0), err_f4=dict(f=4.0), no_err=dict(err=False),
            from1823=dict(), maxima=dict(sign=-1))
var, EP = {}, {}
for i, (nm, kw) in enumerate(VARS.items()):
    tv, nv, sv = (t, n, s) if nm in ('baseline', 'from1823') else epochs(seed=SEEDS['variants'] + i, **kw)
    if nm == 'from1823': keep = tv >= 1823; tv, nv, sv = tv[keep], nv[keep] - nv[keep][0], sv[keep]
    EP[nm] = tv
    Fv = F if nm == 'baseline' else fit(tv, nv, sv ** 2); lo, hi = bounds(Fv['prof'], Fv['sw'], Fv['ll'], 1.0)
    qv = qc[:20000] if nm == 'baseline' else boot(prep(nv, sv ** 2, pars), Vmat(nv, sv ** 2, 0.0, Fv['sc_clock']), 20000,
                                                 SEEDS['variants'] + 50 + i, pw == 0)[0]
    var[nm] = dict(N=len(tv), first=float(tv[0]), last=float(tv[-1]), sw=Fv['sw'], sw68=[lo, hi], sc=Fv['sc'], P=Fv['P'], P_se=Fv['P_se'],
                   q_clock=Fv['q_clock'], p_clock_2e4=float((1 + (qv >= Fv['q_clock']).sum()) / 20001), q_rw=Fv['q_rw'],
                   s_median=float(np.median(sv)), s_max=float(sv.max()), **derived(Fv['sw'], Fv['P']),
                   derived68=dint([lo, hi], Fv['sw'], Fv['P'], Fv['P_se']))
src = dict(kernel=['gauss24'], quantisation=['monthly'], error_model=['err_f1', 'err_f4', 'no_err'])
syst = {q: float(np.sqrt(sum(max(abs(var[v][q] - var['baseline'][q]) for v in vs) ** 2 for vs in src.values())))
        for q in ['sw', 'P', 'D_phi', 'tau_c', 'N_coh', 'Q', 'eps']}
D0 = derived(F['sw'], P); stat68 = dint(w68, F['sw'], P, Pse)
# ======================= referee round 2: added analyses, each on its own independent random stream =======================
KIDS = dict(zip(['pivot', 'ney_sc', 'ney_ar', 'amp_clock', 'amp_rw', 'amp_corr', 'lost_clock', 'lost_rw', 'silso', 'bands'],
                np.random.SeedSequence(20261025).spawn(10)))           # none of these overlaps any integer seed above
def ub95(k, B): return float(stats.beta.ppf(0.95, k + 1, B - k))       # one-sided 95% upper bound on a bootstrap tail probability
def crossing(v, qo, c95, side):                                         # same interpolation rule as neyman()
    ok = qo <= c95; j = np.where(ok)[0]
    if len(j) == 0: return np.nan
    k = j.max() if side < 0 else j.min(); k2 = k + (1 if side < 0 else -1)
    if 0 <= k2 < len(v) and not ok[k2]:
        d1, d2 = qo[k] - c95[k], qo[k2] - c95[k2]; return v[k] + (v[k2] - v[k]) * d1 / (d1 - d2)
    return v[k]
def neyman2(pr, Zo_, sel, scan, null, side, ss, B=20000, R=2000):       # Neyman scan with the MC error of the interpolated limit
    kids = ss.spawn(len(scan) + 1); qo, c95, QQ = [], [], []
    for i, v0 in enumerate(scan):
        mk = np.isclose(sel, v0); qb, am = boot(pr, null(v0), B, kids[i], mk, arg=True)
        QQ.append(np.sort(np.where(side * (sel[am] - v0) > 0, qb, 0.0))); qo.append(Zo_[mk].min() - Zo_.min()); c95.append(np.percentile(QQ[-1], 95))
    qo, c95 = np.array(qo), np.array(c95)
    J = np.random.default_rng(kids[-1]).binomial(B - 1, 0.95, size=(R, len(scan)))   # bootstrap of each 95% quantile through its order statistic
    reps = np.array([crossing(scan, qo, np.array([QQ[i][J[r, i]] for i in range(len(scan))]), side) for r in range(R)])
    return dict(limit=float(crossing(scan, qo, c95, side)), mcse=float(np.nanstd(reps, ddof=1)), B_per_point=B,
                q_obs=qo.tolist(), q95=c95.tolist(), q95_mcse=[float(np.std(QQ[i][J[:, i]], ddof=1)) for i in range(len(scan))]), reps
ney_sc2, _ = neyman2(PR, Zo, pc, C_SCAN, lambda c0: Vmat(n, s2, profc(c0)[1], c0), -1, KIDS['ney_sc'])
ney_ar2, ar_reps = neyman2(PRa, Zoa, paa, agrid[12:37], lambda a0: Vmat(n, s2, argmax1(lambda e: reml(t, n, s2, e, 0.0, a0))[1], 0.0, a0), +1, KIDS['ney_ar'])
tau_reps = -P / np.log(ar_reps); ney_ar2.update(tau_lo_years=float(-P / np.log(ney_ar2['limit'])), tau_lo_years_mcse=float(np.nanstd(tau_reps, ddof=1)),
                                               tau_lo_cycles=float(-1 / np.log(ney_ar2['limit'])))
pk = KIDS['pivot'].spawn(2)                                              # nuisance-parameter check on fresh streams
pivot2 = {str(f): float((boot(PR, Vmat(n, s2, 0.0, f * F['sc_clock']), 200000, pk[j], pw == 0)[0] >= 10).mean()) for j, f in enumerate([0.7, 1.4])}
print(f'neyman v2: sc_ul {ney_sc2["limit"]:.3f}+-{ney_sc2["mcse"]:.3f}  a_lo {ney_ar2["limit"]:.3f}+-{ney_ar2["mcse"]:.3f}; t={time.time() - T0:.1f}s')

# ---- (R3) amplitude-driven shifts of the minimum epochs (cycle overlap / Waldmeier effect)
Sb = smooth(x, K13)[0]; fin = np.isfinite(Sb)
A = np.array([Sb[fin & (ty > t[k]) & (ty < (t[k + 1] if k + 1 < N else np.inf))].max() for k in range(N)])  # peak of the cycle that starts at t_k
iAl = int(np.argmax(np.where(fin & (ty > t[-1]), Sb, -np.inf)))       # current cycle: peak lies well before the end of the smoothed series
oc = Mp @ t; Ac = (A - A.mean()) / 100.0                                # O-C about the OLS ephemeris; amplitude in units of 100 SN
PAIRS = dict(prev_oc=(A[:-1], oc[1:]), next_oc=(A, oc), own_len=(A[:-1], L), next_len=(A[1:], L))
cor = {k: float(np.corrcoef(a, b)[0, 1]) for k, (a, b) in PAIRS.items()}
rr = np.random.default_rng(KIDS['amp_corr']); Bc = 100000; Zr = rr.standard_normal((2, N, Bc))   # random-walk null, amplitudes held fixed
Tr = 11.0 * n[:, None] + np.cumsum(F['sw_rw'] * Zr[0], 0) + s[:, None] * Zr[1]; Er, Lr = Mp @ Tr, np.diff(Tr, axis=0)
def rcols(a, Mx): a = (a - a.mean()) / a.std(); return (a[:, None] * (Mx - Mx.mean(0)) / Mx.std(0)).mean(0)
rnull = dict(prev_oc=rcols(A[:-1], Er[1:]), next_oc=rcols(A, Er), own_len=rcols(A[:-1], Lr), next_len=rcols(A[1:], Lr))
p_cor = {k: float((1 + (np.abs(rnull[k]) >= abs(cor[k])).sum()) / (Bc + 1)) for k in cor}
p_cor_naive = {k: float(stats.pearsonr(a, b)[1]) for k, (a, b) in PAIRS.items()}
def reml_fx(tt, nn, s2_, XX, sw, sc, full=False):                      # REML on the differences with several fixed effects
    Dm = np.diff(np.eye(len(nn)), axis=0); Lc_ = np.linalg.cholesky(Vmat(nn, s2_, sw, sc))
    ld = solve_triangular(Lc_, Dm @ tt, lower=True); lG = solve_triangular(Lc_, Dm @ XX, lower=True)
    C = lG.T @ lG; b = np.linalg.solve(C, lG.T @ ld); r = ld - lG @ b
    ll = -0.5 * (2 * np.log(np.diag(Lc_)).sum() + np.linalg.slogdet(C)[1] + r @ r)
    return (ll, b, np.sqrt(np.diag(np.linalg.inv(C)))) if full else ll
def fit_fx(tt, nn, s2_, XX):
    prof = lambda w: argmax1(lambda c: reml_fx(tt, nn, s2_, XX, w, c))[0]
    ll, sw = argmax1(prof); sc = argmax1(lambda c: reml_fx(tt, nn, s2_, XX, sw, c))[1]
    llc, scc = argmax1(lambda c: reml_fx(tt, nn, s2_, XX, 0.0, c)); llr, swr = argmax1(lambda w: reml_fx(tt, nn, s2_, XX, w, 0.0))
    _, b, bse = reml_fx(tt, nn, s2_, XX, sw, sc, full=True)
    return dict(N=len(tt), sw=sw, sw68=list(bounds(prof, sw, ll, 1.0)), sc=sc, P=b[0], P_se=bse[0], beta=b[1:].tolist(), beta_se=bse[1:].tolist(),
                beta_z=(b[1:] / bse[1:]).tolist(), q_clock=2 * (ll - llc), q_rw=2 * (ll - llr), sc_clock=scc, sw_rw=swr)
def prep_fx(nn, s2_, XX):                                               # grid version of reml_fx for the bootstrap
    Dm = np.diff(np.eye(len(nn)), axis=0); G = Dm @ XX; m = G.shape[0]; iu = np.triu_indices(m); Wf, K, ld = [], [], []
    for sw, sc, _ in pars:
        Lc_ = np.linalg.cholesky(Vmat(nn, s2_, sw, sc)); Li = solve_triangular(Lc_, np.eye(m), lower=True); W = Li.T @ Li; C = G.T @ W @ G
        Wf.append((W * (2 - np.eye(m)))[iu]); K.append(np.linalg.cholesky(np.linalg.inv(C)).T @ G.T @ W); ld.append(2 * np.log(np.diag(Lc_)).sum() + np.linalg.slogdet(C)[1])
    return np.array(Wf), np.concatenate(K), np.array(ld), iu, G.shape[1], m, Dm
def gz_fx(pr, Dd):
    Wf, K, ld, iu, r, m, _ = pr; Zx = Wf @ (Dd[iu[0]] * Dd[iu[1]]); Zx -= ((K @ Dd) ** 2).reshape(len(ld), r, -1).sum(1); Zx += ld[:, None]; return Zx
def boot_fx(pr, Vtrue, B, ss, mask, chunk=2000):
    rng = np.random.default_rng(ss); L0 = np.linalg.cholesky(Vtrue); q = []
    for b0 in range(0, B, chunk):
        Zx = gz_fx(pr, L0 @ rng.standard_normal((pr[5], min(chunk, B - b0)))); q.append(Zx[mask].min(0) - Zx.min(0))
    return np.concatenate(q)
j1 = np.arange(1, N)                                                    # minima that have a preceding cycle in the record
AMP = dict(prev=(j1, np.c_[n[j1], Ac[j1 - 1]]), next=(np.arange(N), np.c_[n, Ac]), both=(j1, np.c_[n[j1], Ac[j1 - 1], Ac[j1]]))
amp = {nm: fit_fx(t[jj], n[jj], s2[jj], XX.astype(float)) for nm, (jj, XX) in AMP.items()}
amp['base_same_24'] = fit_fx(t[j1], n[j1], s2[j1], n[j1][:, None].astype(float))   # like-for-like baseline on the 24 epochs used by 'prev'/'both'
jj, XX = AMP['both']; XX = XX.astype(float); Fb = amp['both']; prb = prep_fx(n[jj], s2[jj], XX)
Zb = gz_fx(prb, (prb[6] @ t[jj])[:, None])[:, 0]; B_amp = 1000000
qa = boot_fx(prb, Vmat(n[jj], s2[jj], 0.0, Fb['sc_clock']), B_amp, KIDS['amp_clock'], pw == 0)
qa_rw = boot_fx(prb, Vmat(n[jj], s2[jj], Fb['sw_rw'], 0.0), 20000, KIDS['amp_rw'], pc == 0)
na = int((qa >= Fb['q_clock']).sum()); Fb.update(q_clock_grid=float(Zb[pw == 0].min() - Zb.min()), B_clock=B_amp, n_null_exceed=na, max_q_null=float(qa.max()),
    p_clock_boot=(1 + na) / (B_amp + 1), p_clock_ub95=ub95(na, B_amp), null_frac_q0=float((qa < 1e-6).mean()), null_q99=float(np.percentile(qa, 99)),
    p_rw_boot=float((1 + (qa_rw >= Fb['q_rw']).sum()) / 20001), derived=derived(Fb['sw'], Fb['P']), derived68=dint(Fb['sw68'], Fb['sw'], Fb['P'], Fb['P_se']))
t_corr = t[jj] - XX[:, 1:] @ np.array(Fb['beta'])                     # epochs with the fitted amplitude displacement removed
Xj = np.c_[np.ones(len(jj)), n[jj]]; oc_corr = t_corr - Xj @ np.linalg.lstsq(Xj, t_corr, rcond=None)[0]
cor_after = dict(prev_oc=float(np.corrcoef(A[jj - 1], oc_corr)[0, 1]), next_oc=float(np.corrcoef(A[jj], oc_corr)[0, 1]))
print('amplitude', {k: round(v, 3) for k, v in cor.items()}, 'p_mc', p_cor, 'both', {k: Fb[k] for k in ('sw', 'sc', 'beta', 'beta_z', 'q_clock')},
      f'p {Fb["p_clock_boot"]:.1e}; t={time.time() - T0:.1f}s')

# ---- (R4) lost-cycle variant: 1784.695-1798.319 counted as two cycles; era test and two-era intervals
n_lc = n + (t > 1790); F_lc = fit(t, n_lc, s2); pr_lc = prep(n_lc, s2, pars); B_lc = 1000000
ql = boot(pr_lc, Vmat(n_lc, s2, 0.0, F_lc['sc_clock']), B_lc, KIDS['lost_clock'], pw == 0)[0]
ql_rw = boot(pr_lc, Vmat(n_lc, s2, F_lc['sw_rw'], 0.0), 20000, KIDS['lost_rw'], pc == 0)[0]
nl = int((ql >= F_lc['q_clock']).sum()); r3 = optimize.minimize(lambda p: -reml(t, n_lc, s2, np.where(early, abs(p[0]), abs(p[1])), 0.0), [1.5, 0.9], method='Nelder-Mead')
lost = dict(N=N, n_cycles=int(n_lc[-1]), sw=F_lc['sw'], sw68=list(bounds(F_lc['prof'], F_lc['sw'], F_lc['ll'], 1.0)), sc=F_lc['sc'], P=F_lc['P'], P_se=F_lc['P_se'],
            q_clock=F_lc['q_clock'], q_rw=F_lc['q_rw'], sc_clock=F_lc['sc_clock'], B_clock=B_lc, n_null_exceed=nl, max_q_null=float(ql.max()),
            p_clock_boot=(1 + nl) / (B_lc + 1), p_clock_ub95=ub95(nl, B_lc), p_rw_boot=float((1 + (ql_rw >= F_lc['q_rw']).sum()) / 20001),
            sw_early=abs(r3.x[0]), sw_late=abs(r3.x[1]), era_q_LR=float(2 * (-r3.fun - F_lc['ll_rw'])), era_p_LR=float(stats.chi2.sf(2 * (-r3.fun - F_lc['ll_rw']), 1)),
            derived=derived(F_lc['sw'], F_lc['P']))
lle = lambda we, wl: reml(t, n, s2, np.where(early, we, wl), 0.0)       # two eras, original numbering: profile intervals
pe = lambda v: argmax1(lambda u: lle(v, u))[0]; pl = lambda v: argmax1(lambda u: lle(u, v))[0]
ll2, swe = argmax1(pe); swl = argmax1(lambda u: lle(swe, u))[1]; _, P2, P2se, _ = reml(t, n, s2, np.where(early, swe, swl), 0.0, full=True)
e68 = list(bounds(pe, swe, ll2, 1.0))
era2 = dict(sw_early=swe, sw_early68=e68, sw_late=swl, sw_late68=list(bounds(pl, swl, ll2, 1.0)), P=P2, P_se=P2se,
            derived_early=derived(swe, P2), derived_early68=dint(e68, swe, P2, P2se), derived_late=derived(swl, P2))
ratios = dict(D_phi_maxima_over_minima=var['maxima']['D_phi'] / var['baseline']['D_phi'], sw_amp_over_base=Fb['sw'] / F['sw'],
              sw_amp_over_base_same_24=Fb['sw'] / amp['base_same_24']['sw'], D_phi_early_over_late=era2['derived_early']['D_phi'] / era2['derived_late']['D_phi'])
print('lost cycle', {k: lost[k] for k in ('sw', 'P', 'q_clock', 'p_clock_boot', 'era_p_LR')}, 'era2', era2['sw_early68'], f't={time.time() - T0:.1f}s')

# ---- (R8, R9) post-1823 forecast, kernel shift of individual epochs, SILSO-table epochs, O-C bands for the residual table
v23 = var['from1823']; pred23 = dict(next_min=float(t[-1] + v23['P']), sd=float(np.sqrt(v23['sw'] ** 2 + s2[-1] + v23['P_se'] ** 2)))
dk = EP['gauss24'] - t; kshift = dict(max_abs=float(abs(dk).max()), at_epoch=float(t[int(abs(dk).argmax())]), rms=float(np.sqrt((dk ** 2).mean())))
ts = np.array([y + (mo - 0.5) / 12 for y, mo in SILSO]); i96 = int(np.argmin(abs(t - 1996.4))); t96 = t.copy(); t96[i96] = ts[i96]
silso = {}; sk = KIDS['silso'].spawn(2)
for k, (nm, tt, ss_) in enumerate([('table', ts, np.full(N, (1 / 12) ** 2 / 12)), ('1996_only', t96, s2)]):
    Fv = fit(tt, n, ss_); qv = boot(prep(n, ss_, pars), Vmat(n, ss_, 0.0, Fv['sc_clock']), 20000, sk[k], pw == 0)[0]
    silso[nm] = dict(sw=Fv['sw'], sw68=list(bounds(Fv['prof'], Fv['sw'], Fv['ll'], 1.0)), sc=Fv['sc'], P=Fv['P'], q_clock=Fv['q_clock'],
                     p_clock_2e4=float((1 + (qv >= Fv['q_clock']).sum()) / 20001), epoch_1996=float(tt[i96]))
rb = np.random.default_rng(KIDS['bands']); Zq = rb.standard_normal((3, N, 100000))
Ec = Mp @ (11.0 * n[:, None] + np.sqrt(F['sc_clock'] ** 2 + s2)[:, None] * Zq[0])          # clock null
Ew = Mp @ (11.0 * n[:, None] + np.cumsum(F['sw_rw'] * Zq[1], 0) + s[:, None] * Zq[2])     # random-walk null
oc_table = dict(epoch=t.tolist(), oc=oc.tolist(), s_n=s.tolist(), amplitude_next=A.tolist(), clock90=np.percentile(Ec, [5, 95], axis=1).T.tolist(),
                rw90=np.percentile(Ew, [5, 95], axis=1).T.tolist(), oc_amp_corrected=[None] + oc_corr.tolist())
print(f'extras done; t={time.time() - T0:.1f}s')

hyp = bool(p_clock < 0.01 and p_rw >= 0.05)
res = dict(n_months=M, first_month=float(ty[0]), last_month=float(ty[-1]), n_months_with_silso_se=int(has.sum()), n_zero_dispersion_months=n_zero,
           err_model=dict(kappa=float(np.sqrt(kap2)), c=float(kap2c / kap2), f_baseline=2.0), N_epochs=N, epochs=[round(float(v), 3) for v in t],
           epoch_sd=[round(float(v), 3) for v in s], silso_diff_months=[round(float(v), 2) for v in dsil],
           cycle_lengths=dict(mean=float(L.mean()), sd=float(L.std(ddof=1)), min=float(L.min()), max=float(L.max())),
           sw=F['sw'], sw68=list(w68), sw95=list(w95), sw68_exact_chi2=w68_exact, sc=F['sc'], sc_ul95_chi2=sc_ul_chi2, sc_ul95_neyman=float(sc_ul), P=float(P), P_se=float(Pse),
           ll_full=F['ll'], ll_clock=F['ll_clock'], ll_rw=F['ll_rw'], sc_clock=F['sc_clock'], sw_rw=F['sw_rw'], q_clock=F['q_clock'],
           q_clock_grid=float(q_clock_grid), B_clock=B_c, p_clock_boot=float(p_clock), z_boot_bound=float(stats.norm.isf(p_clock)),
           n_null_exceed=int((qc >= F['q_clock']).sum()), max_q_null=float(qc.max()), null_frac_q0=float((qc < 1e-6).mean()),
           null_q95=float(np.percentile(qc, 95)), null_q99=float(np.percentile(qc, 99)), tail_vs_mixture=tail, null_frac_q10_vs_sc_scale=pivot, p_clock_mixture=float(mixsf(F['q_clock'])),
           z_mixture=float(stats.norm.isf(mixsf(F['q_clock']))), q_rw=F['q_rw'], p_rw_boot=float(p_rw), B_rw=B_r, rw_null_frac_q0=float((qr < 1e-6).mean()),
           neyman_sc=[[float(v) for v in r] for r in ney_sc], ar_a_hat=float(a_hat), ar_2dll_rw_vs_best=float(2 * (lla.max() - lla[-1])),
           ar_2dll_clock_vs_best=float(2 * (lla.max() - lla[0])), ar_tau_hat_cycles=float(-1 / np.log(a_hat)) if 0 < a_hat < 1 else None,
           ar_a_lo95_neyman=float(a_lo), sc_ul95_neyman_note='interpolated crossing of q_obs and the 95% quantile', ar_tau_lo_cycles=float(-1 / np.log(a_lo)) if 0 < a_lo < 1 else None,
           ar_tau_lo_years=float(-P / np.log(a_lo)) if 0 < a_lo < 1 else None, neyman_ar=[[float(v) for v in r] for r in ney_ar],
           era_homogeneity=era, tests=tests, dicke_expect=dicke_exp, structure_fn=sfun, gof=gof,
           jackknife_sw=dict(min=float(jk.min()), max=float(jk.max()), most_influential_epoch=float(t[int(abs(jk - F['sw']).argmax())])),
           derived=D0, derived_stat68=stat68, syst=syst, variants=var, prediction=dict(rw_next_min=float(t[-1] + P),
           rw_next_sd=float(np.sqrt(F['sw'] ** 2 + s2[-1] + Pse ** 2))), seeds=SEEDS, hypothesis_supported=hyp, runtime_s=time.time() - T0)
res.update(referee2=dict(streams='numpy SeedSequence(20261025).spawn(10): ' + ', '.join(KIDS), ney_sc=ney_sc2, ney_ar=ney_ar2, pivot=pivot2,
    amplitude=dict(A=A.tolist(), current_cycle_peak_year=float(ty[iAl]), current_cycle_peak=float(Sb[iAl]), last_smoothed_year=float(ty[fin][-1]),
                   last_smoothed=float(Sb[fin][-1]), corr=cor, p_corr_rw_mc=p_cor, p_corr_naive=p_cor_naive, B_corr=Bc, fits=amp, corr_after=cor_after),
    lost_cycle=lost, era2=era2, ratios=ratios, pred_1823=pred23, kernel_shift=kshift, silso_epochs=silso, oc_table=oc_table,
    derived68_P_exponent=dict(D_phi=3, tau_c=3, N_coh=2, Q=2, eps=1), main_clock_p_ub95=ub95(int((qc >= F['q_clock']).sum()), B_c),
    hypothesis_supported_amp_corrected=bool(Fb['p_clock_boot'] < 0.01 and Fb['p_rw_boot'] >= 0.05),
    hypothesis_supported_lost_cycle=bool(lost['p_clock_boot'] < 0.01 and lost['p_rw_boot'] >= 0.05)), runtime_s=time.time() - T0)
def clean(o):
    if isinstance(o, dict): return {k: clean(v) for k, v in o.items() if k != 'prof'}
    if isinstance(o, (list, tuple, np.ndarray)): return [clean(v) for v in o]
    if isinstance(o, (np.floating, float)): return float(o) if np.isfinite(o) else None
    if isinstance(o, (np.integer,)): return int(o)
    if isinstance(o, np.bool_): return bool(o)
    return o
print('RESULT_JSON: ' + json.dumps(clean(res)))
Listing. experiment_v1.py

4.Analysis

Attempt 4Done

Analysis complete: experiment succeeded; hypothesis supported; 18 key numbers.

Reviewer feedback applied: Independent referee (Claude Fable 5.1), consistency revision: minor_revision. Required changes: (1) [text] Bring the Letter back to compact form within the venue's length limit: move the SILSO-table-epoch, kernel-shift and extraction-variant rows (and the maxima row if needed) from Table II to the Supplemental Material, keep in Table II only the fits that carry the argument (baseline, clock, locking, two eras, since 1823, amplitude-corrected, lost cycle, fit quality), and confirm with the APS length estimate that text plus table and equation equivalents stay under 3750 words. (2) [text] State the D_phi spread the same way in the abstract and the Discussion, either '2-4x relative to the full-record value' in both or 'a factor of about 5 across definitions' in both. (3) [text] Replace 'Amplitude-dependent shifts of the minima are real' with 'are detected' and the supporting numbers (r = -0.51, calibrated p = 0.013; beta_- at 3.9 sigma), noting that four amplitude correlations were examined and two are significant. Keep the analysis record consistent with the paper.
Hypothesis supportedExperiment succeeded

Results and analysis

The run succeeded in one round (61 s) with the Chinese edition's extended script, byte-identical; every earlier value reproduced exactly except the 68% intervals of tau_c/P and Q, whose period-error factor was corrected from 3 to 2. From 3327 definitive SILSO v2.0 months, 25 minimum epochs (1755.16-2019.95) were extracted. Since 1823 (19 minima with measured epoch errors) the random-walk step is sigma_w = 0.88 yr per cycle (68%: 0.69-1.06), Q = 24.5 (16.9-40.5); cycles beginning before 1823 scatter more (F-test p = 0.016, LR p = 0.027), so the full record gives 1.17 (0.99-1.36) yr and Q = 14.2. The pure clock is rejected: none of 2 x 10^6 Gaussian-jitter null replicates reached the observed q = 25.26 (largest 25.20), a resolution-limited p = 5.0 x 10^-7 with binomial 95% upper bound 1.5 x 10^-6; since 1823, none of 2 x 10^4 reached q = 17.30. The random-walk null is retained (p = 0.55). Amplitude-dependent shifts of the minimum epochs are detected (two of the four amplitude correlations examined are significant): a cycle's amplitude correlates with the O-C of the minimum ending it (r = -0.51, p = 0.013 against random walks at fixed amplitudes) and a cycle's length with the next amplitude (r = -0.70). With both adjacent amplitudes as fixed effects, sigma_w on the same 24 minima falls from 1.19 to 0.87 yr, conditional on the amplitudes being exogenous, while the clock statistic rises from 24.35 to 28.41 (0 of 10^6 replicates, largest 21.28). Counting 1784-1798 as two cycles gives sigma_w = 1.56 (1.36-1.82) yr and P = 10.59 +/- 0.31 yr, and the clock is still rejected (0 of 10^6). With 2 x 10^4 replicates per scan point, sigma_c < 0.63 yr (0.626 +/- 0.005) and a > 0.67 (0.672 +/- 0.002), so locking slower than 27.7 +/- 0.2 yr is not excluded. The hypothesis is supported, but relative to its full-record value D_phi changes 2-4x with the definition: 2.8x minima to maxima, 4.1x between eras, 2.0x with the lost cycle, 1.8x with the amplitude correction.

Key numbers

MetricValueInterpretation
Sample3327 definitive months (1749.042-2026.204); 2498 with SILSO dispersions; 25 minimum epochs 1755.162-2019.945Twenty-four complete minimum-to-minimum cycles; five provisional months excluded, no missing months.
Post-1823 subsample (leading estimate)N = 19; sigma_w = 0.881 (68%: 0.685-1.058) yr; P = 10.923 +/- 0.208 yr; D_phi = 0.0118 (0.0071-0.0170) rad^2/yr; tau_c = 85 (59-141) yr; Q = 24.5 (16.9-40.5); q_clock = 17.30, 0 of 2 x 10^4 replicatesThe cleaner estimate, with measured epoch errors and without the sparse 18th-century data; the clock is rejected here too.
Full-record REML fitsigma_w = 1.166 yr (68%: 0.992-1.365; 95%: 0.773-1.612; syst 0.018); sigma_c = 0; P = 11.033 +/- 0.238 yrAverages the post-1823 regime with noisier early cycles.
Clock likelihood-ratio testq = 25.26; 0 of 2,000,000 null replicates >= q (largest 25.20); p = 5.0e-7 (resolution limit), binomial 95% upper bound 1.5e-6A clock with Gaussian white jitter is rejected at the resolution limit of the bootstrap; we read it as p of order 1e-6 or below.
Random-walk null testq_rw = 0, p = 0.55 (2 x 10^4 replicates)No white jitter is detected alongside the random walk.
Amplitude-O-C couplingr(amplitude of cycle, O-C of the minimum ending it) = -0.508, p = 0.013; r(cycle length, next amplitude) = -0.697, p = 8.0e-5; r(amplitude, O-C of the minimum opening it) = -0.278, p = 0.19 (10^5 random walks, amplitudes fixed)Amplitude-dependent shifts of the minimum epochs (cycle overlap, Waldmeier effect) are detected: two of the four correlations examined are significant, and beta_- in the corrected fit is 3.9 sigma from zero.
Amplitude-corrected fit (24 minima)beta_- = -1.10 +/- 0.28, beta_+ = -0.79 +/- 0.28 yr per 100 SN (z = -3.93, -2.83); sigma_w = 0.866 (0.656-1.053) yr vs 1.192 (1.014-1.400) uncorrected; sigma_c = 0.134; P = 11.000 +/- 0.181; residual correlations -0.09, +0.08Removing the shifts lowers sigma_w by 27%, conditional on the amplitudes being exogenous; amplitude and phase share one dynamo, so 0.87 yr may be low.
Clock test after amplitude correctionq = 28.41 (uncorrected 24.35); 0 of 10^6 replicates (largest 21.28), binomial 95% upper bound 3.0e-6; random-walk null p = 0.50A linear amplitude effect does not mimic the accumulation; the clock rejection strengthens.
Lost-cycle variant (1784.695-1798.319 as two cycles)sigma_w = 1.56 (1.36-1.82) yr; P = 10.59 +/- 0.31 yr; q = 30.28, 0 of 10^6 (largest 21.94); random-walk p = 0.55; eras 2.74 vs 0.88 yr, LR p = 3.3e-4 (chi-square_1, approximate); D_phi = 0.041A stress test (two cycles averaging 6.8 yr): the clock is still rejected and the era contrast sharpens.
Neyman limits with Monte Carlo errorssigma_c < 0.626 +/- 0.005 yr; a > 0.672 +/- 0.002; tau_lock > 27.7 +/- 0.2 yr = 2.51 cycles (2 x 10^4 replicates per point, independent streams); original 4000-replicate scans 0.616 and 0.667Quoted as sigma_c < 0.63 yr and a > 0.67: white jitter below 0.63 yr and locking slower than about 28 yr remain allowed.
Phase-locking profilegrid maximum a = 0.925 on a flat profile; 2 Delta lnL vs a = 1: 0.06; vs a = 0: 25.33Indistinguishable from a free random walk.
Era homogeneitysigma_w 1.77 (1.35-2.45) yr before 1823 (6 cycles) vs 0.88 (0.75-1.06) after; F = 4.56, p = 0.016; LR p = 0.027Suggestive, not conclusive, evidence for larger early phase steps.
Definition dependence of D_phiD_phi (rad^2/yr): post-1823 0.0118, amplitude-corrected 0.0111, full record 0.0200, pre-1823 0.047, lost cycle 0.041, maxima 0.056; ratios maxima/minima 2.8, early/late 4.1, lost/full 2.0, full/corrected 1.8; Q from 5.1 to 25.7Relative to the full-record value, the phase marker, era and treatment change D_phi 2-4x (about 5x end to end), far more than the extraction systematic (D_phi +/- 0.0005).
Model-light cross-checksKPSS 0.436 (p_clock = 2.0e-6, p_RW = 0.85); Dicke ratio 2.19 (p_clock = 1.0e-6, p_RW = 0.79); r_1 = +0.10 vs -0.46 for a clock (p_clock = 2.7e-4, p_RW = 0.78); S(1) = 1.33 yr^2 (clock p = 2.5e-4)Distribution-light statistics reject the clock and agree with the random walk.
Goodness of fit and influenceShapiro-Wilk p = 0.92; Ljung-Box Q5 = 3.59, p = 0.61; max |z| = 2.16 (cycle from 1784.695); leave-one-out sigma_w 1.01-1.19, most influential epoch 1784.695Gaussian, uncorrelated innovations; the 1784-1798 interval is the main early uncertainty.
Epoch definition checks24-month Gaussian kernel moves single epochs by up to 0.755 yr (1890.169), rms 0.297 yr; SILSO-table epochs: sigma_w = 1.156, q = 25.61; 1996 at its SILSO month only: sigma_w = 1.142, q = 25.79Definitional epoch shifts exceed s_n but change sigma_w by at most 0.02 yr; these checks are reported in the Supplemental Material.
Cycle maximaN = 24; sigma_w = 1.947 (1.408-2.334); sigma_c = 0.289; q = 9.15, p_clock = 1.1e-3Maxima also reject the clock but are a noisier, not independent marker.
Random-walk forecasts of the next minimum2030.9 +/- 0.9 yr (post-1823 step and period); 2031.0 +/- 1.2 yr (full record)Falsifiable timing predictions for the start of cycle 26.

Caveats

  • One dataset and 25 epochs; the era difference rests on 6 early cycles.
  • The amplitude correction is linear, uses only the adjacent cycles, treats amplitudes as exogenous fixed effects and was fitted on the full record only, not the post-1823 subsample; since amplitude and phase come from the same dynamo, the corrected sigma_w = 0.87 yr may be biased low.
  • The lost-cycle variant splits the 1784-1798 interval rather than inserting the epochs of Usoskin et al.; it is a stress test.
  • The clock p-values are bootstrap resolution limits conditional on Gaussian white jitter under the null; the chi-square mixture's 5.03 sigma is not used.
  • The sigma_c upper limit and the AR(1) lower limit hold only within the nested random-walk-plus-jitter and AR(1) phase models.
  • D_phi, tau_c and Q depend on the phase marker, era and treatment: 2-4x relative to the full-record value, about 5x end to end; extraction systematics were evaluated on the full record only.
  • s_n propagates only SILSO's station-dispersion errors; a kernel change moves single epochs by up to 0.755 yr; the pre-1818 error law and f = 2 are assumed.
  • Maxima come from the same smoothed series and are not an independent confirmation.

5.Paper writing

Attempt 12Done

Manuscript drafted: “Phase Diffusion, Not a Clock: A Calibrated Likelihood Test of the Sunspot-Cycle Phase” (≈ 4136 words).

Reviewer feedback applied: Independent referee (Claude Fable 5.1), consistency revision: minor_revision. Required changes: (1) [text] Bring the Letter back to compact form within the venue's length limit: move the SILSO-table-epoch, kernel-shift and extraction-variant rows (and the maxima row if needed) from Table II to the Supplemental Material, keep in Table II only the fits that carry the argument (baseline, clock, locking, two eras, since 1823, amplitude-corrected, lost cycle, fit quality), and confirm with the APS length estimate that text plus table and equation equivalents stay under 3750 words. (2) [text] State the D_phi spread the same way in the abstract and the Discussion, either '2-4x relative to the full-record value' in both or 'a factor of about 5 across definitions' in both. (3) [text] Replace 'Amplitude-dependent shifts of the minima are real' with 'are detected' and the supporting numbers (r = -0.51, calibrated p = 0.013; beta_- at 3.9 sigma), noting that four amplitude correlations were examined and two are significant. Keep the analysis record consistent with the paper.

≈ 4136 words · AI-drafted manuscript · not peer-reviewed

Phase Diffusion, Not a Clock: A Calibrated Likelihood Test of the Sunspot-Cycle Phase

Abstract

We fit 25 SILSO v2.0 minimum epochs by restricted maximum likelihood (random walk, white jitter, propagated errors). Since 1823 the step is 0.88 yr per cycle (68%: 0.69–1.06); earlier cycles scatter more (p = 0.016), giving 1.17 yr overall. No Gaussian-jitter clock replicate of 2×10⁶ reaches the observed likelihood ratio, nor of 10⁶ with amplitude-driven shifts removed (step 0.87 yr if amplitudes are exogenous) or a lost cycle added. Jitter < 0.63 yr and locking slower than 28 yr stay allowed; marker, era and correction change the diffusion coefficient 2–4× from its full-record value.

Keywords: solar cycle; phase diffusion; random walk; noisy oscillators; likelihood-ratio test; sunspot number

Is the sunspot cycle paced by a hidden chronometer? Dicke concluded from about 25 maxima that it is [1] and later revisited the phase variations [2]; Hoyng found the record too short to decide [3]. Tidal synchronization at an 11.07-yr period has been modelled and is still advocated [4,5], although its earlier evidence rests on a series that imposes nine cycles per century [6], and dynamo models synchronize only under very strong forcing [7]. Weisshaar et al. [8] rejected the clock at 95% with 28 sunspot cycles and beyond 99% with 84 ¹⁴C cycles, whose Eddington–Plakidis fit [9] gave an accumulating amplitude of 1.9 yr per cycle and a negligible clock term.

A self-sustained oscillator driven by noise has a diffusing phase [10–13]; one entrained by a pacemaker keeps a bounded phase error [12]. For the telescopic record, published tests are moment ratios [1,8]. We add a joint likelihood estimate of both noise amplitudes with intervals, propagated epoch errors, calibrated boundary tests, a bound on a restoring force, and a test of amplitude-dependent shifts of the minima [14]. We reject a pure clock with or without those shifts and find a random-walk phase with a step of 0.88 yr per cycle since 1823 and no detectable white jitter; how fast the phase diffuses differs 2–4-fold from the full-record value depending on how it is defined.

Model

Let tnt_n (n=0,…,N−1n = 0,\dots,N-1) be the epoch of the nnth minimum, in years:

tn=t0+nP+ϕn+cn+mn,ϕn=ϕn−1+wn,(1)t_n = t_0 + nP + \phi_n + c_n + m_n, \qquad \phi_n = \phi_{n-1} + w_n, \tag{1}

with independent Gaussian phase steps wn∼N(0,σw2)w_n \sim \mathcal N(0,\sigma_w^2) (accumulating), clock jitter cn∼N(0,σc2)c_n \sim \mathcal N(0,\sigma_c^2), and measurement error mn∼N(0,sn2)m_n \sim \mathcal N(0,s_n^2) with known sns_n. A clock is σw=0\sigma_w = 0; a free-running noisy oscillator is σc=0\sigma_c = 0. Residuals about a least-squares linear ephemeris are the O−C (observed minus calculated) values. Cycle lengths ℓn=tn−tn−1\ell_n = t_n - t_{n-1} have mean PP and

Var ℓn=σw2+vn+vn−1,Cov(ℓn,ℓn+1)=−vn,vn=σc2+sn2,(2)\mathrm{Var}\,\ell_n = \sigma_w^2 + v_n + v_{n-1}, \qquad \mathrm{Cov}(\ell_n,\ell_{n+1}) = -v_n, \qquad v_n = \sigma_c^2 + s_n^2, \tag{2}

so a clock anticorrelates successive lengths (correlation −1/2-1/2), while a random walk makes them a renewal sequence. Because cycle overlap and the Waldmeier effect shift minima with the strength of the adjacent cycles [14], we also replace tnt_n in Eq. (1) by

tn−β−A~n−1−β+A~n,(3)t_n - \beta_-\tilde A_{n-1} - \beta_+\tilde A_n, \tag{3}

where A~n\tilde A_n is the smoothed peak sunspot number of the cycle beginning at tnt_n, minus its mean, in units of 100, and β±\beta_\pm are fixed effects. Locking with a finite restoring force replaces the random walk (with cn≡0c_n \equiv 0) by

ϕn=a ϕn−1+ηn,0≤a≤1,τlock=−P/ln⁡a,(4)\phi_n = a\,\phi_{n-1} + \eta_n, \qquad 0 \le a \le 1, \qquad \tau_{\rm lock} = -P/\ln a, \tag{4}

which is the clock at a=0a = 0 and the random walk at a=1a = 1. For phase diffusion, ⟨Δφ2⟩=2Dφt\langle \Delta\varphi^2 \rangle = 2D_\varphi t with

Dφ=2π2σw2/P3,τc=1/Dφ,Q=πτc/P,(5)D_\varphi = 2\pi^2\sigma_w^2/P^3, \qquad \tau_c = 1/D_\varphi, \qquad Q = \pi\tau_c/P, \tag{5}

where φ\varphi is the phase in radians and τc\tau_c the 1/e1/e time of the autocorrelation of cos⁡φ\cos\varphi. Q=ω0/ΔωQ = \omega_0/\Delta\omega, with Δω=2Dφ\Delta\omega = 2D_\varphi the full width of its Lorentzian line [13], is the phase-diffusion-limited quality factor of the fundamental. All three refer to the chosen phase marker.

Methods

Data. We use the SILSO v2.0 monthly mean total sunspot number [15,16], a dimensionless index provided by WDC-SILSO, Royal Observatory of Belgium (file SN_m_tot_V2.0.csv, retrieved 2026-10-24, 3332 monthly rows from January 1749, CC BY-NC 4.0). From 1818 the file lists the dispersion σ\sigma of station values and the number of observations NobsN_{\rm obs}, giving the standard error σ/Nobs\sigma/\sqrt{N_{\rm obs}} [17]. No month lacks a sunspot number, so the non-missing filter removes nothing; we drop the 5 provisional months and keep 3327 (Table I). Months without usable dispersions (all before 1818, and one later month without observations) use a Poisson-like law SE2=κ2(SN+c)\mathrm{SE}^2 = \kappa^2(\mathrm{SN}+c) [18] fitted to 1818–1847 and inflated by f=2f = 2.

Epochs. A minimum is the lowest value of the SILSO 13-month tapered running mean [19] within ±36 months, refined by a parabola through the minimum month and its two neighbours; a tied run (1810, nine months at zero [19]) takes its centre. Each sns_n is the standard deviation over 1000 Monte Carlo copies of the monthly series perturbed by the station-dispersion errors σ/Nobs\sigma/\sqrt{N_{\rm obs}} (Gaussian, not clipped at zero), each minimum re-located within ±24 months. These sns_n are lower bounds: intrinsic month-to-month variability, which limits how well a flat smoothed minimum is defined, is absorbed by σc\sigma_c. The epochs are compared with the SILSO table [20]. The amplitude AnA_n is the smoothed maximum between tnt_n and tn+1t_{n+1}; the current cycle peaked (2024.791) before the smoothed series ends (2025.705), so Eq. (3) uses the 24 minima with both neighbouring amplitudes. A lost-cycle variant counts the interval 1784.695–1798.319 as two cycles [21] by raising nn by one from 1798.319 on.

Inference. Eqs. (1), (3) and (4) are fitted by restricted maximum likelihood (REML) [22] on the N−1N-1 lengths, which removes t0t_0; PP and β±\beta_\pm follow by generalised least squares and intervals from the profile likelihood. Both nulls lie on a boundary of a single correlated series, where the 50:50 χ2\chi^2 mixture [23] is unreliable [24] and the variance estimate piles up at zero [25]. We therefore calibrate the likelihood ratio qq by parametric bootstrap at each null fit (2×1062\times10^6 clock replicates for the baseline, 10610^6 for the amplitude-corrected and lost-cycle fits, 2×1042\times10^4 for the random-walk nulls and the other variants), maximising each replicate on a logarithmic (σw,σc)(\sigma_w,\sigma_c) grid with steps of about 11% in σw\sigma_w and up to 17% in σc\sigma_c. Limits on σc\sigma_c and aa are one-sided hybrid Neyman constructions (nuisance at its profile estimate; one-sided statistic of [26]; σc\sigma_c scanned over 0.30–1.00 yr in 0.05-yr steps, aa over 0.30–0.90 in steps of 0.025; 2×1042\times10^4 replicates per point on independent random streams; limit at the interpolated crossing with the 95% quantile; Monte Carlo errors by resampling each quantile's order statistic). Cross-checks use 10610^6 null realisations each: the KPSS statistic [27,28] (plain residual variance), Dicke's ratio [1,6], the lag-1 autocorrelation r1r_1 of lengths, and S(k)=⟨(tn+k−tn−kℓˉ)2⟩S(k) = \langle (t_{n+k}-t_n-k\bar\ell)^2\rangle; amplitude–O−C correlations are calibrated with 10510^5 random-walk realisations at fixed amplitudes. Systematic variants are Hathaway's 24-month Gaussian kernel [19], month-quantised epochs (adding a quantisation variance (1/12)2/12(1/12)^2/12 yr²), f=1f = 1 and 4, and sn=0s_n = 0; the largest deviation per source is added in quadrature.

Results

Table I. Data, epochs and propagated uncertainty.

QuantityValue
Months analysed3327 definitive, 1749.042–2026.204
Months with SILSO dispersions2498
Error law without dispersionsκ=0.259\kappa = 0.259, c=2.00c = 2.00, f=2f = 2
Minimum epochs25, 1755.162–2019.945
Epoch error sns_n (station dispersion only)median 0.016 yr; max 0.301 yr (1810.623)
Agreement with SILSO table24 of 25 within one month; 1996: −2.87 months
Cycle lengthsmean 11.03 yr, SD 1.18 yr (14.1 months), range 9.02–13.62 yr

Notes: The 1996 minimum is flat; SILSO lists a later month (1996.625).

Propagated errors (days to months) are far below the epoch scatter and the kernel shifts of single epochs (up to 0.755 yr, SM); the length mean and dispersion agree with the 131-month mean and 14-month dispersion found with 24-month Gaussian smoothing [29]. REML puts all timing noise into the accumulating term (σ^c=0\hat\sigma_c = 0), but white jitter up to 0.63 yr (95% C.L.) remains allowed within Eq. (1) (Table II). The mean period is consistent with the claimed 11.07-yr clock [5] and cannot discriminate, but a pure clock must absorb the residuals as 1.74-yr jitter. The locking profile is flat above a≈0.85a \approx 0.85, so only a>0.67a > 0.67 (τlock>27.7\tau_{\rm lock} > 27.7 yr) is informative. Cycles starting before 1823 scatter more than later ones (p=0.016p = 0.016), a split fixed by the start of the SILSO dispersions. With 6 early cycles this is suggestive rather than conclusive, but it implies that the full-record step may average two regimes, so we take the post-1823 values, with measured epoch errors and without the sparse 18th-century data, as the cleaner physical estimate.

Table II. REML fits.

FitEstimatesln⁡L\ln L or test
Eq. (1), both termsσw=1.17\sigma_w = 1.17 [0.99, 1.36] yr; σc=0\sigma_c = 0 (< 0.63 yr); P=11.03(24)P = 11.03(24) yrln⁡L=−16.81\ln L = -16.81
Clock, σw=0\sigma_w = 0σc=1.74\sigma_c = 1.74 yrln⁡L=−29.45\ln L = -29.45; q=25.26q = 25.26
Locking, Eq. (4)a>0.67a > 0.67, τlock>27.7(2)\tau_{\rm lock} > 27.7(2) yr; maximum a=0.925a = 0.9252Δln⁡L2\Delta\ln L: 0.11, 0.06, 25.33
Two erasσw=1.77\sigma_w = 1.77 [1.35, 2.45] yr before 1823, 0.88 [0.75, 1.06] afterp=0.016p = 0.016 (FF), 0.027 (LR)
Since 1823 (N=19N = 19)σw=0.88\sigma_w = 0.88 [0.69, 1.06] yr; σc=0\sigma_c = 0; P=10.92(21)P = 10.92(21) yrq=17.30q = 17.30; 0 of 2×1042\times10^4
Amplitudes, Eq. (3) (24)σw=0.87\sigma_w = 0.87 [0.66, 1.05] yr; β±=−1.10(28)\beta_\pm = -1.10(28), −0.79(28)-0.79(28) yrq=28.41q = 28.41; 0 of 10610^6
Lost cycle (1784–1798 as two)σw=1.56\sigma_w = 1.56 [1.36, 1.82] yr; P=10.59(31)P = 10.59(31) yrq=30.28q = 30.28; 0 of 10610^6
Fit qualityShapiro–Wilk p=0.92p = 0.92; Ljung–Box p=0.61p = 0.61; max ∣z∣=2.16\lvert z\rvert = 2.16; leave-one-out σw\sigma_w 1.01–1.19 yr—

Notes: Brackets: 68% profile-likelihood intervals. Eq. (1): 95% interval [0.77, 1.61] yr; exact χ2\chi^2 interval for σc=0\sigma_c = 0, neglecting sns_n, [1.04, 1.40] yr; χ2\chi^2 limit σc<0.65\sigma_c < 0.65 yr. Two eras: 6 cycles before 1823, 18 after; F=4.56F = 4.56; LR q=4.92q = 4.92 (χ12\chi^2_1). Locking: 2Δln⁡L2\Delta\ln L at a=0.85a = 0.85, 1 and 0. Amplitudes (N=24N = 24): σc=0.13\sigma_c = 0.13 yr, P=11.00(18)P = 11.00(18) yr, largest null replicate 21.28, pRW=0.50p_{\rm RW} = 0.50; the same 24 minima uncorrected give σw=1.19\sigma_w = 1.19 [1.01, 1.40] yr, q=24.35q = 24.35. Lost cycle: σc=0\sigma_c = 0, largest null replicate 21.94, eras 2.74 vs 0.88 yr, LR p=3.3×10−4p = 3.3\times10^{-4} (χ12\chi^2_1, approximate). Limits are one-sided 95% hybrid Neyman with Monte Carlo errors, σc<0.626(5)\sigma_c < 0.626(5) yr and a>0.672(2)a > 0.672(2) (τlock>2.51\tau_{\rm lock} > 2.51 cycles), from 2×1042\times10^4 replicates per scan point; the original 4000-replicate scans give 0.616 yr and 0.667. Fit quality: Ljung–Box Q5=3.59Q_5 = 3.59; max ∣z∣\lvert z\rvert for the cycle from 1784.695. In the locking row, 0.11 is from the gridded Neyman-scan likelihood relative to that grid's maximum; 0.06 and 25.33 are from the profile with η\eta optimised continuously, relative to its maximum at a=0.925a = 0.925. β±\beta_\pm in yr per 100 units of sunspot number (z=−3.93z = -3.93, −2.83-2.83). "0 of BB": no null replicate reached the observed qq; for B=106B = 10^6 the binomial 95% upper bound on pp is 3.0×10−63.0\times10^{-6}.

None of the 2×1062\times10^6 clock-null replicates reached the observed q=25.26q = 25.26 (Table III); (1+n)/(B+1)=5.0×10−7(1+n)/(B+1) = 5.0\times10^{-7} (about 4.89σ4.89\sigma; binomial 95% upper bound 1.5×10−61.5\times10^{-6}) is a resolution limit, not a measurement. The largest replicate, 25.20, lies within the resolution of the grid on which replicates are maximised, which can underestimate individual replicates, and the null assumes Gaussian white jitter, so we read the clock test as p≈10−6p \approx 10^{-6} or below. The null piles up at q=0q = 0, as expected for a boundary variance estimate [25], has a heavier extreme tail than the χ2\chi^2 mixture (whose 5.03σ5.03\sigma we do not use) and is insensitive to the nuisance jitter.

The O−C residuals run in long blocks (negative before 1823, positive until 1944 except in 1843, negative since 1954), as a random walk does but as amplitude-dependent shifts of the minima could also. Such shifts are detected: a cycle's amplitude anticorrelates with the O−C of the minimum ending it (r=−0.51r = -0.51, calibrated p=0.013p = 0.013), β−\beta_- in Eq. (3) differs from zero at 3.9σ3.9\sigma, and a cycle's length anticorrelates with the next amplitude (r=−0.70r = -0.70), the relation such shifts produce [8,14]. Of the four amplitude correlations we examined, these two are significant (Table III). Correcting for both adjacent amplitudes [Eq. (3)] reduces the O−C correlations to −0.09 and +0.08 and lowers σw\sigma_w on the same 24 minima from 1.19 to 0.87 yr, yet the clock likelihood ratio rises from 24.35 to 28.41 and the random walk stands (Table II). The 0.87 yr presumes exogenous amplitudes; amplitude and phase come from the same dynamo, and the length–amplitude correlation is itself a precursor relation, so the correction may remove genuine phase noise and leave σw\sigma_w too low. Counting the 13.62-yr interval 1784.695–1798.319 as two cycles [21] (averaging 6.8 yr; shortest observed length 9.02 yr) is a stress test: σw\sigma_w rises to 1.56 yr, the clock is again rejected and the era contrast sharpens (approximate χ12\chi^2_1 p=3.3×10−4p = 3.3\times10^{-4}). This interval, holding the largest innovation and the most influential epoch, is the main uncertainty of the early record. Extraction variants and SILSO-table epochs (SM) move σw\sigma_w by at most 0.02 yr.

The model-light statistics agree. KPSS and Dicke's ratio are reached by at most one of 10610^6 clock realisations, and r1=0.10r_1 = 0.10 (against −0.46 for a clock) gives p=2.7×10−4p = 2.7\times10^{-4}. Lengths are not anticorrelated, as a meridional-flow "clock" would require [30], though 24 lengths cannot exclude a weak anticorrelation. S(k)S(k) grows with kk as diffusion demands (⟨x2⟩=2Dt\langle x^2\rangle = 2Dt) and stays inside the random-walk band at every lag; the clock fails at the shortest lag. The reverse test finds no jitter (p=0.55p = 0.55). Table IV gives the dynamo parameters.

Table III. Tests of the clock and of the random walk.

StatisticObservedClock nullRandom-walk nullpclockp_{\rm clock}pRWp_{\rm RW}
LR qq25.26——5.0×10−75.0\times10^{-7} (limit)0.55 (q=0q = 0)
KPSS0.4360.0720.2802.0×10−62.0\times10^{-6}0.85
Dicke ratio2.190.481.651.0×10−61.0\times10^{-6}0.79
r1r_1 of lengths0.10−0.46−0.052.7×10−42.7\times10^{-4}0.78
S(1)S(1) (yr²)1.336.04 [3.06, 9.94]1.32 [0.75, 2.02]2.5×10−42.5\times10^{-4}0.92
S(12)S(12)10.267.10 [2.87, 13.40]8.18 [1.55, 21.56]0.850.54
rr(amplitude of a cycle, O−C of its closing minimum)−0.51———0.013
rr(length of a cycle, amplitude of the next)−0.70———8.0×10−58.0\times10^{-5}

Notes: Null means (90% bands for S(k)S(k)) from 10610^6 realisations; S(2)S(2), S(4)S(4), S(8)S(8) in the SM; Dicke's analytic values 0.46, 1.72. p=(1+n)/(B+1)p = (1+n)/(B+1), one-sided (two-sided pRWp_{\rm RW} and lower-tail pclockp_{\rm clock} for S(k)S(k)). Clock-null qq (2×1062\times10^6 replicates, largest 25.20): P(q=0)=0.596P(q = 0) = 0.596 (mixture 0.5); exceedance 7.2×10−47.2\times10^{-4} at q=10q = 10 (mixture 7.8×10−47.8\times10^{-4}; 6.45 and 7.7×10−47.7\times10^{-4} at 0.7 and 1.4 times the null jitter, 2×1052\times10^5 replicates each), 5.5×10−65.5\times10^{-6} at q=20q = 20 (3.9×10−63.9\times10^{-6}); mixture 5.03σ5.03\sigma not used. Amplitude rows: two-sided pRWp_{\rm RW} from 10510^5 random walks at fixed amplitudes; the two not significant are the O−C of the minimum opening the cycle (r=−0.28r = -0.28, p=0.19p = 0.19) and the cycle's own length (r=−0.32r = -0.32, p=0.12p = 0.12); after Eq. (3) the O−C correlations with the preceding and following amplitude are −0.09 and +0.08.

Table IV. Phase-diffusion parameters, Eq. (5), by phase marker, era and treatment.

Definition (minima)σw\sigma_w (yr)DφD_\varphi (rad² yr⁻¹)τc\tau_c (yr)QQ
Since 1823 (19)0.88 [0.69, 1.06]0.0118 [0.0071, 0.0170]85 [59, 141]24.5 [16.9, 40.5]
Amplitude-corrected (24)0.87 [0.66, 1.05]0.0111 [0.0064, 0.0165]90 [61, 157]25.7 [17.3, 44.8]
Full record (25)1.17 [0.99, 1.36]0.0200 [0.0144, 0.0276]50 [36, 70]14.2 [10.4, 19.8]
Before 1823 (6 cycles)1.77 [1.35, 2.45]0.047 [0.027, 0.090]21 [11, 36]6.1 [3.2, 10.4]
Lost cycle (25)1.56 [1.36, 1.82]0.041257.3
Maxima (24)1.95 [1.41, 2.33]0.056 [0.029, 0.082]18 [12, 34]5.1 [3.5, 9.7]

Notes: Intervals (68%) combine the σw\sigma_w profile interval with the error of PP, which enters DφD_\varphi and τc\tau_c three times and QQ twice; the lost-cycle row has none; "before 1823" is from the two-era fit; maxima also give σc=0.29\sigma_c = 0.29 yr and pclock=1.1×10−3p_{\rm clock} = 1.1\times10^{-3}. Extraction systematics (SM), evaluated for the full record only, are ±0.018 yr, ±0.0005, ±1.2 yr and ±0.38. Definition dominates extraction: relative to the full record, DφD_\varphi changes by 2.8× from minima to maxima, by 4.1× between the eras of the two-era fit, by 2.0× when cycle 4 (1784–1798) is split and by 1.8× with the amplitude correction; end to end (0.0111 to 0.056) it spans a factor of about 5. One-step random-walk forecasts t24+Pt_{24} + P of the next minimum: 2030.9 ± 0.9 yr (post-1823 step and period) and 2031.0 ± 1.2 yr (full record).

Discussion and Outlook

The minima carry no detectable memory of a pacemaker: cycle-length fluctuations are inherited by all later cycles, a renewal process with precision σw/P=0.081\sigma_w/P = 0.081 since 1823 (0.106 over the full record). On the cleaner post-1823 sample the cycle behaves as a low-Q phase-diffusing oscillator, Q=24.5Q = 24.5 (16.9–40.5) with a coherence time of 85 yr (59–141), as expected for a weakly nonlinear limit cycle driven by noise [10]; the full record (Q=14.2Q = 14.2, τc=50\tau_c = 50 yr) averages this with a noisier early regime. Locking slower than 28 yr is not excluded and would make the cycle clock-like on longer times. A strict clock, whether a high-Q internal oscillator or tidal synchronization [1,4,5], would need white jitter of 1.74 yr; within Eq. (1) at most 0.63 yr is allowed alongside the random walk, so a clock-type component is constrained, not excluded.

That the phase diffuses is robust; how fast is not. Removing amplitude shifts raises the clock statistic, so a linear amplitude effect does not mimic the random walk, as [8] found with overlap-free start dates of cycles 1–23. But DφD_\varphi is no single dynamo constant: relative to its full-record value it changes 2–4× with marker, era and correction (about 5× end to end), and QQ runs from 5 to 26 (Table IV). Our preferred σw≈0.9\sigma_w \approx 0.9 yr and Q≈25Q \approx 25, from the post-1823 and amplitude-corrected fits, are a judgment, not the only reading: the full record gives 1.17 yr, the correction presumes exogenous amplitudes, and larger values may mix in marker definition, early observations and a possibly lost cycle.

The two records agree on the absence of a clock but not on the amplitude: the 1.9 yr per cycle that [8] obtains from 84 ¹⁴C minima (976–1888) lies above our full-record 95% interval (0.77–1.61 yr), but those epochs carry timing errors of a different kind and the amplitude comes from a least-squares fit of the mean accumulated phase error, not REML. Whether the difference is solar or methodological cannot be decided here; it points the same way as our early-era excess.

Limits: one dataset of 25 epochs; an era difference on 6 early cycles, coinciding with sparse 18th-century data and a probable lost cycle in 1793–1800 [21], modelled by splitting the interval, not inserting its epochs; a resolution-limited significance under a Gaussian null; limits valid only within Eqs. (1) and (4); a linear, adjacent-cycle, exogenous amplitude correction not applied to the post-1823 subsample, whose systematics were not evaluated either; station-dispersion-only epoch errors and an assumed error law; and smoothed minima, a marker shifted by cycle overlap and the Waldmeier effect [14] and, typically by months, by how the sunspot number is averaged and smoothed [31], tested with two kernels but no overlap-corrected epochs (the maxima are not independent). Next: hemispheric minima, overlap-corrected epochs and a joint analysis with the ¹⁴C cycles [8].

Acknowledgments

We thank WDC-SILSO, Royal Observatory of Belgium, Brussels, for the sunspot number series.

References

[1] R. H. Dicke, Nature 276, 676 (1978), https://doi.org/10.1038/276676b0. [2] R. H. Dicke, Sol. Phys. 115, 171 (1988), https://doi.org/10.1007/BF00146238. [3] P. Hoyng, Sol. Phys. 169, 253 (1996), https://doi.org/10.1007/BF00190603. [4] F. Stefani, A. Giesecke, and T. Weier, Sol. Phys. 294, 60 (2019), https://doi.org/10.1007/s11207-019-1447-1. [5] F. Stefani, J. Beer, and T. Weier, Sol. Phys. 298, 83 (2023), https://doi.org/10.1007/s11207-023-02174-x. [6] H.-C. Nataf, Sol. Phys. 297, 107 (2022), https://doi.org/10.1007/s11207-022-02038-w. [7] P. Charbonneau, Front. Astron. Space Sci. 9, 853676 (2022), https://doi.org/10.3389/fspas.2022.853676. [8] E. Weisshaar, R. H. Cameron, and M. Schüssler, Astron. Astrophys. 671, A87 (2023), doi:10.1051/0004-6361/202244997; https://arxiv.org/abs/2301.07469. [9] A. S. Eddington and S. Plakidis, Mon. Not. R. Astron. Soc. 90, 65 (1929), https://doi.org/10.1093/mnras/90.1.65. [10] R. H. Cameron and M. Schüssler, Astrophys. J. 843, 111 (2017), https://doi.org/10.3847/1538-4357/aa767a. [11] P. D. Mininni, D. O. Gómez, and G. B. Mindlin, Phys. Rev. Lett. 85, 5476 (2000), https://doi.org/10.1103/PhysRevLett.85.5476. [12] A. Pikovsky, M. Rosenblum, and J. Kurths, Synchronization (Cambridge University Press, 2001), https://doi.org/10.1017/CBO9780511755743. [13] A. Demir, A. Mehrotra, and J. Roychowdhury, IEEE Trans. Circuits Syst. I 47, 655 (2000), https://doi.org/10.1109/81.847872. [14] R. H. Cameron and M. Schüssler, Astrophys. J. 659, 801 (2007), https://doi.org/10.1086/512049. [15] SILSO World Data Center, Royal Observatory of Belgium, https://doi.org/10.24414/qnza-ac80; https://www.sidc.be/SILSO/DATA/SN_m_tot_V2.0.csv. [16] F. Clette, L. Svalgaard, J. M. Vaquero, and E. W. Cliver, Space Sci. Rev. 186, 35 (2014), https://doi.org/10.1007/s11214-014-0074-2. [17] SILSO, monthly mean total sunspot number file description, https://www.sidc.be/SILSO/infosnmtot. [18] T. Dudok de Wit, L. Lefèvre, and F. Clette, Sol. Phys. 291, 2709 (2016), https://doi.org/10.1007/s11207-016-0970-6. [19] D. H. Hathaway, Living Rev. Sol. Phys. 12, 4 (2015), https://doi.org/10.1007/lrsp-2015-4. [20] SILSO, table of minima, maxima and cycle durations, https://www.sidc.be/SILSO/cyclesmm. [21] I. G. Usoskin, K. Mursula, R. Arlt, and G. A. Kovaltsov, Astrophys. J. 700, L154 (2009), https://doi.org/10.1088/0004-637X/700/2/L154. [22] H. D. Patterson and R. Thompson, Biometrika 58, 545 (1971), https://doi.org/10.1093/biomet/58.3.545. [23] S. G. Self and K.-Y. Liang, J. Am. Stat. Assoc. 82, 605 (1987), https://doi.org/10.1080/01621459.1987.10478472. [24] C. M. Crainiceanu and D. Ruppert, J. R. Stat. Soc. B 66, 165 (2004), https://doi.org/10.1111/j.1467-9868.2004.00438.x. [25] N. Shephard and A. C. Harvey, J. Time Ser. Anal. 11, 339 (1990), https://doi.org/10.1111/j.1467-9892.1990.tb00062.x. [26] G. Cowan, K. Cranmer, E. Gross, and O. Vitells, Eur. Phys. J. C 71, 1554 (2011), https://doi.org/10.1140/epjc/s10052-011-1554-0. [27] J. Nyblom and T. Mäkeläinen, J. Am. Stat. Assoc. 78, 856 (1983), https://doi.org/10.1080/01621459.1983.10477032. [28] D. Kwiatkowski, P. C. B. Phillips, P. Schmidt, and Y. Shin, J. Econometrics 54, 159 (1992), https://doi.org/10.1016/0304-4076(92)90104-Y. [29] D. H. Hathaway, R. M. Wilson, and E. J. Reichmann, Sol. Phys. 211, 357 (2002), https://doi.org/10.1023/A:1022425402664. [30] P. Charbonneau and M. Dikpati, Astrophys. J. 543, 1027 (2000), https://doi.org/10.1086/317142. [31] K. Mursula and T. Ulich, Geophys. Res. Lett. 25, 1837 (1998), https://doi.org/10.1029/98GL51317.

Supplemental Material

Produced by the executed script: the 25 epochs with sns_n, SILSO differences and cycle amplitudes; the O−C residuals with the clock and random-walk 90% bands and the amplitude-corrected residuals; both Neyman scans with each point's 95% quantile and its Monte Carlo error; clock-null summary statistics (quantiles, tail fractions, nuisance check); fits of all variants and subsamples, with τc/P\tau_c/P and σw/P\sigma_w/P: the extraction variants (σw=1.15\sigma_w = 1.15–1.18 yr, q=23.98q = 23.98–25.29, each 0 of 2×1042\times10^4; systematic 0.018 yr on σw\sigma_w, 0.033 yr on PP), the epoch shifts with the 24-month Gaussian kernel (up to 0.755 yr at 1890.169, rms 0.297 yr), SILSO-table epochs (all: σw=1.16\sigma_w = 1.16 [0.99, 1.35] yr, q=25.61q = 25.61; only 1996: 1.14 yr, q=25.79q = 25.79), the maxima (N=24N = 24: σw=1.95\sigma_w = 1.95 [1.41, 2.33] yr, σc=0.29\sigma_c = 0.29 yr, q=9.15q = 9.15, pclock=1.1×10−3p_{\rm clock} = 1.1\times10^{-3}), S(k)S(k) at all lags and the single-amplitude corrections; the floor applied to the three zero-dispersion months; the length SDs of the two eras (1.88 vs 0.88 yr); the script, its seeds (Monte Carlo 11, bootstraps 21 and 22, the superseded 4000-replicate Neyman scans 23 and 24, cross-checks 31, variants 41 onward; new analyses on streams spawned from SeedSequence(20261025)) and the data checksum (sha256 6383f7c67fc2e67e…). This record contains no figures; the O−C diagram is given as the residual table with both nulls' bands, and the null distribution of qq is summarised in the notes to Table III.

6.Review

Attempt 2Done

Automated review: Accept (novelty 3, rigor 4, clarity 4, reproducibility 4).

Accept
Novelty 3/5Rigor 4/5Clarity 4/5Reproducibility 4/5

Refereed by Claude Fable 5.1, a different model from the one that wrote the paper (Claude Opus 5.5).

Final round after the consistency revision. The record is unchanged and the manuscript now meets the three text changes I required: Table II is trimmed to the fits that carry the argument and the Letter is back inside the venue's length limit with every row on one line; the spread of the diffusion coefficient is described identically in the abstract, the Discussion and the Table IV note; and the amplitude-shift finding is stated as 'detected' with its numbers and the count of significant correlations. The lost-cycle era p-value is also marked approximate. Every number moved into the notes or the Supplemental Material matches the executed record. The paper reports a calibrated and honestly bounded result: the clock is rejected with and without amplitude-driven shifts, the phase random walk has a step of 0.87-1.17 yr depending on sample and correction, white jitter is below 0.63 yr, locking slower than about 28 yr is not excluded, and the diffusion coefficient depends on how the phase is defined. I recommend acceptance.

Strengths

  • RESULT_JSON is unchanged (spot-checked against the values verified last round: sigma_w, q, both Neyman limits, the amplitude-corrected and lost-cycle fits, the Q interval, the post-1823 forecast and the kernel shift), so every number carried over remains verified, and every number that moved between the tables, the notes and the Supplemental Material still matches the record: extraction variants sigma_w = 1.15-1.18 yr and q = 23.98-25.29; kernel shift up to 0.755 yr at 1890.169 with rms 0.297 yr; SILSO-table epochs sigma_w = 1.16 [0.99, 1.35] yr (q = 25.61) and 1.14 yr (q = 25.79); maxima sigma_w = 1.95 [1.41, 2.33], sigma_c = 0.29, p = 1.1 x 10^-3; era length SDs 1.88 vs 0.88 yr; the two non-significant amplitude correlations r = -0.28 (p = 0.19) and r = -0.32 (p = 0.12).
  • All three round-4 changes are made. Table II now holds only the fits that carry the argument (baseline, clock, locking, two eras, since 1823, amplitude-corrected, lost cycle, fit quality), with the 95% and chi-square intervals, the uncorrected like-for-like fit and the replicate details in its note; S(2), S(4), S(8) and the kernel-shift row went to the SM; every one of the 33 table rows is a single printed line. By my count the body is about 2900 words plus 590 words inside table rows and five equations, roughly 3540 word-equivalents, inside the venue's 3750 limit, so compact Letter form is restored and clarity returns to 4.
  • The D_phi spread is now stated the same way everywhere: the abstract and the Discussion give 2-4x relative to the full-record value, the Discussion and the Table IV note add the end-to-end factor of about 5 (0.0111 to 0.056), and the note lists the four ratios 2.8, 4.1, 2.0 and 1.8, all of which I recomputed last round.
  • 'Such shifts are detected' now carries its evidence (r = -0.51, calibrated p = 0.013; beta_- at 3.9 sigma; r = -0.70 between length and next amplitude) and the statement that two of the four examined correlations are significant, with the other two given in the Table III note; the lost-cycle era contrast is labelled an approximate chi-square-1 p-value in both the text and the note.
  • Everything accepted earlier stands: calibrated boundary tests with binomial upper bounds, Neyman limits with Monte Carlo errors on independent streams, the exogeneity caveat on the amplitude correction, the post-1823 sample leading the headline with the era difference at its real strength, the verified 14C comparison, 31 retrieved references with resolving DOIs, and an SM that lists exactly what the script produces.

Weaknesses

  • The notes to Tables II and III are long, because the detail displaced from the rows had to go somewhere; the record has no figure, so the O-C diagram remains a residual table in the SM. Neither is a required change: the Letter is within length, the rows read at a glance, and the author states the absence of figures openly.
  • Unchanged limits, all declared in the paper: 25 epochs from one record; an era difference on 6 early cycles; a linear, adjacent-cycle, exogenous amplitude model not applied to the post-1823 subsample; systematics evaluated on the full record only; station-dispersion-only epoch errors; a resolution-limited significance under a Gaussian null.

Required changes

—

Record

§Event timeline

  1. Run createdQuestion: “Does the solar activity cycle keep time like a clock, or does its phase perform a random walk? A likelihood test on sunspot-cycle minima epochs in the SILSO v2.0 record with propagated measurement uncertainty' language=en discipline=physics venue='Physical Review Letters” · output language: English · models: agent:claude-opus-5-5
  2. Stage started · Literature reviewAttempt 1 · agent:claude-opus-5-5
  3. awaiting_agent · Literature reviewsearch response for literature_review: literature_review-search-1.response.json
  4. Resume requested
  5. Stage started · Literature reviewAttempt 2 · agent:claude-opus-5-5
  6. Search complete · Literature review66 sources · 19,191 characters of notes
  7. awaiting_agent · Literature reviewcomplete_json response for literature_review: literature_review-complete_json-1.response.json
  8. Resume requested
  9. Stage started · Literature reviewAttempt 3 · agent:claude-opus-5-5
  10. Search complete · Literature review66 sources · 19,191 characters of notes
  11. Stage completed · Literature review
  12. Stage started · IdeationAttempt 1 · agent:claude-opus-5-5
  13. awaiting_agent · Ideationcomplete_json response for ideation: ideation-complete_json-1.response.json
  14. Resume requested
  15. Stage started · IdeationAttempt 2 · agent:claude-opus-5-5
  16. Awaiting approval · Ideation
  17. Approved · IdeationIdea 1 selected
  18. Stage started · ExperimentationAttempt 1 · agent:claude-opus-5-5
  19. Dataset provisioned · Experimentationsidc_sunspot_monthly · 3,332 observations · 7 variables · sha256 6383f7c67fc2
  20. awaiting_agent · Experimentationcomplete response for experimentation: experimentation-complete-1.response.txt
  21. Resume requested
  22. Stage started · ExperimentationAttempt 2 · agent:claude-opus-5-5
  23. Dataset provisioned · Experimentationsidc_sunspot_monthly · 3,332 observations · 7 variables · sha256 6383f7c67fc2
  24. Experiment round · ExperimentationRound 1: exit 0; result parsed (21.994s)
  25. Stage completed · Experimentation
  26. Stage started · AnalysisAttempt 1 · agent:claude-opus-5-5
  27. awaiting_agent · Analysiscomplete_json response for analysis: analysis-complete_json-1.response.json
  28. Resume requested
  29. Stage started · AnalysisAttempt 2 · agent:claude-opus-5-5
  30. Stage completed · Analysis
  31. Stage started · Paper writingAttempt 1 · agent:claude-opus-5-5
  32. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  33. Resume requested
  34. Stage started · Paper writingAttempt 2 · agent:claude-opus-5-5
  35. Stage completed · Paper writing
  36. Stage started · ReviewAttempt 1 · agent:claude-opus-5-5
  37. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  38. Resume requested
  39. Stage started · ReviewAttempt 2 · agent:claude-opus-5-5
  40. Awaiting approval · Review
  41. Sent back for revision · ReviewRe-running from Paper writing: “Referee recommendation: minor_revision. Make exactly these required changes, quoted from the report, using only results already in RESULT_JSON (no new analyses, no new numbers):\n1. "Replace \'All timin”
  42. Stage started · Paper writingAttempt 3 · agent:claude-opus-5-5
  43. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  44. Resume requested
  45. Stage started · Paper writingAttempt 4 · agent:claude-opus-5-5
  46. Stage completed · Paper writing
  47. Stage started · ReviewAttempt 1 · agent:claude-opus-5-5
  48. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  49. Resume requested
  50. Stage started · ReviewAttempt 2 · agent:claude-opus-5-5
  51. Awaiting approval · Review
  52. Approved · Review
  53. Run completereport=/Users/haodingresearch/Desktop/auto-research/runs/studies-opus55/physics-en/runs/ce7d9f527492/REPORT.md
  54. Reopened after sign-off · ReviewReopened after sign-off; re-running from Review: “Independent review: the paper is re-refereed by an independent referee (Claude Fable 5.1) that took no part in writing it.”
  55. Stage started · ReviewAttempt 3 · agent:claude-fable-5-1
  56. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  57. Resume requested
  58. Stage started · ReviewAttempt 4 · agent:claude-fable-5-1
  59. Awaiting approval · Review
  60. Sent back for revision · ReviewRe-running from Paper writing: “Independent referee (Claude Fable 5.1): major_revision. Required changes: (1) [analysis] Add figures as PRL expects: Fig. 1, the O-C diagram of the 25 minima against the fitted ephemeris with the rand”
  61. Stage started · Paper writingAttempt 5 · agent:claude-opus-5-5
  62. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  63. Resume requested
  64. Stage started · Paper writingAttempt 6 · agent:claude-opus-5-5
  65. Stage completed · Paper writing
  66. Stage started · ReviewAttempt 1 · agent:claude-fable-5-1
  67. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  68. Resume requested
  69. Stage started · ReviewAttempt 2 · agent:claude-fable-5-1
  70. Awaiting approval · Review
  71. Sent back for revision · ReviewRe-running from Paper writing: “Independent referee (Claude Fable 5.1), round 2: minor_revision. Required change: (1) [text] Remove the parenthetical '(976-1888)' in the Discussion, or keep it only if it can be verified verbatim aga”
  72. Stage started · Paper writingAttempt 7 · agent:claude-opus-5-5
  73. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  74. Resume requested
  75. Stage started · Paper writingAttempt 8 · agent:claude-opus-5-5
  76. Stage completed · Paper writing
  77. Stage started · ReviewAttempt 1 · agent:claude-fable-5-1
  78. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  79. Resume requested
  80. Stage started · ReviewAttempt 2 · agent:claude-fable-5-1
  81. Awaiting approval · Review
  82. Approved · Review
  83. Run completereport=/Users/haodingresearch/Desktop/auto-research/runs/studies-opus55/physics-en/runs/ce7d9f527492/REPORT.md
  84. Reopened after sign-off · ReviewReopened after sign-off; re-running from Experimentation: “Editor's consistency revision. The Chinese edition of this study runs the same script on the same data snapshot. At its independent referee's request it added: the test of amplitude-driven shifts of t”
  85. Stage started · ExperimentationAttempt 3 · agent:claude-opus-5-5
  86. Dataset provisioned · Experimentationsidc_sunspot_monthly · 3,332 observations · 7 variables · sha256 6383f7c67fc2
  87. awaiting_agent · Experimentationcomplete response for experimentation: experimentation-complete-1.response.txt
  88. Resume requested
  89. Stage started · ExperimentationAttempt 4 · agent:claude-opus-5-5
  90. Dataset provisioned · Experimentationsidc_sunspot_monthly · 3,332 observations · 7 variables · sha256 6383f7c67fc2
  91. Experiment round · ExperimentationRound 1: exit 0; result parsed (61.342s)
  92. Stage completed · Experimentation
  93. Stage started · AnalysisAttempt 1 · agent:claude-opus-5-5
  94. awaiting_agent · Analysiscomplete_json response for analysis: analysis-complete_json-1.response.json
  95. Resume requested
  96. Stage started · AnalysisAttempt 2 · agent:claude-opus-5-5
  97. Stage completed · Analysis
  98. Stage started · Paper writingAttempt 9 · agent:claude-opus-5-5
  99. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  100. Resume requested
  101. Stage started · Paper writingAttempt 10 · agent:claude-opus-5-5
  102. Stage completed · Paper writing
  103. Stage started · ReviewAttempt 1 · agent:claude-fable-5-1
  104. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  105. Resume requested
  106. Stage started · ReviewAttempt 2 · agent:claude-fable-5-1
  107. Awaiting approval · Review
  108. Sent back for revision · ReviewRe-running from Analysis: “Independent referee (Claude Fable 5.1), consistency revision: minor_revision. Required changes: (1) [text] Bring the Letter back to compact form within the venue's length limit: move the SILSO-table-e”
  109. Stage started · AnalysisAttempt 3 · agent:claude-opus-5-5
  110. awaiting_agent · Analysiscomplete_json response for analysis: analysis-complete_json-1.response.json
  111. Resume requested
  112. Stage started · AnalysisAttempt 4 · agent:claude-opus-5-5
  113. Stage completed · Analysis
  114. Stage started · Paper writingAttempt 11 · agent:claude-opus-5-5
  115. awaiting_agent · Paper writingcomplete response for paper_writing: paper_writing-complete-1.response.txt
  116. Resume requested
  117. Stage started · Paper writingAttempt 12 · agent:claude-opus-5-5
  118. Stage completed · Paper writing
  119. Stage started · ReviewAttempt 1 · agent:claude-fable-5-1
  120. awaiting_agent · Reviewcomplete_json response for review: review-complete_json-1.response.json
  121. Resume requested
  122. Stage started · ReviewAttempt 2 · agent:claude-fable-5-1
  123. Awaiting approval · Review
  124. Approved · Review
  125. Run completereport=/Users/haodingresearch/Desktop/auto-research/runs/studies-opus55/physics-en/runs/ce7d9f527492/REPORT.md