FAILURE MAP
← Case archive

FA-55601 / Astronomical coordinate conventions / Open access

Logarithmic spectral index: Redshift on a log-wavelength grid is applied as pixel scaling · case 01

The adapter reports an incorrect redshifted pixel while other fields remain valid.

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

ROOT CAUSE

Redshift on a log-wavelength grid is applied as pixel scaling. Faulty expression: d['p']*d['b']**d['k']

VERIFIED REPAIR

Preserve the declared model convention at this site: d['p']+d['k']

Unsuccessful approach: A partial convention repair still uses d['p']-d['k']

Case contract

A discrete logarithmic spectrum uses lambda(p)=L0*b**(p-r), b a positive integer >=2 and integer p,r. Redshift by a grid factor b**k is an additive pixel shift k. Coarse bin stride s changes the multiplicative channel ratio. Output fields are defined by: wavelength = d['L0']*d['b']**(d['p']-d['r']); next_wavelength = d['L0']*d['b']**(d['p']+1-d['r']); redshifted_pixel = d['p']+d['k']; rest_pixel = d['p']-d['k']; coarse_ratio = d['b']**d['s']; channel_width = d['L0']*d['b']**(d['p']-d['r'])*(d['b']-1)

Why this case matters

Catalog, detector, sky-coordinate, and spectroscopy adapters must preserve the association between numeric coordinates and their declared reference conventions.

1 / The failure

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

N = 1
observations = []
def solve(d):
    return {'wavelength': d['L0']*d['b']**(d['p']-d['r']), 'next_wavelength': d['L0']*d['b']**(d['p']+1-d['r']), 'redshifted_pixel': d['p']*d['b']**d['k'], 'rest_pixel': d['p']-d['k'], 'coarse_ratio': d['b']**d['s'], 'channel_width': d['L0']*d['b']**(d['p']-d['r'])*(d['b']-1)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 2, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 8, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'coarse_ratio': 4, 'channel_width': 8}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 3, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 72, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 9, 'channel_width': 144}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 2, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 16})], 2: [({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 3, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 5, 'rest_pixel': 1, 'coarse_ratio': 4, 'channel_width': 16}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 3, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 216, 'next_wavelength': 648, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 9, 'channel_width': 432}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 2, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 32})], 3: [({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 3, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 648, 'next_wavelength': 1944, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 9, 'channel_width': 1296}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 2, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 64})], 4: [({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 3, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 1944, 'next_wavelength': 5832, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 9, 'channel_width': 3888}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 2, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 128})], 5: [({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 8, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 3, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 5832, 'next_wavelength': 17496, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 9, 'channel_width': 11664}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 2, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 9, 'coarse_ratio': 4, 'channel_width': 256})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), 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
astronomical fixture 0{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 16, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Failed
astronomical fixture 1{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 8, 'rest_pixel': 0, 'wavelength': 8}{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'wavelength': 8}Failed
astronomical fixture 2{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}Passed
astronomical fixture 3{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 36, 'rest_pixel': 2, 'wavelength': 72}{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 72}Failed
astronomical fixture 4{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 16, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Failed
astronomical fixture 5{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 2.0, 'rest_pixel': 5, 'wavelength': 16}{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'wavelength': 16}Failed

SHA-256 / 7851b19a633cfc99be45cac0fc880c218ad64c634ed7e1f26fc706b41ab56b48

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    return {'wavelength': d['L0']*d['b']**(d['p']-d['r']), 'next_wavelength': d['L0']*d['b']**(d['p']+1-d['r']), 'redshifted_pixel': d['p']-d['k'], 'rest_pixel': d['p']-d['k'], 'coarse_ratio': d['b']**d['s'], 'channel_width': d['L0']*d['b']**(d['p']-d['r'])*(d['b']-1)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 2, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 8, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'coarse_ratio': 4, 'channel_width': 8}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 3, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 72, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 9, 'channel_width': 144}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 2, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 16})], 2: [({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 3, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 5, 'rest_pixel': 1, 'coarse_ratio': 4, 'channel_width': 16}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 3, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 216, 'next_wavelength': 648, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 9, 'channel_width': 432}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 2, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 32})], 3: [({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 3, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 648, 'next_wavelength': 1944, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 9, 'channel_width': 1296}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 2, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 64})], 4: [({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 3, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 1944, 'next_wavelength': 5832, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 9, 'channel_width': 3888}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 2, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 128})], 5: [({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 8, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 3, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 5832, 'next_wavelength': 17496, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 9, 'channel_width': 11664}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 2, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 9, 'coarse_ratio': 4, 'channel_width': 256})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), 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
astronomical fixture 0{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 2, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Failed
astronomical fixture 1{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 0, 'rest_pixel': 0, 'wavelength': 8}{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'wavelength': 8}Failed
astronomical fixture 2{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}Passed
astronomical fixture 3{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 2, 'rest_pixel': 2, 'wavelength': 72}{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 72}Failed
astronomical fixture 4{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 2, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Failed
astronomical fixture 5{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 5, 'rest_pixel': 5, 'wavelength': 16}{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'wavelength': 16}Failed

SHA-256 / bab375868143015c666395c28831899e0b8383b24637143111e6441b01153a88

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    return {'wavelength': d['L0']*d['b']**(d['p']-d['r']), 'next_wavelength': d['L0']*d['b']**(d['p']+1-d['r']), 'redshifted_pixel': d['p']+d['k'], 'rest_pixel': d['p']-d['k'], 'coarse_ratio': d['b']**d['s'], 'channel_width': d['L0']*d['b']**(d['p']-d['r'])*(d['b']-1)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 2, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 8, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'coarse_ratio': 4, 'channel_width': 8}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 3, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 72, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 9, 'channel_width': 144}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 2, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 16})], 2: [({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 3, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 16, 'next_wavelength': 32, 'redshifted_pixel': 5, 'rest_pixel': 1, 'coarse_ratio': 4, 'channel_width': 16}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 3, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 216, 'next_wavelength': 648, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 9, 'channel_width': 432}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 2, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 32})], 3: [({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 4, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 32, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'coarse_ratio': 4, 'channel_width': 32}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 3, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 648, 'next_wavelength': 1944, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 9, 'channel_width': 1296}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 2, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 5, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 64})], 4: [({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 5, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 64, 'next_wavelength': 128, 'redshifted_pixel': 7, 'rest_pixel': 3, 'coarse_ratio': 4, 'channel_width': 64}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 7, 'coarse_ratio': 4, 'channel_width': 256}), ({'L0': 8, 'b': 3, 'p': 7, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 1944, 'next_wavelength': 5832, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 9, 'channel_width': 3888}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 9, 'rest_pixel': 5, 'coarse_ratio': 2, 'channel_width': 256}), ({'L0': 8, 'b': 2, 'p': 7, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 6, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 128})], 5: [({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 6, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 128, 'next_wavelength': 256, 'redshifted_pixel': 8, 'rest_pixel': 4, 'coarse_ratio': 4, 'channel_width': 128}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 0, 's': 2}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 8, 'rest_pixel': 8, 'coarse_ratio': 4, 'channel_width': 512}), ({'L0': 8, 'b': 3, 'p': 8, 'r': 2, 'k': 2, 's': 2}, {'wavelength': 5832, 'next_wavelength': 17496, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 9, 'channel_width': 11664}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 2, 'k': 2, 's': 1}, {'wavelength': 512, 'next_wavelength': 1024, 'redshifted_pixel': 10, 'rest_pixel': 6, 'coarse_ratio': 2, 'channel_width': 512}), ({'L0': 8, 'b': 2, 'p': 8, 'r': 3, 'k': -1, 's': 2}, {'wavelength': 256, 'next_wavelength': 512, 'redshifted_pixel': 7, 'rest_pixel': 9, 'coarse_ratio': 4, 'channel_width': 256})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), 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
astronomical fixture 0{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Passed
astronomical fixture 1{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'wavelength': 8}{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 16, 'redshifted_pixel': 4, 'rest_pixel': 0, 'wavelength': 8}Passed
astronomical fixture 2{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 64, 'redshifted_pixel': 4, 'rest_pixel': 4, 'wavelength': 32}Passed
astronomical fixture 3{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 72}{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 216, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 72}Passed
astronomical fixture 4{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 64, 'redshifted_pixel': 6, 'rest_pixel': 2, 'wavelength': 32}Passed
astronomical fixture 5{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'wavelength': 16}{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 32, 'redshifted_pixel': 3, 'rest_pixel': 5, 'wavelength': 16}Passed

SHA-256 / b4638d8b96eedd12fc78a2d3fc9c40b3ed29d26a10e8aae644166b1be4a51c9f

Verification & scope

Explicitly stipulated finite algebraic adapter; no standards conformance, physical accuracy, or production-library claim. Inputs are the documented finite valid model domain. 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:45:59.380036+00:00.

Case digest / da7db87708f0f61333f1d888cea765b41b712b4aeb93a9786eb08ce7924e1b1c