FAILURE MAP
← Case archive

FA-55596 / Astronomical coordinate conventions / Open access

Logarithmic spectral index: Next logarithmic spectral channel adds instead of multiplying · case 01

The adapter reports an incorrect next wavelength while other fields remain valid.

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

ROOT CAUSE

Next logarithmic spectral channel adds instead of multiplying. Faulty expression: d['L0']*d['b']**(d['p']-d['r'])+d['b']

VERIFIED REPAIR

Preserve the declared model convention at this site: d['L0']*d['b']**(d['p']+1-d['r'])

Unsuccessful approach: A partial convention repair still uses d['L0']*d['b']**(d['p']-d['r'])+1

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']-d['r'])+d['b'], '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': 34, '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}Failed
astronomical fixture 1{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 10, '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}Failed
astronomical fixture 2{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 34, '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}Failed
astronomical fixture 3{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 75, '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}Failed
astronomical fixture 4{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 34, '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}Failed
astronomical fixture 5{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 18, '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}Failed

SHA-256 / 9a851de9354589d342b32a8d412e0395da79fba340cc65021353cd5f486769ea

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']-d['r'])+1, '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': 33, '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}Failed
astronomical fixture 1{'channel_width': 8, 'coarse_ratio': 4, 'next_wavelength': 9, '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}Failed
astronomical fixture 2{'channel_width': 32, 'coarse_ratio': 4, 'next_wavelength': 33, '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}Failed
astronomical fixture 3{'channel_width': 144, 'coarse_ratio': 9, 'next_wavelength': 73, '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}Failed
astronomical fixture 4{'channel_width': 32, 'coarse_ratio': 2, 'next_wavelength': 33, '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}Failed
astronomical fixture 5{'channel_width': 16, 'coarse_ratio': 4, 'next_wavelength': 17, '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}Failed

SHA-256 / 047a2585fd85b7a40473b8142d751aafa6be9f7614aa4e72343e234b412ea991

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

Case digest / c673d9ca7b791e73dc984d0fae478a55de7fb7234677acd0ed57113a447ae0be