broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': d['k'], 'zero_point_variance': d['vz']+(d['color']-d['ref'])**2*d['vk'], 'uncalibrated_roundtrip': d['pi']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

evaluation_group: astro-astrometric-parallax-calibration

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': -d['k']*(d['color']-d['ref']), 'zero_point_variance': d['vz']+(d['color']-d['ref'])**2*d['vk'], 'uncalibrated_roundtrip': d['pi']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

prompt:
The adapter reports an incorrect color sensitivity while other fields remain valid.

Stipulated calibration: catalog parallax pi contains additive global zero point z and color slope k*(color-ref). Corrected parallax subtracts both; calibration variances vz and vk are independent. Unknown distances are outside this model. Negative corrected parallaxes remain measurements. Output fields are defined by: corrected_parallax = d['pi']-d['z']-d['k']*(d['color']-d['ref']); zero_point = d['z']+d['k']*(d['color']-d['ref']); calibrated_variance = d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk']; color_sensitivity = -d['k']; zero_point_variance = d['vz']+(d['color']-d['ref'])**2*d['vk']; uncalibrated_roundtrip = d['pi']

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': -d['k'], 'zero_point_variance': d['vz']+abs(d['color']-d['ref'])*d['vk'], 'uncalibrated_roundtrip': d['pi']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

evaluation_group: astro-astrometric-parallax-calibration

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': -d['k'], 'zero_point_variance': d['vz']+d['color']**2*d['vk'], 'uncalibrated_roundtrip': d['pi']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

prompt:
The adapter reports an incorrect zero point variance while other fields remain valid.

Stipulated calibration: catalog parallax pi contains additive global zero point z and color slope k*(color-ref). Corrected parallax subtracts both; calibration variances vz and vk are independent. Unknown distances are outside this model. Negative corrected parallaxes remain measurements. Output fields are defined by: corrected_parallax = d['pi']-d['z']-d['k']*(d['color']-d['ref']); zero_point = d['z']+d['k']*(d['color']-d['ref']); calibrated_variance = d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk']; color_sensitivity = -d['k']; zero_point_variance = d['vz']+(d['color']-d['ref'])**2*d['vk']; uncalibrated_roundtrip = d['pi']

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': -d['k'], 'zero_point_variance': d['vz']+(d['color']-d['ref'])**2*d['vk'], 'uncalibrated_roundtrip': d['pi']-2*d['z']-2*d['k']*(d['color']-d['ref'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

evaluation_group: astro-astrometric-parallax-calibration

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'corrected_parallax': d['pi']-d['z']-d['k']*(d['color']-d['ref']), 'zero_point': d['z']+d['k']*(d['color']-d['ref']), 'calibrated_variance': d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk'], 'color_sensitivity': -d['k'], 'zero_point_variance': d['vz']+(d['color']-d['ref'])**2*d['vk'], 'uncalibrated_roundtrip': d['pi']-d['k']*(d['color']-d['ref'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 6, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 8}), ({'pi': -9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -17, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -9}), ({'pi': 8, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 13, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 8}), ({'pi': 8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 0, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 8})], 2: [({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 7, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 9}), ({'pi': -8, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -16, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -8}), ({'pi': 9, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 14, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 9}), ({'pi': 9, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 1, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 9})], 3: [({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 8, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 10}), ({'pi': -7, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -15, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -7}), ({'pi': 10, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 15, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 10}), ({'pi': 10, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 2, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 10})], 4: [({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 9, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 11, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 11}), ({'pi': -6, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -14, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -6}), ({'pi': 11, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 16, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 11}), ({'pi': 11, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 3, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 11})], 5: [({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 2, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 10, 'zero_point': 2, 'calibrated_variance': 7, 'color_sensitivity': -3, 'zero_point_variance': 2, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 0, 'k': 0, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 12, 'zero_point': 0, 'calibrated_variance': 11, 'color_sensitivity': 0, 'zero_point_variance': 6, 'uncalibrated_roundtrip': 12}), ({'pi': -5, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': -13, 'zero_point': 8, 'calibrated_variance': 11, 'color_sensitivity': -3, 'zero_point_variance': 6, 'uncalibrated_roundtrip': -5}), ({'pi': 12, 'z': -2, 'k': 3, 'color': 1, 'ref': 2, 'var': 5, 'vz': 2, 'vk': 1}, {'corrected_parallax': 17, 'zero_point': -5, 'calibrated_variance': 8, 'color_sensitivity': -3, 'zero_point_variance': 3, 'uncalibrated_roundtrip': 12}), ({'pi': 12, 'z': 2, 'k': 3, 'color': 4, 'ref': 2, 'var': 5, 'vz': 0, 'vk': 0}, {'corrected_parallax': 4, 'zero_point': 8, 'calibrated_variance': 5, 'color_sensitivity': -3, 'zero_point_variance': 0, 'uncalibrated_roundtrip': 12})]}
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)

prompt:
The adapter reports an incorrect uncalibrated roundtrip while other fields remain valid.

Stipulated calibration: catalog parallax pi contains additive global zero point z and color slope k*(color-ref). Corrected parallax subtracts both; calibration variances vz and vk are independent. Unknown distances are outside this model. Negative corrected parallaxes remain measurements. Output fields are defined by: corrected_parallax = d['pi']-d['z']-d['k']*(d['color']-d['ref']); zero_point = d['z']+d['k']*(d['color']-d['ref']); calibrated_variance = d['var']+d['vz']+(d['color']-d['ref'])**2*d['vk']; color_sensitivity = -d['k']; zero_point_variance = d['vz']+(d['color']-d['ref'])**2*d['vk']; uncalibrated_roundtrip = d['pi']

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx'], 'geocentric_velocity': d['tv']-d['cv'], 'observer_position': d['cx']+d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

evaluation_group: astro-ephemeris-relative-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx']+d['cx'], 'geocentric_velocity': d['tv']-d['cv'], 'observer_position': d['cx']+d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

prompt:
The adapter reports an incorrect geocentric position while other fields remain valid.

A supplied ephemeris state for target T and center C is barycentric. Observer topocenter adds station displacement s and station velocity v to C. Output relative vectors use this explicit one-dimensional reduction; light-time iteration and relativity are outside scope. Output fields are defined by: geocentric_position = d['tx']-d['cx']; geocentric_velocity = d['tv']-d['cv']; observer_position = d['cx']+d['s']; observer_velocity = d['cv']+d['v']; topocentric_position = d['tx']-d['cx']-d['s']; retarded_target_position = d['tx']-d['tv']*d['dt']

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx']-d['cx'], 'geocentric_velocity': d['tv'], 'observer_position': d['cx']+d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

evaluation_group: astro-ephemeris-relative-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx']-d['cx'], 'geocentric_velocity': d['tv']-d['cx'], 'observer_position': d['cx']+d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

prompt:
The adapter reports an incorrect geocentric velocity while other fields remain valid.

A supplied ephemeris state for target T and center C is barycentric. Observer topocenter adds station displacement s and station velocity v to C. Output relative vectors use this explicit one-dimensional reduction; light-time iteration and relativity are outside scope. Output fields are defined by: geocentric_position = d['tx']-d['cx']; geocentric_velocity = d['tv']-d['cv']; observer_position = d['cx']+d['s']; observer_velocity = d['cv']+d['v']; topocentric_position = d['tx']-d['cx']-d['s']; retarded_target_position = d['tx']-d['tv']*d['dt']

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx']-d['cx'], 'geocentric_velocity': d['tv']-d['cv'], 'observer_position': d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

evaluation_group: astro-ephemeris-relative-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'geocentric_position': d['tx']-d['cx'], 'geocentric_velocity': d['tv']-d['cv'], 'observer_position': d['cx']-d['s'], 'observer_velocity': d['cv']+d['v'], 'topocentric_position': d['tx']-d['cx']-d['s'], 'retarded_target_position': d['tx']-d['tv']*d['dt']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 70, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 100, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 98, 'retarded_target_position': 52}), ({'tx': 30, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 0, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -2, 'retarded_target_position': 18}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 74, 'retarded_target_position': 52}), ({'tx': 100, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 70, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 68, 'retarded_target_position': 100})], 2: [({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 71, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 101, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 99, 'retarded_target_position': 53}), ({'tx': 31, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 1, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': -1, 'retarded_target_position': 19}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 75, 'retarded_target_position': 53}), ({'tx': 101, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 71, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 69, 'retarded_target_position': 101})], 3: [({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 72, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 102, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 100, 'retarded_target_position': 54}), ({'tx': 32, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 2, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 0, 'retarded_target_position': 20}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 76, 'retarded_target_position': 54}), ({'tx': 102, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 72, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 70, 'retarded_target_position': 102})], 4: [({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 73, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 103, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 101, 'retarded_target_position': 55}), ({'tx': 33, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 3, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 1, 'retarded_target_position': 21}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 77, 'retarded_target_position': 55}), ({'tx': 103, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 73, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 71, 'retarded_target_position': 103})], 5: [({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 0, 'v': 0, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 30, 'observer_velocity': 3, 'topocentric_position': 74, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 0, 'cv': 0, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 104, 'geocentric_velocity': 12, 'observer_position': 2, 'observer_velocity': 1, 'topocentric_position': 102, 'retarded_target_position': 56}), ({'tx': 34, 'tv': 3, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 4}, {'geocentric_position': 4, 'geocentric_velocity': 0, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 2, 'retarded_target_position': 22}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': -4, 'v': -2, 'dt': 4}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 26, 'observer_velocity': 1, 'topocentric_position': 78, 'retarded_target_position': 56}), ({'tx': 104, 'tv': 12, 'cx': 30, 'cv': 3, 's': 2, 'v': 1, 'dt': 0}, {'geocentric_position': 74, 'geocentric_velocity': 9, 'observer_position': 32, 'observer_velocity': 4, 'topocentric_position': 72, 'retarded_target_position': 104})]}
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)

prompt:
The adapter reports an incorrect observer position while other fields remain valid.

A supplied ephemeris state for target T and center C is barycentric. Observer topocenter adds station displacement s and station velocity v to C. Output relative vectors use this explicit one-dimensional reduction; light-time iteration and relativity are outside scope. Output fields are defined by: geocentric_position = d['tx']-d['cx']; geocentric_velocity = d['tv']-d['cv']; observer_position = d['cx']+d['s']; observer_velocity = d['cv']+d['v']; topocentric_position = d['tx']-d['cx']-d['s']; retarded_target_position = d['tx']-d['tv']*d['dt']

split: open-access