FA-71421 / Seismic magnitude estimation / Open access
Equivalent magnitude of a swarm: energy inversion · case 01
The equivalent magnitude of a single M5 event is reported as M11.25.
ROOT CAUSE
The inversion multiplies by 1.5 instead of dividing.
VERIFIED REPAIR
Use (log10 E - 4.8)/1.5.
Unsuccessful approach: Subtracting 4.8 after dividing leaves an offset of 3.2.
Case contract
Surface-wave magnitudes of a swarm; energy per event log10 E = 1.5 Ms + 4.8 (J). Sum energies and invert to the single equivalent magnitude. Return [Meq rounded 0.01, total energy "%.2e"] or None for an empty swarm.
Why this case matters
Swarm summaries compare cumulative energy release with single earthquakes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mags):
if not mags:
return None
e = sum(10 ** (1.5 * m + 4.8) for m in mags)
me = (math.log10(e) - 4.8) * 1.5
return [round(me, 2), "%.2e" % e]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['swarm 0', [[5.0, 5.0, 5.0, 5.0]], [5.4, '7.98e+12']], ['swarm 1', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 2', [[4.5]], [4.5, '3.55e+11']], ['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 4', [[4.2, 4.2]], [4.4, '2.52e+11']], ['swarm 5', [[4.2, 4.2, 4.2, 4.2, 4.2]], [4.67, '6.29e+11']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']]], [['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']], ['swarm 8', [[3.6, 3.6]], [3.8, '3.17e+10']], ['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 10', [[5.2, 5.2, 5.2, 5.2, 5.2]], [5.67, '1.99e+13']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']]], [['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 14', [[4.7]], [4.7, '7.08e+11']], ['swarm 15', [[6.0, 6.0]], [6.2, '1.26e+14']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 17', [[2.6, 2.6, 2.6, 2.6, 2.6]], [3.07, '2.51e+09']], ['swarm 18', [[4.1, 4.1]], [4.3, '1.78e+11']], ['swarm 19', [[3.6, 3.6, 3.6, 3.6, 3.6, 3.6]], [4.12, '9.51e+10']]], [['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 22', [[6.1, 6.1]], [6.3, '1.78e+14']], ['swarm 23', [[3.5, 3.5, 3.5]], [3.82, '3.37e+10']], ['swarm 24', [[4.9, 4.9, 4.9, 4.9, 4.9, 4.9]], [5.42, '8.48e+12']], ['swarm 25', [[3.2, 3.2, 3.2, 3.2]], [3.6, '1.59e+10']], ['swarm 26', [[4.5, 4.5, 4.5, 4.5, 4.5, 4.5]], [5.02, '2.13e+12']]], [['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 28', [[2.9]], [2.9, '1.41e+09']], ['swarm 29', [[2.9, 2.9, 2.9, 2.9, 2.9]], [3.37, '7.06e+09']], ['single event', [[5.0]], [5.0, '2.00e+12']], ['two equal events', [[4.0, 4.0]], [4.2, '1.26e+11']], ['empty', [[]], None], ['one big many small', [[6.0, 3.0, 3.0, 3.0]], [6.0, '6.31e+13']]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| swarm 0 | [12.15, '7.98e+12'] | [5.4, '7.98e+12'] | Failed |
| swarm 1 | [6.08, '7.10e+08'] | [2.7, '7.10e+08'] | Failed |
| swarm 2 | [10.13, '3.55e+11'] | [4.5, '3.55e+11'] | Failed |
| swarm 3 | [6.08, '7.10e+08'] | [2.7, '7.10e+08'] | Failed |
| swarm 4 | [9.9, '2.52e+11'] | [4.4, '2.52e+11'] | Failed |
| swarm 5 | [10.5, '6.29e+11'] | [4.67, '6.29e+11'] | Failed |
| swarm 6 | [15.0, '6.29e+14'] | [6.67, '6.29e+14'] | Failed |
| swarm 7 | [9.04, '6.72e+10'] | [4.02, '6.72e+10'] | Failed |
SHA-256 / cda63707f34133b482ef258adf95a63e6a9a032ec8fd626eda0f93e1ec9bb661
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mags):
if not mags:
return None
e = sum(10 ** (1.5 * m + 4.8) for m in mags)
me = math.log10(e) / 1.5 - 4.8
return [round(me, 2), "%.2e" % e]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['swarm 0', [[5.0, 5.0, 5.0, 5.0]], [5.4, '7.98e+12']], ['swarm 1', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 2', [[4.5]], [4.5, '3.55e+11']], ['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 4', [[4.2, 4.2]], [4.4, '2.52e+11']], ['swarm 5', [[4.2, 4.2, 4.2, 4.2, 4.2]], [4.67, '6.29e+11']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']]], [['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']], ['swarm 8', [[3.6, 3.6]], [3.8, '3.17e+10']], ['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 10', [[5.2, 5.2, 5.2, 5.2, 5.2]], [5.67, '1.99e+13']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']]], [['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 14', [[4.7]], [4.7, '7.08e+11']], ['swarm 15', [[6.0, 6.0]], [6.2, '1.26e+14']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 17', [[2.6, 2.6, 2.6, 2.6, 2.6]], [3.07, '2.51e+09']], ['swarm 18', [[4.1, 4.1]], [4.3, '1.78e+11']], ['swarm 19', [[3.6, 3.6, 3.6, 3.6, 3.6, 3.6]], [4.12, '9.51e+10']]], [['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 22', [[6.1, 6.1]], [6.3, '1.78e+14']], ['swarm 23', [[3.5, 3.5, 3.5]], [3.82, '3.37e+10']], ['swarm 24', [[4.9, 4.9, 4.9, 4.9, 4.9, 4.9]], [5.42, '8.48e+12']], ['swarm 25', [[3.2, 3.2, 3.2, 3.2]], [3.6, '1.59e+10']], ['swarm 26', [[4.5, 4.5, 4.5, 4.5, 4.5, 4.5]], [5.02, '2.13e+12']]], [['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 28', [[2.9]], [2.9, '1.41e+09']], ['swarm 29', [[2.9, 2.9, 2.9, 2.9, 2.9]], [3.37, '7.06e+09']], ['single event', [[5.0]], [5.0, '2.00e+12']], ['two equal events', [[4.0, 4.0]], [4.2, '1.26e+11']], ['empty', [[]], None], ['one big many small', [[6.0, 3.0, 3.0, 3.0]], [6.0, '6.31e+13']]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| swarm 0 | [3.8, '7.98e+12'] | [5.4, '7.98e+12'] | Failed |
| swarm 1 | [1.1, '7.10e+08'] | [2.7, '7.10e+08'] | Failed |
| swarm 2 | [2.9, '3.55e+11'] | [4.5, '3.55e+11'] | Failed |
| swarm 3 | [1.1, '7.10e+08'] | [2.7, '7.10e+08'] | Failed |
| swarm 4 | [2.8, '2.52e+11'] | [4.4, '2.52e+11'] | Failed |
| swarm 5 | [3.07, '6.29e+11'] | [4.67, '6.29e+11'] | Failed |
| swarm 6 | [5.07, '6.29e+14'] | [6.67, '6.29e+14'] | Failed |
| swarm 7 | [2.42, '6.72e+10'] | [4.02, '6.72e+10'] | Failed |
SHA-256 / f5905807087e7949acd46706c1ef0bbd999b696b1dcc3b69e0ae728c75e35d83
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mags):
if not mags:
return None
e = sum(10 ** (1.5 * m + 4.8) for m in mags)
me = (math.log10(e) - 4.8) / 1.5
return [round(me, 2), "%.2e" % e]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['swarm 0', [[5.0, 5.0, 5.0, 5.0]], [5.4, '7.98e+12']], ['swarm 1', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 2', [[4.5]], [4.5, '3.55e+11']], ['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 4', [[4.2, 4.2]], [4.4, '2.52e+11']], ['swarm 5', [[4.2, 4.2, 4.2, 4.2, 4.2]], [4.67, '6.29e+11']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']]], [['swarm 3', [[2.5, 2.5]], [2.7, '7.10e+08']], ['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 7', [[3.7, 3.7, 3.7]], [4.02, '6.72e+10']], ['swarm 8', [[3.6, 3.6]], [3.8, '3.17e+10']], ['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 10', [[5.2, 5.2, 5.2, 5.2, 5.2]], [5.67, '1.99e+13']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']]], [['swarm 6', [[6.2, 6.2, 6.2, 6.2, 6.2]], [6.67, '6.29e+14']], ['swarm 11', [[2.4, 2.4, 2.4, 2.4]], [2.8, '1.00e+09']], ['swarm 14', [[4.7]], [4.7, '7.08e+11']], ['swarm 15', [[6.0, 6.0]], [6.2, '1.26e+14']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 17', [[2.6, 2.6, 2.6, 2.6, 2.6]], [3.07, '2.51e+09']], ['swarm 18', [[4.1, 4.1]], [4.3, '1.78e+11']], ['swarm 19', [[3.6, 3.6, 3.6, 3.6, 3.6, 3.6]], [4.12, '9.51e+10']]], [['swarm 9', [[2.2, 2.2, 2.2, 2.2]], [2.6, '5.04e+08']], ['swarm 16', [[2.7, 2.7, 2.7]], [3.02, '2.12e+09']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 22', [[6.1, 6.1]], [6.3, '1.78e+14']], ['swarm 23', [[3.5, 3.5, 3.5]], [3.82, '3.37e+10']], ['swarm 24', [[4.9, 4.9, 4.9, 4.9, 4.9, 4.9]], [5.42, '8.48e+12']], ['swarm 25', [[3.2, 3.2, 3.2, 3.2]], [3.6, '1.59e+10']], ['swarm 26', [[4.5, 4.5, 4.5, 4.5, 4.5, 4.5]], [5.02, '2.13e+12']]], [['swarm 12', [[2.1, 2.1, 2.1, 2.1]], [2.5, '3.57e+08']], ['swarm 21', [[4.6, 4.6]], [4.8, '1.00e+12']], ['swarm 28', [[2.9]], [2.9, '1.41e+09']], ['swarm 29', [[2.9, 2.9, 2.9, 2.9, 2.9]], [3.37, '7.06e+09']], ['single event', [[5.0]], [5.0, '2.00e+12']], ['two equal events', [[4.0, 4.0]], [4.2, '1.26e+11']], ['empty', [[]], None], ['one big many small', [[6.0, 3.0, 3.0, 3.0]], [6.0, '6.31e+13']]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| swarm 0 | [5.4, '7.98e+12'] | [5.4, '7.98e+12'] | Passed |
| swarm 1 | [2.7, '7.10e+08'] | [2.7, '7.10e+08'] | Passed |
| swarm 2 | [4.5, '3.55e+11'] | [4.5, '3.55e+11'] | Passed |
| swarm 3 | [2.7, '7.10e+08'] | [2.7, '7.10e+08'] | Passed |
| swarm 4 | [4.4, '2.52e+11'] | [4.4, '2.52e+11'] | Passed |
| swarm 5 | [4.67, '6.29e+11'] | [4.67, '6.29e+11'] | Passed |
| swarm 6 | [6.67, '6.29e+14'] | [6.67, '6.29e+14'] | Passed |
| swarm 7 | [4.02, '6.72e+10'] | [4.02, '6.72e+10'] | Passed |
SHA-256 / 857056525ef727bb6c7cb72e151c47107b9c15e5eadf34b54c0b8e5e136a09a6
Verification & scope
Stipulated deterministic teaching model of a seismological magnitude procedure; constants and tables are fixed by the contract and no claim of agency or standards conformance is made. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:29.477198+00:00.
Case digest / b362e947b99858e011bbd22e0efed90e21275db68bbba8d9da27637fcc0f329d