FA-71741 / Seismic magnitude estimation / Open access
Scalar moment from moment tensor: Frobenius half factor · case 01
Mw is 0.1 units too high for every tensor.
ROOT CAUSE
The Euclidean norm is not divided by 2 under the square root.
VERIFIED REPAIR
Use sqrt(sum/2).
Unsuccessful approach: Halving outside the root is a factor of sqrt(2) too small.
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)
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 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, '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 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 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, '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 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, '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 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, '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']]]]
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 |
|---|---|---|---|
| CMT 0 | [5.75, 'deviatoric'] | [5.65, 'deviatoric'] | Failed |
| CMT 1 | [4.48, 'deviatoric'] | [4.38, 'deviatoric'] | Failed |
| CMT 2 | [4.39, 'non-deviatoric'] | [4.29, 'non-deviatoric'] | Failed |
| CMT 3 | [4.42, 'deviatoric'] | [4.32, 'deviatoric'] | Failed |
| CMT 4 | [4.48, 'deviatoric'] | [4.38, 'non-deviatoric'] | Failed |
| CMT 5 | [7.07, 'deviatoric'] | [6.96, 'deviatoric'] | Failed |
| CMT 6 | [7.1, 'deviatoric'] | [7.0, 'deviatoric'] | Failed |
| CMT 7 | [5.81, 'non-deviatoric'] | [5.71, 'non-deviatoric'] | Failed |
SHA-256 / b63685a03ff5fe2d3b190f4c9f1e74a280012137441f890b12e16587e16c356e
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) > 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 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, '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 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 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, '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 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, '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 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, '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']]]]
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 |
|---|---|---|---|
| CMT 0 | [5.55, 'deviatoric'] | [5.65, 'deviatoric'] | Failed |
| CMT 1 | [4.28, 'deviatoric'] | [4.38, 'deviatoric'] | Failed |
| CMT 2 | [4.19, 'non-deviatoric'] | [4.29, 'non-deviatoric'] | Failed |
| CMT 3 | [4.22, 'deviatoric'] | [4.32, 'deviatoric'] | Failed |
| CMT 4 | [4.28, 'non-deviatoric'] | [4.38, 'non-deviatoric'] | Failed |
| CMT 5 | [6.86, 'deviatoric'] | [6.96, 'deviatoric'] | Failed |
| CMT 6 | [6.9, 'deviatoric'] | [7.0, 'deviatoric'] | Failed |
| CMT 7 | [5.61, 'non-deviatoric'] | [5.71, 'non-deviatoric'] | Failed |
SHA-256 / 6fa5cd17024ff303acdbe2def74076af383249cb828463b53b1be0763368c19e
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 3', [[1.67, 0.06, -1.73, 1.49, 1.34, -2.67], 22], [4.32, '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 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 6', [[-0.71, 0.51, 0.2, -0.99, 2.74, 2.57], 26], [7.0, 'deviatoric']], ['CMT 11', [[-0.92, -0.76, 2.28, 2.62, -2.3, -1.63], 24], [5.69, '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 9', [[-0.63, -0.39, 1.02, 1.72, 2.75, -2.36], 24], [5.68, 'deviatoric']], ['CMT 16', [[0.43, 0.92, -1.3, -1.94, -0.05, -1.89], 24], [5.58, '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 12', [[-2.44, -0.02, 2.51, 1.65, -2.68, -2.39], 24], [5.71, 'deviatoric']], ['CMT 21', [[2.37, -2.79, 0.47, 2.71, 2.28, 2.18], 22], [4.39, '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']]]]
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 |
|---|---|---|---|
| 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 / 9c20a2c6e9d44089303db5ffaea5e6b0c915a48da7a89e26341843b8052ce0ca
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.352474+00:00.
Case digest / d2ba4aa433780af50c4ef7aa234246a4116a44ad921954139b41ee4b85be971b