FAILURE MAP
← Case archive

FA-71561 / Seismic magnitude estimation / Open access

Wood-Anderson amplitude simulation: Wood-Anderson gain · case 01

Local magnitudes are 0.13 units high.

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

ROOT CAUSE

The historical nominal gain 2800 is used instead of the contract gain 2080.

THE FAILURE

The historical nominal gain 2800 is used instead of the contract gain 2080.

Unsuccessful approach: Dropping the metre-to-millimetre factor leaves amplitudes in metres.

Case contract

Velocity-sensor counts, sensitivity counts per m/s, sample interval s. Remove the mean, convert to m/s, integrate with the trapezoid rule from 0, take the maximum absolute displacement, multiply by the Wood-Anderson gain 2080 and convert to mm. Return mm rounded to 1e-4, None for an empty trace.

Why this case matters

Wood-Anderson amplitudes are the input to local magnitude.

1 / The failure

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

N = 1
observations = []
def solve(counts, sens, dt):
    if not counts:
        return None
    mean = sum(counts) / len(counts)
    vel = [(c - mean) / sens for c in counts]
    disp = [0.0]
    for i in range(1, len(vel)):
        disp.append(disp[-1] + 0.5 * (vel[i - 1] + vel[i]) * dt)
    peak = max(abs(x) for x in disp)
    return round(peak * 2800 * 1000, 4)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['trace 0', [[-399, 158, 716, 1343, 399, -234, 349, 919], 500000000.0, 0.02], 0.0492], ['trace 1', [[-438, -422, -845, 107, -288, 724, -435, -632, 690], 100000000.0, 0.01], 0.1913], ['trace 2', [[8, 47, 118, -519, -421, -54, -238, -121], 100000000.0, 0.01], 0.0842], ['trace 3', [[-701, 88, -234, -70, -529, -1002, 304, -1260, -994, 400], 100000000.0, 0.01], 0.1598], ['trace 4', [[-686, 544, 277, -1046, -766, -1235, 329, -1152, -874, 219], 100000000.0, 0.01], 0.2646], ['trace 5', [[1259, -39, 1475, 880, 416, 768, 982, -232], 1500000000.0, 0.02], 0.0136], ['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 7', [[22, -1189, -875, -394, 216], 500000000.0, 0.02], 0.0764]], [['trace 3', [[-701, 88, -234, -70, -529, -1002, 304, -1260, -994, 400], 100000000.0, 0.01], 0.1598], ['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 7', [[22, -1189, -875, -394, 216], 500000000.0, 0.02], 0.0764], ['trace 8', [[491, -743, 168, -106], 100000000.0, 0.01], 0.0662], ['trace 9', [[1140, 675, -129, 1466, 1180, 1409, 1273, 156], 500000000.0, 0.02], 0.0699], ['trace 10', [[295, -693, -527, -749, -313, 39, 217, -925, 433], 1500000000.0, 0.01], 0.0137], ['trace 11', [[415, 520, -255, 348, 660, -938], 500000000.0, 0.02], 0.0541], ['trace 12', [[-597, -489, -301, -271, -999, -558, -230, -970, -1048], 500000000.0, 0.02], 0.0514]], [['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 11', [[415, 520, -255, 348, 660, -938], 500000000.0, 0.02], 0.0541], ['trace 14', [[338, -532, -974, 859, 966, 558], 100000000.0, 0.01], 0.3151], ['trace 15', [[143, 170, -64, 138, 634], 100000000.0, 0.01], 0.0761], ['trace 16', [[1183, 1265, 1030, 749, -390], 500000000.0, 0.02], 0.0798], ['trace 17', [[423, -354, -610, -304, 513, -195, -84, 296], 1500000000.0, 0.02], 0.0218], ['trace 18', [[914, 28, -594, 554, -691, 34, 863, 716, -229, 744], 100000000.0, 0.01], 0.2909], ['trace 19', [[1319, 651, 570, 304, 1072], 1500000000.0, 0.01], 0.0057]], [['trace 9', [[1140, 675, -129, 1466, 1180, 1409, 1273, 156], 500000000.0, 0.02], 0.0699], ['trace 16', [[1183, 1265, 1030, 749, -390], 500000000.0, 0.02], 0.0798], ['trace 21', [[561, 856, 710, 319, 742, 1285, -221, 763], 100000000.0, 0.01], 0.0864], ['trace 22', [[-228, 382, -252, 552, 320, -776], 100000000.0, 0.01], 0.1517], ['trace 23', [[-486, 859, 193, 1092, 1350, -353], 500000000.0, 0.02], 0.0717], ['trace 24', [[-179, 4, 317, 984], 1500000000.0, 0.02], 0.0136], ['trace 25', [[-431, 933, -842, 85, -489, -992, -686, -918], 500000000.0, 0.02], 0.1153], ['trace 26', [[-347, -149, -735, -306, -1255], 1500000000.0, 0.01], 0.0064]], [['trace 0', [[-399, 158, 716, 1343, 399, -234, 349, 919], 500000000.0, 0.02], 0.0492], ['trace 12', [[-597, -489, -301, -271, -999, -558, -230, -970, -1048], 500000000.0, 0.02], 0.0514], ['trace 21', [[561, 856, 710, 319, 742, 1285, -221, 763], 100000000.0, 0.01], 0.0864], ['trace 28', [[-1202, -1275, 528, -292, -12, -129, -528, 349], 100000000.0, 0.01], 0.2021], ['trace 29', [[-178, 10, 1361, 707, 1375, 364, 582, 1449, 423], 1500000000.0, 0.01], 0.0106], ['asymmetric pulse', [[0, 800, 1200, 400, -200, -100], 1000000000.0, 0.01], 0.0239], ['empty', [[], 1000000000.0, 0.01], None], ['offset step', [[1000, 1000, 3000, 1000, 1000], 1000000000.0, 0.01], 0.0166]]]
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
trace 00.06620.0492Failed
trace 10.25750.1913Failed
trace 20.11340.0842Failed
trace 30.21510.1598Failed
trace 40.35620.2646Failed
trace 50.01820.0136Failed
trace 60.01180.0088Failed
trace 70.10280.0764Failed

SHA-256 / 3c73654a6d6955d646a0aad55ea9fe05a800094111f06aa3d5b382866da46ac8

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(counts, sens, dt):
    if not counts:
        return None
    mean = sum(counts) / len(counts)
    vel = [(c - mean) / sens for c in counts]
    disp = [0.0]
    for i in range(1, len(vel)):
        disp.append(disp[-1] + 0.5 * (vel[i - 1] + vel[i]) * dt)
    peak = max(abs(x) for x in disp)
    return round(peak * 2080, 4)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['trace 0', [[-399, 158, 716, 1343, 399, -234, 349, 919], 500000000.0, 0.02], 0.0492], ['trace 1', [[-438, -422, -845, 107, -288, 724, -435, -632, 690], 100000000.0, 0.01], 0.1913], ['trace 2', [[8, 47, 118, -519, -421, -54, -238, -121], 100000000.0, 0.01], 0.0842], ['trace 3', [[-701, 88, -234, -70, -529, -1002, 304, -1260, -994, 400], 100000000.0, 0.01], 0.1598], ['trace 4', [[-686, 544, 277, -1046, -766, -1235, 329, -1152, -874, 219], 100000000.0, 0.01], 0.2646], ['trace 5', [[1259, -39, 1475, 880, 416, 768, 982, -232], 1500000000.0, 0.02], 0.0136], ['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 7', [[22, -1189, -875, -394, 216], 500000000.0, 0.02], 0.0764]], [['trace 3', [[-701, 88, -234, -70, -529, -1002, 304, -1260, -994, 400], 100000000.0, 0.01], 0.1598], ['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 7', [[22, -1189, -875, -394, 216], 500000000.0, 0.02], 0.0764], ['trace 8', [[491, -743, 168, -106], 100000000.0, 0.01], 0.0662], ['trace 9', [[1140, 675, -129, 1466, 1180, 1409, 1273, 156], 500000000.0, 0.02], 0.0699], ['trace 10', [[295, -693, -527, -749, -313, 39, 217, -925, 433], 1500000000.0, 0.01], 0.0137], ['trace 11', [[415, 520, -255, 348, 660, -938], 500000000.0, 0.02], 0.0541], ['trace 12', [[-597, -489, -301, -271, -999, -558, -230, -970, -1048], 500000000.0, 0.02], 0.0514]], [['trace 6', [[967, -475, -512, 255, 516, 486, -840, 288], 1500000000.0, 0.01], 0.0088], ['trace 11', [[415, 520, -255, 348, 660, -938], 500000000.0, 0.02], 0.0541], ['trace 14', [[338, -532, -974, 859, 966, 558], 100000000.0, 0.01], 0.3151], ['trace 15', [[143, 170, -64, 138, 634], 100000000.0, 0.01], 0.0761], ['trace 16', [[1183, 1265, 1030, 749, -390], 500000000.0, 0.02], 0.0798], ['trace 17', [[423, -354, -610, -304, 513, -195, -84, 296], 1500000000.0, 0.02], 0.0218], ['trace 18', [[914, 28, -594, 554, -691, 34, 863, 716, -229, 744], 100000000.0, 0.01], 0.2909], ['trace 19', [[1319, 651, 570, 304, 1072], 1500000000.0, 0.01], 0.0057]], [['trace 9', [[1140, 675, -129, 1466, 1180, 1409, 1273, 156], 500000000.0, 0.02], 0.0699], ['trace 16', [[1183, 1265, 1030, 749, -390], 500000000.0, 0.02], 0.0798], ['trace 21', [[561, 856, 710, 319, 742, 1285, -221, 763], 100000000.0, 0.01], 0.0864], ['trace 22', [[-228, 382, -252, 552, 320, -776], 100000000.0, 0.01], 0.1517], ['trace 23', [[-486, 859, 193, 1092, 1350, -353], 500000000.0, 0.02], 0.0717], ['trace 24', [[-179, 4, 317, 984], 1500000000.0, 0.02], 0.0136], ['trace 25', [[-431, 933, -842, 85, -489, -992, -686, -918], 500000000.0, 0.02], 0.1153], ['trace 26', [[-347, -149, -735, -306, -1255], 1500000000.0, 0.01], 0.0064]], [['trace 0', [[-399, 158, 716, 1343, 399, -234, 349, 919], 500000000.0, 0.02], 0.0492], ['trace 12', [[-597, -489, -301, -271, -999, -558, -230, -970, -1048], 500000000.0, 0.02], 0.0514], ['trace 21', [[561, 856, 710, 319, 742, 1285, -221, 763], 100000000.0, 0.01], 0.0864], ['trace 28', [[-1202, -1275, 528, -292, -12, -129, -528, 349], 100000000.0, 0.01], 0.2021], ['trace 29', [[-178, 10, 1361, 707, 1375, 364, 582, 1449, 423], 1500000000.0, 0.01], 0.0106], ['asymmetric pulse', [[0, 800, 1200, 400, -200, -100], 1000000000.0, 0.01], 0.0239], ['empty', [[], 1000000000.0, 0.01], None], ['offset step', [[1000, 1000, 3000, 1000, 1000], 1000000000.0, 0.01], 0.0166]]]
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
trace 00.00.0492Failed
trace 10.00020.1913Failed
trace 20.00010.0842Failed
trace 30.00020.1598Failed
trace 40.00030.2646Failed
trace 50.00.0136Failed
trace 60.00.0088Failed
trace 70.00010.0764Failed

SHA-256 / 2af6be65701e854e8d6d630851b41e09b7d83df46608afc45b5fb306ed0a70b9

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 3029e8cbdd0494c38ffbaf217d1cd0574591f47d497bef1d3631a2b6316d5342