FA-54956 / Astronomical coordinate conventions / Open access
Cube axis slice: Collapsed channel upper edge assumes one spectral pixel · case 01
The adapter reports an incorrect upper edge while other fields remain valid.
ROOT CAUSE
Collapsed channel upper edge assumes one spectral pixel. Faulty expression: d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])*d['thick']
VERIFIED REPAIR
Preserve the declared model convention at this site: d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])*d['thick']/2
Unsuccessful approach: A partial convention repair still uses d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])/2
Case contract
A linear cube has two retained celestial axes and a sliced spectral pixel k with reference rk. Cross-axis CD coefficients ax,ay shift celestial reference values. Spectral world coordinate is rv+dv*(k-rk). Slice thickness is specified in spectral pixels. Output fields are defined by: longitude_reference = d['x']+d['ax']*(d['k']-d['rk']); latitude_reference = d['y']+d['ay']*(d['k']-d['rk']); spectral_coordinate = d['rv']+d['dv']*(d['k']-d['rk']); spectral_width = abs(d['dv'])*d['thick']; lower_edge = d['rv']+d['dv']*(d['k']-d['rk'])-abs(d['dv'])*d['thick']/2; upper_edge = d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])*d['thick']/2
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 {'longitude_reference': d['x']+d['ax']*(d['k']-d['rk']), 'latitude_reference': d['y']+d['ay']*(d['k']-d['rk']), 'spectral_coordinate': d['rv']+d['dv']*(d['k']-d['rk']), 'spectral_width': abs(d['dv'])*d['thick'], 'lower_edge': d['rv']+d['dv']*(d['k']-d['rk'])-abs(d['dv'])*d['thick']/2, 'upper_edge': d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])*d['thick']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 7, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 3, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 100, 'spectral_width': 8, 'lower_edge': 96.0, 'upper_edge': 104.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 92, 'spectral_width': 4, 'lower_edge': 90.0, 'upper_edge': 94.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 4, 'lower_edge': 114.0, 'upper_edge': 118.0}), ({'k': 7, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -6, 'latitude_reference': 60, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0})], 2: [({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 8, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 4, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 12, 'latitude_reference': 17, 'spectral_coordinate': 104, 'spectral_width': 8, 'lower_edge': 100.0, 'upper_edge': 108.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 90, 'spectral_width': 4, 'lower_edge': 88.0, 'upper_edge': 92.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 4, 'lower_edge': 118.0, 'upper_edge': 122.0}), ({'k': 8, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -8, 'latitude_reference': 65, 'spectral_coordinate': 136, 'spectral_width': 8, 'lower_edge': 132.0, 'upper_edge': 140.0})], 3: [({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 9, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 5, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 14, 'latitude_reference': 14, 'spectral_coordinate': 108, 'spectral_width': 8, 'lower_edge': 104.0, 'upper_edge': 112.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 88, 'spectral_width': 4, 'lower_edge': 86.0, 'upper_edge': 90.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 4, 'lower_edge': 122.0, 'upper_edge': 126.0}), ({'k': 9, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -10, 'latitude_reference': 70, 'spectral_coordinate': 140, 'spectral_width': 8, 'lower_edge': 136.0, 'upper_edge': 144.0})], 4: [({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 10, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 6, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 16, 'latitude_reference': 11, 'spectral_coordinate': 112, 'spectral_width': 8, 'lower_edge': 108.0, 'upper_edge': 116.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 86, 'spectral_width': 4, 'lower_edge': 84.0, 'upper_edge': 88.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 4, 'lower_edge': 126.0, 'upper_edge': 130.0}), ({'k': 10, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -12, 'latitude_reference': 75, 'spectral_coordinate': 144, 'spectral_width': 8, 'lower_edge': 140.0, 'upper_edge': 148.0})], 5: [({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 11, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 84, 'spectral_width': 4, 'lower_edge': 82.0, 'upper_edge': 86.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 4, 'lower_edge': 130.0, 'upper_edge': 134.0}), ({'k': 11, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -14, 'latitude_reference': 80, 'spectral_coordinate': 148, 'spectral_width': 8, 'lower_edge': 144.0, 'upper_edge': 152.0})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| astronomical fixture 0 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 124} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Failed |
| astronomical fixture 1 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 124} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Failed |
| astronomical fixture 2 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 108} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 104.0} | Failed |
| astronomical fixture 3 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 96} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 94.0} | Failed |
| astronomical fixture 4 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 120} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 118.0} | Failed |
| astronomical fixture 5 | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 140} | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 136.0} | Failed |
SHA-256 / 381bea39b2c383ea4eed5bdd37b5178d33bd1c084111bc26f9786b294158c5cc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'longitude_reference': d['x']+d['ax']*(d['k']-d['rk']), 'latitude_reference': d['y']+d['ay']*(d['k']-d['rk']), 'spectral_coordinate': d['rv']+d['dv']*(d['k']-d['rk']), 'spectral_width': abs(d['dv'])*d['thick'], 'lower_edge': d['rv']+d['dv']*(d['k']-d['rk'])-abs(d['dv'])*d['thick']/2, 'upper_edge': d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])/2}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 7, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 3, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 100, 'spectral_width': 8, 'lower_edge': 96.0, 'upper_edge': 104.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 92, 'spectral_width': 4, 'lower_edge': 90.0, 'upper_edge': 94.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 4, 'lower_edge': 114.0, 'upper_edge': 118.0}), ({'k': 7, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -6, 'latitude_reference': 60, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0})], 2: [({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 8, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 4, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 12, 'latitude_reference': 17, 'spectral_coordinate': 104, 'spectral_width': 8, 'lower_edge': 100.0, 'upper_edge': 108.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 90, 'spectral_width': 4, 'lower_edge': 88.0, 'upper_edge': 92.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 4, 'lower_edge': 118.0, 'upper_edge': 122.0}), ({'k': 8, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -8, 'latitude_reference': 65, 'spectral_coordinate': 136, 'spectral_width': 8, 'lower_edge': 132.0, 'upper_edge': 140.0})], 3: [({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 9, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 5, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 14, 'latitude_reference': 14, 'spectral_coordinate': 108, 'spectral_width': 8, 'lower_edge': 104.0, 'upper_edge': 112.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 88, 'spectral_width': 4, 'lower_edge': 86.0, 'upper_edge': 90.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 4, 'lower_edge': 122.0, 'upper_edge': 126.0}), ({'k': 9, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -10, 'latitude_reference': 70, 'spectral_coordinate': 140, 'spectral_width': 8, 'lower_edge': 136.0, 'upper_edge': 144.0})], 4: [({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 10, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 6, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 16, 'latitude_reference': 11, 'spectral_coordinate': 112, 'spectral_width': 8, 'lower_edge': 108.0, 'upper_edge': 116.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 86, 'spectral_width': 4, 'lower_edge': 84.0, 'upper_edge': 88.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 4, 'lower_edge': 126.0, 'upper_edge': 130.0}), ({'k': 10, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -12, 'latitude_reference': 75, 'spectral_coordinate': 144, 'spectral_width': 8, 'lower_edge': 140.0, 'upper_edge': 148.0})], 5: [({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 11, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 84, 'spectral_width': 4, 'lower_edge': 82.0, 'upper_edge': 86.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 4, 'lower_edge': 130.0, 'upper_edge': 134.0}), ({'k': 11, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -14, 'latitude_reference': 80, 'spectral_coordinate': 148, 'spectral_width': 8, 'lower_edge': 144.0, 'upper_edge': 152.0})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| astronomical fixture 0 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 118.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Failed |
| astronomical fixture 1 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 118.0} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Failed |
| astronomical fixture 2 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 102.0} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 104.0} | Failed |
| astronomical fixture 3 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 93.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 94.0} | Failed |
| astronomical fixture 4 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 118.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 118.0} | Passed |
| astronomical fixture 5 | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 134.0} | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 136.0} | Failed |
SHA-256 / 6169a8349d076c41f706135b97619f60e1b6cb55652d5f72dac21aaa872ace1b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'longitude_reference': d['x']+d['ax']*(d['k']-d['rk']), 'latitude_reference': d['y']+d['ay']*(d['k']-d['rk']), 'spectral_coordinate': d['rv']+d['dv']*(d['k']-d['rk']), 'spectral_width': abs(d['dv'])*d['thick'], 'lower_edge': d['rv']+d['dv']*(d['k']-d['rk'])-abs(d['dv'])*d['thick']/2, 'upper_edge': d['rv']+d['dv']*(d['k']-d['rk'])+abs(d['dv'])*d['thick']/2}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 7, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 3, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 100, 'spectral_width': 8, 'lower_edge': 96.0, 'upper_edge': 104.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 92, 'spectral_width': 4, 'lower_edge': 90.0, 'upper_edge': 94.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 4, 'lower_edge': 114.0, 'upper_edge': 118.0}), ({'k': 7, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -6, 'latitude_reference': 60, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0})], 2: [({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 8, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 120, 'spectral_width': 8, 'lower_edge': 116.0, 'upper_edge': 124.0}), ({'k': 4, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 12, 'latitude_reference': 17, 'spectral_coordinate': 104, 'spectral_width': 8, 'lower_edge': 100.0, 'upper_edge': 108.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 90, 'spectral_width': 4, 'lower_edge': 88.0, 'upper_edge': 92.0}), ({'k': 8, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 20, 'latitude_reference': 5, 'spectral_coordinate': 120, 'spectral_width': 4, 'lower_edge': 118.0, 'upper_edge': 122.0}), ({'k': 8, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -8, 'latitude_reference': 65, 'spectral_coordinate': 136, 'spectral_width': 8, 'lower_edge': 132.0, 'upper_edge': 140.0})], 3: [({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 9, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 124, 'spectral_width': 8, 'lower_edge': 120.0, 'upper_edge': 128.0}), ({'k': 5, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 14, 'latitude_reference': 14, 'spectral_coordinate': 108, 'spectral_width': 8, 'lower_edge': 104.0, 'upper_edge': 112.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 88, 'spectral_width': 4, 'lower_edge': 86.0, 'upper_edge': 90.0}), ({'k': 9, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 22, 'latitude_reference': 2, 'spectral_coordinate': 124, 'spectral_width': 4, 'lower_edge': 122.0, 'upper_edge': 126.0}), ({'k': 9, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -10, 'latitude_reference': 70, 'spectral_coordinate': 140, 'spectral_width': 8, 'lower_edge': 136.0, 'upper_edge': 144.0})], 4: [({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 10, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 128, 'spectral_width': 8, 'lower_edge': 124.0, 'upper_edge': 132.0}), ({'k': 6, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 16, 'latitude_reference': 11, 'spectral_coordinate': 112, 'spectral_width': 8, 'lower_edge': 108.0, 'upper_edge': 116.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 86, 'spectral_width': 4, 'lower_edge': 84.0, 'upper_edge': 88.0}), ({'k': 10, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 24, 'latitude_reference': -1, 'spectral_coordinate': 128, 'spectral_width': 4, 'lower_edge': 126.0, 'upper_edge': 130.0}), ({'k': 10, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -12, 'latitude_reference': 75, 'spectral_coordinate': 144, 'spectral_width': 8, 'lower_edge': 140.0, 'upper_edge': 148.0})], 5: [({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 11, 'rk': 3, 'ax': 0, 'ay': 0, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 10, 'latitude_reference': 20, 'spectral_coordinate': 132, 'spectral_width': 8, 'lower_edge': 128.0, 'upper_edge': 136.0}), ({'k': 7, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': 18, 'latitude_reference': 8, 'spectral_coordinate': 116, 'spectral_width': 8, 'lower_edge': 112.0, 'upper_edge': 120.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': -2, 'thick': 2}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 84, 'spectral_width': 4, 'lower_edge': 82.0, 'upper_edge': 86.0}), ({'k': 11, 'rk': 3, 'ax': 2, 'ay': -3, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 1}, {'longitude_reference': 26, 'latitude_reference': -4, 'spectral_coordinate': 132, 'spectral_width': 4, 'lower_edge': 130.0, 'upper_edge': 134.0}), ({'k': 11, 'rk': -1, 'ax': -2, 'ay': 5, 'x': 10, 'y': 20, 'rv': 100, 'dv': 4, 'thick': 2}, {'longitude_reference': -14, 'latitude_reference': 80, 'spectral_coordinate': 148, 'spectral_width': 8, 'lower_edge': 144.0, 'upper_edge': 152.0})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| astronomical fixture 0 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Passed |
| astronomical fixture 1 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 112.0, 'spectral_coordinate': 116, 'spectral_width': 8, 'upper_edge': 120.0} | Passed |
| astronomical fixture 2 | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 104.0} | {'latitude_reference': 20, 'longitude_reference': 10, 'lower_edge': 96.0, 'spectral_coordinate': 100, 'spectral_width': 8, 'upper_edge': 104.0} | Passed |
| astronomical fixture 3 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 94.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 90.0, 'spectral_coordinate': 92, 'spectral_width': 4, 'upper_edge': 94.0} | Passed |
| astronomical fixture 4 | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 118.0} | {'latitude_reference': 8, 'longitude_reference': 18, 'lower_edge': 114.0, 'spectral_coordinate': 116, 'spectral_width': 4, 'upper_edge': 118.0} | Passed |
| astronomical fixture 5 | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 136.0} | {'latitude_reference': 60, 'longitude_reference': -6, 'lower_edge': 128.0, 'spectral_coordinate': 132, 'spectral_width': 8, 'upper_edge': 136.0} | Passed |
SHA-256 / c4f595ae8ff5d010564fcc8481691868c1f653dde3a1d057b7d0f307b8ee12d1
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:53.154274+00:00.
Case digest / 60677ee5caf69e8dad3ff45d015358c6193e27aa5c921039abea42be244737fa