FA-56291 / Astronomical coordinate conventions / Open access
Spectral reference frame chain: Barycentric frequency correction provenance is confused with LSR status · case 01
The adapter reports an incorrect apply barycentric while other fields remain valid.
ROOT CAUSE
Barycentric frequency correction provenance is confused with LSR status. Faulty expression: d['f']+d['a']
VERIFIED REPAIR
Preserve the declared model convention at this site: d['f'] if d['bary_done'] else d['f']+d['a']
Unsuccessful approach: A partial convention repair still uses d['f'] if d['lsr_done'] else d['f']+d['a']
Case contract
A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']
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 {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 1 | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Failed |
| astronomical fixture 2 | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 3 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | Passed |
| astronomical fixture 4 | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | Passed |
| astronomical fixture 5 | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Failed |
SHA-256 / 40c70a198b9ac2f439ad29f022071122df99180c8285423d85411a02c4d9c93d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['lsr_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 1 | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Failed |
| astronomical fixture 2 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Failed |
| astronomical fixture 3 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | Passed |
| astronomical fixture 4 | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | Passed |
| astronomical fixture 5 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
SHA-256 / 73cb0ec4997ba29eceeada282fa7e0c689a6aada75df37736f5cc9e5d4b4a4df
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 1 | {'apply_barycentric': 100, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 107, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 2 | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 104, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
| astronomical fixture 3 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 100, 'lsr_frequency': 100, 'lsr_from_geocenter': 100, 'recover_topocentric': 100} | Passed |
| astronomical fixture 4 | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | {'apply_barycentric': 97, 'apply_lsr': 102, 'geocentric_frequency': 95, 'lsr_frequency': 99, 'lsr_from_geocenter': 104, 'recover_topocentric': 101} | Passed |
| astronomical fixture 5 | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | {'apply_barycentric': 100, 'apply_lsr': 100, 'geocentric_frequency': 102, 'lsr_frequency': 111, 'lsr_from_geocenter': 109, 'recover_topocentric': 89} | Passed |
SHA-256 / a705e65c5c9652dbd5cf4d7a8c47a5058ad9d1c725be93c2a149bb9d83cb0e4e
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:46:05.692522+00:00.
Case digest / 286e7d86dce2f7c65914095749478cdaa96a09213f87f0977016d10ce868b063