FAILURE MAP
← Case archive

FA-71526 / Seismic magnitude estimation / Open access

Maximum-curvature completeness magnitude: curvature correction · case 01

Mc is 0.2 units too low, admitting incomplete bins.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The +0.2 maximum-curvature correction is omitted.

VERIFIED REPAIR

Add two tenths to the modal bin.

Unsuccessful approach: Adding 0.2 tenths applies the correction in the wrong unit.

Case contract

Magnitudes in hundredths are binned to 0.1 by rounding half up (floor((m+5)/10) tenths). Mc is the bin with the highest count (ties: lowest bin) plus a 0.2 correction. Return Mc in magnitude units rounded 0.1, or None when empty.

Why this case matters

Completeness magnitude determines which events enter rate and b-value estimates.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(mags_x100):
    if not mags_x100:
        return None
    counts = {}
    for m in mags_x100:
        b = (m + 5) // 10
        counts[b] = counts.get(b, 0) + 1
    best = max(counts.values())
    mode = min(k for k, c in counts.items() if c == best)
    return round(mode / 10, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['raw catalogue 0', [[16]], 0.4], ['raw catalogue 1', [[25, 145, 55, 150, 150, 145, 15]], 1.7], ['raw catalogue 2', [[15, 15, 25, 45, 14, -12, 24, 24, 35, 35, 55, 145, 145]], 0.4], ['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 4', [[15]], 0.4], ['raw catalogue 5', [[-5, 24, 55]], 0.2], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4]], [['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4], ['raw catalogue 8', [[155, 35, 16]], 0.4], ['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 10', [[45, 24, 5, 16, 155]], 0.4], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 12', [[25, 145, 150]], 1.7]], [['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 14', [[5, 14, 16, 55]], 0.3], ['raw catalogue 15', [[45, 55, 15, 26, 45, 15]], 0.4], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 17', [[25, 45, 45, 14, 145, 15, 14, 45, 45, 150, 155, 155, 14, 16]], 0.7], ['raw catalogue 18', [[155, -5, 15, 155, 155, 35, 24, -5, 16, 16, -5, 55]], 0.4], ['raw catalogue 19', [[14]], 0.3]], [['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 22', [[25, 16, 35, 5, 25, 5, 55, -5]], 0.3], ['raw catalogue 23', [[5, 150, 145, 24, 45, 145, 155, 145, 55, -12, 25, 15]], 1.7], ['raw catalogue 24', [[-12, 25, 15, 14]], 0.1], ['raw catalogue 25', [[15, 145, 26, 16, 45, 15]], 0.4], ['raw catalogue 26', [[5, 5, 5, 45, 26, 15]], 0.3]], [['raw catalogue 12', [[25, 145, 150]], 1.7], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 28', [[35, 145]], 0.6], ['raw catalogue 29', [[25, 35, -12, 5, 55, 150, 155, 45, -12, 5]], 0.1], ['raw catalogue 30', [[15]], 0.4], ['raw catalogue 31', [[16]], 0.4], ['raw catalogue 32', [[35, 5, 150, -12]], 0.1], ['raw catalogue 33', [[24, 55, 25, 150, 155, 35, 45, 26, 15]], 0.4]]]
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 fixtureActualExpectedOutcome
raw catalogue 00.20.4Failed
raw catalogue 11.51.7Failed
raw catalogue 20.20.4Failed
raw catalogue 3-0.10.1Failed
raw catalogue 40.20.4Failed
raw catalogue 50.00.2Failed
raw catalogue 60.30.5Failed
raw catalogue 70.20.4Failed

SHA-256 / 0b0d3e8fc4d72ce0ca619962186b4b05681b6e729fc4468313f1282007eb59c6

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(mags_x100):
    if not mags_x100:
        return None
    counts = {}
    for m in mags_x100:
        b = (m + 5) // 10
        counts[b] = counts.get(b, 0) + 1
    best = max(counts.values())
    mode = min(k for k, c in counts.items() if c == best)
    return round((mode + 0.2) / 10, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['raw catalogue 0', [[16]], 0.4], ['raw catalogue 1', [[25, 145, 55, 150, 150, 145, 15]], 1.7], ['raw catalogue 2', [[15, 15, 25, 45, 14, -12, 24, 24, 35, 35, 55, 145, 145]], 0.4], ['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 4', [[15]], 0.4], ['raw catalogue 5', [[-5, 24, 55]], 0.2], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4]], [['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4], ['raw catalogue 8', [[155, 35, 16]], 0.4], ['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 10', [[45, 24, 5, 16, 155]], 0.4], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 12', [[25, 145, 150]], 1.7]], [['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 14', [[5, 14, 16, 55]], 0.3], ['raw catalogue 15', [[45, 55, 15, 26, 45, 15]], 0.4], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 17', [[25, 45, 45, 14, 145, 15, 14, 45, 45, 150, 155, 155, 14, 16]], 0.7], ['raw catalogue 18', [[155, -5, 15, 155, 155, 35, 24, -5, 16, 16, -5, 55]], 0.4], ['raw catalogue 19', [[14]], 0.3]], [['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 22', [[25, 16, 35, 5, 25, 5, 55, -5]], 0.3], ['raw catalogue 23', [[5, 150, 145, 24, 45, 145, 155, 145, 55, -12, 25, 15]], 1.7], ['raw catalogue 24', [[-12, 25, 15, 14]], 0.1], ['raw catalogue 25', [[15, 145, 26, 16, 45, 15]], 0.4], ['raw catalogue 26', [[5, 5, 5, 45, 26, 15]], 0.3]], [['raw catalogue 12', [[25, 145, 150]], 1.7], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 28', [[35, 145]], 0.6], ['raw catalogue 29', [[25, 35, -12, 5, 55, 150, 155, 45, -12, 5]], 0.1], ['raw catalogue 30', [[15]], 0.4], ['raw catalogue 31', [[16]], 0.4], ['raw catalogue 32', [[35, 5, 150, -12]], 0.1], ['raw catalogue 33', [[24, 55, 25, 150, 155, 35, 45, 26, 15]], 0.4]]]
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 fixtureActualExpectedOutcome
raw catalogue 00.20.4Failed
raw catalogue 11.51.7Failed
raw catalogue 20.20.4Failed
raw catalogue 3-0.10.1Failed
raw catalogue 40.20.4Failed
raw catalogue 50.00.2Failed
raw catalogue 60.30.5Failed
raw catalogue 70.20.4Failed

SHA-256 / bcc90a1880f687cf29fae4fdddbb43e8c5873734226f75cce3d628fb453a43d3

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(mags_x100):
    if not mags_x100:
        return None
    counts = {}
    for m in mags_x100:
        b = (m + 5) // 10
        counts[b] = counts.get(b, 0) + 1
    best = max(counts.values())
    mode = min(k for k, c in counts.items() if c == best)
    return round((mode + 2) / 10, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['raw catalogue 0', [[16]], 0.4], ['raw catalogue 1', [[25, 145, 55, 150, 150, 145, 15]], 1.7], ['raw catalogue 2', [[15, 15, 25, 45, 14, -12, 24, 24, 35, 35, 55, 145, 145]], 0.4], ['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 4', [[15]], 0.4], ['raw catalogue 5', [[-5, 24, 55]], 0.2], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4]], [['raw catalogue 3', [[150, -12, 45, 24, -12, 55, 35, 55, 145]], 0.1], ['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 7', [[26, 15]], 0.4], ['raw catalogue 8', [[155, 35, 16]], 0.4], ['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 10', [[45, 24, 5, 16, 155]], 0.4], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 12', [[25, 145, 150]], 1.7]], [['raw catalogue 6', [[26, 25, 145, -5, 14, 155, 26, -5, 145]], 0.5], ['raw catalogue 11', [[35, 35, 15, 55, 35]], 0.6], ['raw catalogue 14', [[5, 14, 16, 55]], 0.3], ['raw catalogue 15', [[45, 55, 15, 26, 45, 15]], 0.4], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 17', [[25, 45, 45, 14, 145, 15, 14, 45, 45, 150, 155, 155, 14, 16]], 0.7], ['raw catalogue 18', [[155, -5, 15, 155, 155, 35, 24, -5, 16, 16, -5, 55]], 0.4], ['raw catalogue 19', [[14]], 0.3]], [['raw catalogue 9', [[55, 14, -5, 5, 155, 26, 55]], 0.3], ['raw catalogue 16', [[16, 5, 15, 35, 15, 5, 150, 16, 5, 16]], 0.4], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 22', [[25, 16, 35, 5, 25, 5, 55, -5]], 0.3], ['raw catalogue 23', [[5, 150, 145, 24, 45, 145, 155, 145, 55, -12, 25, 15]], 1.7], ['raw catalogue 24', [[-12, 25, 15, 14]], 0.1], ['raw catalogue 25', [[15, 145, 26, 16, 45, 15]], 0.4], ['raw catalogue 26', [[5, 5, 5, 45, 26, 15]], 0.3]], [['raw catalogue 12', [[25, 145, 150]], 1.7], ['raw catalogue 21', [[45, 45, 15]], 0.7], ['raw catalogue 28', [[35, 145]], 0.6], ['raw catalogue 29', [[25, 35, -12, 5, 55, 150, 155, 45, -12, 5]], 0.1], ['raw catalogue 30', [[15]], 0.4], ['raw catalogue 31', [[16]], 0.4], ['raw catalogue 32', [[35, 5, 150, -12]], 0.1], ['raw catalogue 33', [[24, 55, 25, 150, 155, 35, 45, 26, 15]], 0.4]]]
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 fixtureActualExpectedOutcome
raw catalogue 00.40.4Passed
raw catalogue 11.71.7Passed
raw catalogue 20.40.4Passed
raw catalogue 30.10.1Passed
raw catalogue 40.40.4Passed
raw catalogue 50.20.2Passed
raw catalogue 60.50.5Passed
raw catalogue 70.40.4Passed

SHA-256 / af9d59b76b0bc2a1acbf352ed91b5400dea5ea71cab7898e7f6a36f62ed9a848

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:30.412886+00:00.

Case digest / 26bb628256747108832cc29bfe5d8c5495c5842052cae9c704230be08133c726