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

N = 1
observations = []
def solve(d):
    return {'position_variance': d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4, 'position_motion_covariance': d['pm']+d['t']*d['m'], 'acceleration_position_variance': d['t']**4*d['a']/4, 'motion_variance': d['m']+d['t']**2*d['a'], 'scaled_motion_covariance': (d['pm']+d['t']*d['m'])*d['s'], 'backward_cross_covariance': d['pm']-d['t']*d['m']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 4, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 68.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 4, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 4.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 4, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 16.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 4, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 22.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 4, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 56.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 4, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 91.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 2: [({'p': 5, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 69.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 5, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 5.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 5, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 17.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 5, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 23.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 5, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 57.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 5, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 92.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 3: [({'p': 6, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 70.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 6, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 6.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 6, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 18.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 6, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 24.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 6, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 58.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 6, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 93.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 4: [({'p': 7, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 71.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 7, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 7.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 7, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 19.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 7, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 25.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 7, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 59.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 7, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 94.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 5: [({'p': 8, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 72.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 8, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 8.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 8, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 20.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 8, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 26.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 8, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 60.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 8, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 95.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})]}
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-catalog-propagated-covariance

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

N = 1
observations = []
def solve(d):
    return {'position_variance': d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4, 'position_motion_covariance': d['pm']+d['t']*d['m'], 'acceleration_position_variance': d['t']**4*d['a']/4, 'motion_variance': d['m']+d['t']**2*d['a'], 'scaled_motion_covariance': (d['pm']+d['t']*d['m']), 'backward_cross_covariance': d['pm']-d['t']*d['m']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 4, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 68.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 4, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 4.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 4, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 16.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 4, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 22.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 4, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 56.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 4, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 91.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 2: [({'p': 5, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 69.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 5, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 5.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 5, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 17.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 5, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 23.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 5, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 57.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 5, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 92.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 3: [({'p': 6, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 70.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 6, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 6.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 6, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 18.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 6, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 24.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 6, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 58.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 6, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 93.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 4: [({'p': 7, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 71.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 7, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 7.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 7, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 19.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 7, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 25.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 7, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 59.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 7, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 94.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 5: [({'p': 8, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 72.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 8, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 8.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 8, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 20.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 8, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 26.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 8, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 60.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 8, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 95.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})]}
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 scaled motion covariance while other fields remain valid.

A catalog supplies position variance p, proper-motion variance m, covariance pm, elapsed interval t, acceleration variance a, and angular scale s. Under the stipulated independent acceleration model position covariance is p+2*t*pm+t*t*m+t**4*a/4. Motion output excludes acceleration unless explicitly requested. Output fields are defined by: position_variance = d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4; position_motion_covariance = d['pm']+d['t']*d['m']; acceleration_position_variance = d['t']**4*d['a']/4; motion_variance = d['m']+d['t']**2*d['a']; scaled_motion_covariance = (d['pm']+d['t']*d['m'])*d['s']**2; backward_cross_covariance = d['pm']-d['t']*d['m']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'position_variance': d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4, 'position_motion_covariance': d['pm']+d['t']*d['m'], 'acceleration_position_variance': d['t']**4*d['a']/4, 'motion_variance': d['m']+d['t']**2*d['a'], 'scaled_motion_covariance': (d['pm']+d['t']*d['m'])*d['s']**2, 'backward_cross_covariance': d['pm']+d['t']*d['m']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 4, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 68.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 4, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 4.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 4, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 16.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 4, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 22.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 4, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 56.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 4, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 91.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 2: [({'p': 5, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 69.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 5, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 5.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 5, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 17.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 5, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 23.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 5, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 57.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 5, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 92.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 3: [({'p': 6, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 70.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 6, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 6.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 6, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 18.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 6, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 24.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 6, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 58.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 6, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 93.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 4: [({'p': 7, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 71.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 7, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 7.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 7, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 19.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 7, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 25.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 7, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 59.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 7, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 94.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 5: [({'p': 8, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 72.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 8, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 8.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 8, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 20.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 8, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 26.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 8, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 60.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 8, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 95.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})]}
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-catalog-propagated-covariance

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

N = 1
observations = []
def solve(d):
    return {'position_variance': d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4, 'position_motion_covariance': d['pm']+d['t']*d['m'], 'acceleration_position_variance': d['t']**4*d['a']/4, 'motion_variance': d['m']+d['t']**2*d['a'], 'scaled_motion_covariance': (d['pm']+d['t']*d['m'])*d['s']**2, 'backward_cross_covariance': -d['pm']-d['t']*d['m']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 4, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 68.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 4, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 4.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 4, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 16.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 4, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 22.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 4, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 56.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 4, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 91.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 2: [({'p': 5, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 69.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 5, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 5.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 5, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 17.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 5, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 23.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 5, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 57.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 5, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 92.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 3: [({'p': 6, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 70.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 6, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 6.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 6, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 18.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 6, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 24.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 6, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 58.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 6, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 93.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 4: [({'p': 7, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 71.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 7, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 7.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 7, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 19.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 7, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 25.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 7, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 59.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 7, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 94.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})], 5: [({'p': 8, 'm': 2, 'pm': 1, 't': 3, 'a': 2, 's': 2}, {'position_variance': 72.5, 'position_motion_covariance': 7, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 28, 'backward_cross_covariance': -5}), ({'p': 8, 'm': 2, 'pm': 1, 't': 0, 'a': 2, 's': 2}, {'position_variance': 8.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1}), ({'p': 8, 'm': 2, 'pm': 1, 't': -2, 'a': 2, 's': 2}, {'position_variance': 20.0, 'position_motion_covariance': -3, 'acceleration_position_variance': 8.0, 'motion_variance': 10, 'scaled_motion_covariance': -12, 'backward_cross_covariance': 5}), ({'p': 8, 'm': 2, 'pm': 0, 't': 3, 'a': 0, 's': 2}, {'position_variance': 26.0, 'position_motion_covariance': 6, 'acceleration_position_variance': 0.0, 'motion_variance': 2, 'scaled_motion_covariance': 24, 'backward_cross_covariance': -6}), ({'p': 8, 'm': 2, 'pm': -1, 't': 3, 'a': 2, 's': -3}, {'position_variance': 60.5, 'position_motion_covariance': 5, 'acceleration_position_variance': 40.5, 'motion_variance': 20, 'scaled_motion_covariance': 45, 'backward_cross_covariance': -7}), ({'p': 8, 'm': 0, 'pm': 1, 't': 3, 'a': 4, 's': 2}, {'position_variance': 95.0, 'position_motion_covariance': 1, 'acceleration_position_variance': 81.0, 'motion_variance': 36, 'scaled_motion_covariance': 4, 'backward_cross_covariance': 1})]}
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 backward cross covariance while other fields remain valid.

A catalog supplies position variance p, proper-motion variance m, covariance pm, elapsed interval t, acceleration variance a, and angular scale s. Under the stipulated independent acceleration model position covariance is p+2*t*pm+t*t*m+t**4*a/4. Motion output excludes acceleration unless explicitly requested. Output fields are defined by: position_variance = d['p']+2*d['t']*d['pm']+d['t']**2*d['m']+d['t']**4*d['a']/4; position_motion_covariance = d['pm']+d['t']*d['m']; acceleration_position_variance = d['t']**4*d['a']/4; motion_variance = d['m']+d['t']**2*d['a']; scaled_motion_covariance = (d['pm']+d['t']*d['m'])*d['s']**2; backward_cross_covariance = d['pm']-d['t']*d['m']

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'], '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': max(0,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)

prompt:
The adapter reports an incorrect corrected parallax 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'], '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'], '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 zero point 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'], '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'], '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)

prompt:
The adapter reports an incorrect calibrated 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