FAILURE MAP
← Case archive

FA-71751 / Seismic magnitude estimation / Open access

Scalar moment from moment tensor: isotropic trace test · case 01

Implosive (negative trace) sources are labelled deviatoric.

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

ROOT CAUSE

The trace test ignores negative isotropic components.

VERIFIED REPAIR

Compare |trace| with 0.1 * norm.

Unsuccessful approach: Using trace/3 raises the effective threshold threefold.

Case contract

mt = [Mrr, Mtt, Mpp, Mrt, Mrp, Mtp] mantissas; tensor = mantissa * 10^exponent dyne*cm. M0 = sqrt(sum of all nine squared elements / 2) (off-diagonals appear twice), converted to N*m (1e-7). Mw = 2/3 (log10 M0 - 9.1). Flag "non-deviatoric" when |trace| > 0.1 * M0 mantissa norm, else "deviatoric". Return [Mw rounded 0.01, flag].

Why this case matters

Global CMT catalogues report Mw from the scalar moment of the moment tensor.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mt, exponent):
    mrr, mtt, mpp, mrt, mrp, mtp = mt
    s = mrr ** 2 + mtt ** 2 + mpp ** 2 + 2 * (mrt ** 2 + mrp ** 2 + mtp ** 2)
    norm = math.sqrt(s / 2)
    m0 = norm * 10 ** exponent * 1e-7
    mw = 2.0 / 3.0 * (math.log10(m0) - 9.1)
    tr = mrr + mtt + mpp
    flag = "non-deviatoric" if tr > 0.1 * norm else "deviatoric"
    return [round(mw, 2), flag]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['CMT 0', [[1.58, -0.18, -1.4, -0.23, 1.77, 2.88], 24], [5.65, 'deviatoric']], ['CMT 1', [[1.33, 2.91, -4.19, 1.33, -1.96, -1.34], 22], [4.38, 'deviatoric']], ['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, 'deviatoric']], ['CMT 4', [[-1.9, -1.77, 4.27, 0.86, 2.98, 0.36], 22], [4.38, 'non-deviatoric']], ['CMT 5', [[-2.12, 2.5, -0.38, -0.41, -0.33, -2.59], 26], [6.96, 'deviatoric']], ['CMT 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 8', [[1.74, 1.88, -3.62, -0.88, -1.61, -1.39], 22], [4.33, 'deviatoric']], ['CMT 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 10', [[-2.32, -0.03, 1.45, -0.07, -0.46, -2.98], 26], [6.97, 'non-deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, 'non-deviatoric']], ['CMT 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']]], [['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 15', [[-0.88, -0.92, 1.8, 1.6, 2.66, 2.49], 22], [4.35, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, 'deviatoric']], ['CMT 17', [[-1.85, -0.32, 2.22, -2.09, -2.01, 2.89], 26], [7.04, 'deviatoric']], ['CMT 18', [[-0.42, 0.81, -0.39, 1.33, -2.95, 0.45], 22], [4.28, 'deviatoric']], ['CMT 19', [[-1.94, -1.33, 3.27, 1.63, 1.09, 0.68], 26], [6.96, 'deviatoric']]], [['CMT 13', [[-2.93, -1.43, 3.46, 1.16, 1.86, 1.56], 24], [5.69, 'non-deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, 'deviatoric']], ['CMT 22', [[-0.65, -0.33, 0.98, -2.51, 0.29, 0.8], 22], [4.23, 'deviatoric']], ['CMT 23', [[1.22, -0.52, -0.7, -0.46, 0.42, 1.99], 24], [5.51, 'deviatoric']], ['CMT 24', [[-2.95, 2.42, 0.53, -0.96, 2.79, -0.69], 26], [7.01, 'deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']], ['CMT 26', [[-1.51, 2.8, -1.24, -0.74, 2.72, 0.61], 26], [6.98, 'deviatoric']], ['CMT 27', [[-2.26, 0.42, 1.89, 2.08, -1.97, 2.45], 26], [7.02, 'deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 28', [[-2.3, -0.66, 2.96, 1.1, -2.45, 1.63], 22], [4.34, 'deviatoric']], ['CMT 29', [[-2.07, -1.28, 2.45, 2.72, -1.24, 2.82], 26], [7.05, 'non-deviatoric']], ['CMT 30', [[-1.64, -1.22, 2.86, 1.2, 0.73, -0.28], 26], [6.91, 'deviatoric']], ['CMT 31', [[0.79, 1.24, -2.03, 1.61, -0.68, 0.88], 22], [4.21, 'deviatoric']], ['CMT 32', [[-0.32, -2.12, 3.04, 2.57, 2.1, -2.5], 22], [4.39, 'non-deviatoric']], ['CMT 33', [[-2.75, -0.91, 2.76, 1.11, -2.45, 2.96], 26], [7.06, 'non-deviatoric']], ['pure strike slip', [[0.0, 1.0, -1.0, 0.0, 0.0, 0.0], 25], [5.93, 'deviatoric']]]]
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
CMT 0[5.65, 'deviatoric'][5.65, 'deviatoric']Passed
CMT 1[4.38, 'deviatoric'][4.38, 'deviatoric']Passed
CMT 2[4.29, 'non-deviatoric'][4.29, 'non-deviatoric']Passed
CMT 3[4.32, 'deviatoric'][4.32, 'deviatoric']Passed
CMT 4[4.38, 'non-deviatoric'][4.38, 'non-deviatoric']Passed
CMT 5[6.96, 'deviatoric'][6.96, 'deviatoric']Passed
CMT 6[7.0, 'deviatoric'][7.0, 'deviatoric']Passed
CMT 7[5.71, 'deviatoric'][5.71, 'non-deviatoric']Failed

SHA-256 / c5be770c72649b733e63b919b7b387fa17a03f83a4381c5e2c635f3d05cc3d9c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mt, exponent):
    mrr, mtt, mpp, mrt, mrp, mtp = mt
    s = mrr ** 2 + mtt ** 2 + mpp ** 2 + 2 * (mrt ** 2 + mrp ** 2 + mtp ** 2)
    norm = math.sqrt(s / 2)
    m0 = norm * 10 ** exponent * 1e-7
    mw = 2.0 / 3.0 * (math.log10(m0) - 9.1)
    tr = mrr + mtt + mpp
    flag = "non-deviatoric" if abs(tr) / 3 > 0.1 * norm else "deviatoric"
    return [round(mw, 2), flag]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['CMT 0', [[1.58, -0.18, -1.4, -0.23, 1.77, 2.88], 24], [5.65, 'deviatoric']], ['CMT 1', [[1.33, 2.91, -4.19, 1.33, -1.96, -1.34], 22], [4.38, 'deviatoric']], ['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, 'deviatoric']], ['CMT 4', [[-1.9, -1.77, 4.27, 0.86, 2.98, 0.36], 22], [4.38, 'non-deviatoric']], ['CMT 5', [[-2.12, 2.5, -0.38, -0.41, -0.33, -2.59], 26], [6.96, 'deviatoric']], ['CMT 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 8', [[1.74, 1.88, -3.62, -0.88, -1.61, -1.39], 22], [4.33, 'deviatoric']], ['CMT 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 10', [[-2.32, -0.03, 1.45, -0.07, -0.46, -2.98], 26], [6.97, 'non-deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, 'non-deviatoric']], ['CMT 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']]], [['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 15', [[-0.88, -0.92, 1.8, 1.6, 2.66, 2.49], 22], [4.35, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, 'deviatoric']], ['CMT 17', [[-1.85, -0.32, 2.22, -2.09, -2.01, 2.89], 26], [7.04, 'deviatoric']], ['CMT 18', [[-0.42, 0.81, -0.39, 1.33, -2.95, 0.45], 22], [4.28, 'deviatoric']], ['CMT 19', [[-1.94, -1.33, 3.27, 1.63, 1.09, 0.68], 26], [6.96, 'deviatoric']]], [['CMT 13', [[-2.93, -1.43, 3.46, 1.16, 1.86, 1.56], 24], [5.69, 'non-deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, 'deviatoric']], ['CMT 22', [[-0.65, -0.33, 0.98, -2.51, 0.29, 0.8], 22], [4.23, 'deviatoric']], ['CMT 23', [[1.22, -0.52, -0.7, -0.46, 0.42, 1.99], 24], [5.51, 'deviatoric']], ['CMT 24', [[-2.95, 2.42, 0.53, -0.96, 2.79, -0.69], 26], [7.01, 'deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']], ['CMT 26', [[-1.51, 2.8, -1.24, -0.74, 2.72, 0.61], 26], [6.98, 'deviatoric']], ['CMT 27', [[-2.26, 0.42, 1.89, 2.08, -1.97, 2.45], 26], [7.02, 'deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 28', [[-2.3, -0.66, 2.96, 1.1, -2.45, 1.63], 22], [4.34, 'deviatoric']], ['CMT 29', [[-2.07, -1.28, 2.45, 2.72, -1.24, 2.82], 26], [7.05, 'non-deviatoric']], ['CMT 30', [[-1.64, -1.22, 2.86, 1.2, 0.73, -0.28], 26], [6.91, 'deviatoric']], ['CMT 31', [[0.79, 1.24, -2.03, 1.61, -0.68, 0.88], 22], [4.21, 'deviatoric']], ['CMT 32', [[-0.32, -2.12, 3.04, 2.57, 2.1, -2.5], 22], [4.39, 'non-deviatoric']], ['CMT 33', [[-2.75, -0.91, 2.76, 1.11, -2.45, 2.96], 26], [7.06, 'non-deviatoric']], ['pure strike slip', [[0.0, 1.0, -1.0, 0.0, 0.0, 0.0], 25], [5.93, 'deviatoric']]]]
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
CMT 0[5.65, 'deviatoric'][5.65, 'deviatoric']Passed
CMT 1[4.38, 'deviatoric'][4.38, 'deviatoric']Passed
CMT 2[4.29, 'deviatoric'][4.29, 'non-deviatoric']Failed
CMT 3[4.32, 'deviatoric'][4.32, 'deviatoric']Passed
CMT 4[4.38, 'deviatoric'][4.38, 'non-deviatoric']Failed
CMT 5[6.96, 'deviatoric'][6.96, 'deviatoric']Passed
CMT 6[7.0, 'deviatoric'][7.0, 'deviatoric']Passed
CMT 7[5.71, 'deviatoric'][5.71, 'non-deviatoric']Failed

SHA-256 / c6938234ba5361ac7993a76bb9b1391fec893447a26a27dbfc16a9daae1b94ea

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(mt, exponent):
    mrr, mtt, mpp, mrt, mrp, mtp = mt
    s = mrr ** 2 + mtt ** 2 + mpp ** 2 + 2 * (mrt ** 2 + mrp ** 2 + mtp ** 2)
    norm = math.sqrt(s / 2)
    m0 = norm * 10 ** exponent * 1e-7
    mw = 2.0 / 3.0 * (math.log10(m0) - 9.1)
    tr = mrr + mtt + mpp
    flag = "non-deviatoric" if abs(tr) > 0.1 * norm else "deviatoric"
    return [round(mw, 2), flag]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['CMT 0', [[1.58, -0.18, -1.4, -0.23, 1.77, 2.88], 24], [5.65, 'deviatoric']], ['CMT 1', [[1.33, 2.91, -4.19, 1.33, -1.96, -1.34], 22], [4.38, 'deviatoric']], ['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, 'deviatoric']], ['CMT 4', [[-1.9, -1.77, 4.27, 0.86, 2.98, 0.36], 22], [4.38, 'non-deviatoric']], ['CMT 5', [[-2.12, 2.5, -0.38, -0.41, -0.33, -2.59], 26], [6.96, 'deviatoric']], ['CMT 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 8', [[1.74, 1.88, -3.62, -0.88, -1.61, -1.39], 22], [4.33, 'deviatoric']], ['CMT 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 10', [[-2.32, -0.03, 1.45, -0.07, -0.46, -2.98], 26], [6.97, 'non-deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, 'non-deviatoric']], ['CMT 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']]], [['CMT 2', [[-1.2, 0.01, 1.79, -1.15, 0.15, 2.83], 22], [4.29, 'non-deviatoric']], ['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 14', [[2.95, -1.69, -0.66, -1.55, 1.63, -1.39], 22], [4.3, 'non-deviatoric']], ['CMT 15', [[-0.88, -0.92, 1.8, 1.6, 2.66, 2.49], 22], [4.35, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, 'deviatoric']], ['CMT 17', [[-1.85, -0.32, 2.22, -2.09, -2.01, 2.89], 26], [7.04, 'deviatoric']], ['CMT 18', [[-0.42, 0.81, -0.39, 1.33, -2.95, 0.45], 22], [4.28, 'deviatoric']], ['CMT 19', [[-1.94, -1.33, 3.27, 1.63, 1.09, 0.68], 26], [6.96, 'deviatoric']]], [['CMT 13', [[-2.93, -1.43, 3.46, 1.16, 1.86, 1.56], 24], [5.69, 'non-deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, 'deviatoric']], ['CMT 22', [[-0.65, -0.33, 0.98, -2.51, 0.29, 0.8], 22], [4.23, 'deviatoric']], ['CMT 23', [[1.22, -0.52, -0.7, -0.46, 0.42, 1.99], 24], [5.51, 'deviatoric']], ['CMT 24', [[-2.95, 2.42, 0.53, -0.96, 2.79, -0.69], 26], [7.01, 'deviatoric']], ['CMT 25', [[-1.12, 1.62, -1.4, -2.67, 2.0, 2.3], 24], [5.7, 'non-deviatoric']], ['CMT 26', [[-1.51, 2.8, -1.24, -0.74, 2.72, 0.61], 26], [6.98, 'deviatoric']], ['CMT 27', [[-2.26, 0.42, 1.89, 2.08, -1.97, 2.45], 26], [7.02, 'deviatoric']]], [['CMT 7', [[1.65, 1.09, -3.64, 2.79, -1.4, 1.9], 24], [5.71, 'non-deviatoric']], ['CMT 28', [[-2.3, -0.66, 2.96, 1.1, -2.45, 1.63], 22], [4.34, 'deviatoric']], ['CMT 29', [[-2.07, -1.28, 2.45, 2.72, -1.24, 2.82], 26], [7.05, 'non-deviatoric']], ['CMT 30', [[-1.64, -1.22, 2.86, 1.2, 0.73, -0.28], 26], [6.91, 'deviatoric']], ['CMT 31', [[0.79, 1.24, -2.03, 1.61, -0.68, 0.88], 22], [4.21, 'deviatoric']], ['CMT 32', [[-0.32, -2.12, 3.04, 2.57, 2.1, -2.5], 22], [4.39, 'non-deviatoric']], ['CMT 33', [[-2.75, -0.91, 2.76, 1.11, -2.45, 2.96], 26], [7.06, 'non-deviatoric']], ['pure strike slip', [[0.0, 1.0, -1.0, 0.0, 0.0, 0.0], 25], [5.93, 'deviatoric']]]]
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
CMT 0[5.65, 'deviatoric'][5.65, 'deviatoric']Passed
CMT 1[4.38, 'deviatoric'][4.38, 'deviatoric']Passed
CMT 2[4.29, 'non-deviatoric'][4.29, 'non-deviatoric']Passed
CMT 3[4.32, 'deviatoric'][4.32, 'deviatoric']Passed
CMT 4[4.38, 'non-deviatoric'][4.38, 'non-deviatoric']Passed
CMT 5[6.96, 'deviatoric'][6.96, 'deviatoric']Passed
CMT 6[7.0, 'deviatoric'][7.0, 'deviatoric']Passed
CMT 7[5.71, 'non-deviatoric'][5.71, 'non-deviatoric']Passed

SHA-256 / a80674f54a2677c37245335033ba8b2d122fb8b92d51473e5e0812de3f210b5b

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

Case digest / bc365dc7b8d96f1064cf28e899f2ed1eecf093e4dbd95690df9e83a51634de87