"""Three small checks on the authors' own data (written up in NOTES.txt). Fact-Checked Science ("Our analysis"), 16 November 2026, for the check of Pierrard et al. (2026), npj Space Exploration 2, 43 (doi:10.1038/s44453-026-00064-7). Data: Winant, Pierrard & Botek (2026), BIRA-IASB, doi:10.18758/lu12i2kq (CC BY 4.0). (a) October 2024: when did channel 1's flux at L 2.0-2.5 first rise after the storm? The flux at L 2.0-2.5 is the mean of log10 flux over the five 0.1-L bins centred at 2.05-2.45, per UT day (daily means as in method A). Reference: the mean of 1-6 October. Reported: the first day from 7 October on that is more than 0.3, 0.5 and 1.0 decade above the reference, with the daily series of 5-20 October and the 3-hour values of 9-11 October. (b) June 2024: on how many days does each of channels 1-5 have three slots near L 1.9, 2.45 and 3.8 by a lenient per-day rule? Daily-mean profile, no smoothing, L 1.2-6.5, local minima of prominence (depth) >= 0.10 decade (method A's detection), each named slot matched one to one within 0.25 L; no persistence required. (c) (added after the fresh review) The flux in the 0.1-L bin centred at L 1.35, before (1-9 May 2024) and after (5-20 June 2024) the storm, in EPT ch1 and in the authors' MEPED >300 keV file: the mean of the daily log10 values, and the ratio after/before of the arithmetic and of the geometric means of the daily values. Needs Python 3.9+, numpy, scipy, netCDF4, and belts_a.py in the same folder as this script. Run python3 checks.py """ import datetime as dt import os import sys import warnings import numpy as np sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import belts_a as A # noqa: E402 warnings.simplefilter("ignore", RuntimeWarning) def check_a(folder): times, data, lc, le, step = A.load(os.path.join(folder, A.FILES["2024oct"])) sel = (lc > 2.0) & (lc < 2.5) ch1 = data[:, sel, 0] with np.errstate(divide="ignore"): lg3 = np.array([np.nanmean(np.log10(np.where(r > 0, r, np.nan))) for r in ch1]) days, daily = A.daily_means(times, data, step) with np.errstate(divide="ignore"): lgd = np.array([np.nanmean(np.log10(np.where(r > 0, r, np.nan))) for r in daily[:, sel, 0]]) ref = np.nanmean([v for d, v in zip(days, lgd) if dt.date(2024, 10, 1) <= d <= dt.date(2024, 10, 6)]) print(f"(a) reference 1-6 Oct 2024: log10 flux {ref:.2f}") for step_dec in (0.3, 0.5, 1.0): firstd = next((d for d, v in zip(days, lgd) if d >= dt.date(2024, 10, 7) and v > ref + step_dec), None) print(f" first day more than {step_dec} decade above it: {firstd}") for d, v in zip(days, lgd): if dt.date(2024, 10, 5) <= d <= dt.date(2024, 10, 20): print(f" {d} {v:.2f}") for t, v in zip(times, lg3): if dt.datetime(2024, 10, 9, 12) <= t <= dt.datetime(2024, 10, 11, 12): print(f" {t:%Y-%m-%d %H:%M} {v:.2f}") def check_b(folder): times, data, lc, le, step = A.load(os.path.join(folder, A.FILES["2024may"])) days, daily = A.daily_means(times, data, step) s = dict(A.PRIMARY, kernel=(1,)) named = [1.9, 2.45, 3.8] for c in range(5): profs, floor, nfloor = A.profiles(daily[:, :, c], lc, s) hits = [] for d, p in zip(days, profs): if not (dt.date(2024, 6, 1) <= d <= dt.date(2024, 6, 30)): continue mins, maxs = A.detect(p, 0.10) if mins is None: continue used, ok = set(), True for L0 in named: best = None for j, (L, prom) in enumerate(mins): if j not in used and abs(L - L0) <= 0.25 + 1e-9 and (best is None or abs(L - L0) < best[0]): best = (abs(L - L0), j) if best is None: ok = False break used.add(best[1]) if ok: hits.append(d.day) print(f"(b) {A.EPT_CH[c]}: {len(hits)} of 30 June days; days: {hits}") def check_c(folder): for key, ch, label in (("2024may", 0, "EPT ch1 0.5-0.6 MeV"), ("meped2024", 2, "MEPED >300 keV (authors' file)")): times, data, lc, le, step = A.load(os.path.join(folder, A.FILES[key])) days, daily = A.daily_means(times, data, step) i = int(np.argmin(np.abs(lc - 1.35))) vals = {} for name, a, b in (("1-9 May", dt.date(2024, 5, 1), dt.date(2024, 5, 9)), ("5-20 June", dt.date(2024, 6, 5), dt.date(2024, 6, 20))): v = np.array([daily[k, i, ch] for k, x in enumerate(days) if a <= x <= b]) vals[name] = v[np.isfinite(v) & (v > 0)] print(f"(c) {label}, L bin {lc[i]:.2f}, {name}: {len(vals[name])} days, mean of daily log10 " f"{np.mean(np.log10(vals[name])):.2f}") before, after = vals["1-9 May"], vals["5-20 June"] print(f" ratio after/before: {np.mean(after) / np.mean(before):.2f} (arithmetic means), " f"{10 ** (np.mean(np.log10(after)) - np.mean(np.log10(before))):.2f} (geometric means)") def main(): if len(sys.argv) != 2: sys.exit("usage: python3 checks.py ") check_a(sys.argv[1]) check_b(sys.argv[1]) check_c(sys.argv[1]) if __name__ == "__main__": main()