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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']-d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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-refraction-coordinate-status

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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': d['z']-d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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 observed altitude while other fields remain valid.

A supplied refraction displacement r is positive toward zenith. True zenith distance z maps to observed z-r. Apparent altitude equals 90-z+r. Pressure p/p0 scales a reference displacement, and the refraction flag prevents a second application. This model does not compute atmosphere physics. Output fields are defined by: observed_zenith = d['z']-d['r']; observed_altitude = 90-d['z']+d['r']; pressure_displacement = d['r']*d['p']/d['p0']; apply_once = d['z'] if d['already'] else d['z']-d['r']; true_zenith_from_observed = d['z']+d['r']; vacuum_requested = d['z']+d['r'] if d['already'] else d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p0']/max(1,d['p']), 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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-refraction-coordinate-status

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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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 pressure displacement while other fields remain valid.

A supplied refraction displacement r is positive toward zenith. True zenith distance z maps to observed z-r. Apparent altitude equals 90-z+r. Pressure p/p0 scales a reference displacement, and the refraction flag prevents a second application. This model does not compute atmosphere physics. Output fields are defined by: observed_zenith = d['z']-d['r']; observed_altitude = 90-d['z']+d['r']; pressure_displacement = d['r']*d['p']/d['p0']; apply_once = d['z'] if d['already'] else d['z']-d['r']; true_zenith_from_observed = d['z']+d['r']; vacuum_requested = d['z']+d['r'] if d['already'] else d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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-refraction-coordinate-status

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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if not d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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 apply once while other fields remain valid.

A supplied refraction displacement r is positive toward zenith. True zenith distance z maps to observed z-r. Apparent altitude equals 90-z+r. Pressure p/p0 scales a reference displacement, and the refraction flag prevents a second application. This model does not compute atmosphere physics. Output fields are defined by: observed_zenith = d['z']-d['r']; observed_altitude = 90-d['z']+d['r']; pressure_displacement = d['r']*d['p']/d['p0']; apply_once = d['z'] if d['already'] else d['z']-d['r']; true_zenith_from_observed = d['z']+d['r']; vacuum_requested = d['z']+d['r'] if d['already'] else d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']-d['r'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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-refraction-coordinate-status

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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z'], 'vacuum_requested': d['z']+d['r'] if d['already'] else d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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 true zenith from observed while other fields remain valid.

A supplied refraction displacement r is positive toward zenith. True zenith distance z maps to observed z-r. Apparent altitude equals 90-z+r. Pressure p/p0 scales a reference displacement, and the refraction flag prevents a second application. This model does not compute atmosphere physics. Output fields are defined by: observed_zenith = d['z']-d['r']; observed_altitude = 90-d['z']+d['r']; pressure_displacement = d['r']*d['p']/d['p0']; apply_once = d['z'] if d['already'] else d['z']-d['r']; true_zenith_from_observed = d['z']+d['r']; vacuum_requested = d['z']+d['r'] if d['already'] else d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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-refraction-coordinate-status

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

N = 1
observations = []
def solve(d):
    return {'observed_zenith': d['z']-d['r'], 'observed_altitude': 90-d['z']+d['r'], 'pressure_displacement': d['r']*d['p']/d['p0'], 'apply_once': d['z'] if d['already'] else d['z']-d['r'], 'true_zenith_from_observed': d['z']+d['r'], 'vacuum_requested': d['z']+d['r']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 60, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 0.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60}), ({'z': 60, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 10, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 11, 'observed_altitude': 79, 'pressure_displacement': -0.8, 'apply_once': 11, 'true_zenith_from_observed': 9, 'vacuum_requested': 10}), ({'z': 60, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 58, 'observed_altitude': 32, 'pressure_displacement': 4.0, 'apply_once': 58, 'true_zenith_from_observed': 62, 'vacuum_requested': 60})], 2: [({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 61, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 0.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61}), ({'z': 61, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 11, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 12, 'observed_altitude': 78, 'pressure_displacement': -0.8, 'apply_once': 12, 'true_zenith_from_observed': 10, 'vacuum_requested': 11}), ({'z': 61, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 59, 'observed_altitude': 31, 'pressure_displacement': 4.0, 'apply_once': 59, 'true_zenith_from_observed': 63, 'vacuum_requested': 61})], 3: [({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 62, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 0.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62}), ({'z': 62, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 12, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 13, 'observed_altitude': 77, 'pressure_displacement': -0.8, 'apply_once': 13, 'true_zenith_from_observed': 11, 'vacuum_requested': 12}), ({'z': 62, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 60, 'observed_altitude': 30, 'pressure_displacement': 4.0, 'apply_once': 60, 'true_zenith_from_observed': 64, 'vacuum_requested': 62})], 4: [({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 63, 'observed_altitude': 27, 'pressure_displacement': 0.0, 'apply_once': 63, 'true_zenith_from_observed': 63, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 0.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63}), ({'z': 63, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 1.6, 'apply_once': 63, 'true_zenith_from_observed': 65, 'vacuum_requested': 65}), ({'z': 13, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 14, 'observed_altitude': 76, 'pressure_displacement': -0.8, 'apply_once': 14, 'true_zenith_from_observed': 12, 'vacuum_requested': 13}), ({'z': 63, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 61, 'observed_altitude': 29, 'pressure_displacement': 4.0, 'apply_once': 61, 'true_zenith_from_observed': 65, 'vacuum_requested': 63})], 5: [({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 0, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 64, 'observed_altitude': 26, 'pressure_displacement': 0.0, 'apply_once': 64, 'true_zenith_from_observed': 64, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 0, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 0.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64}), ({'z': 64, 'r': 2, 'p': 8, 'p0': 10, 'already': True, 'x': 5}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 1.6, 'apply_once': 64, 'true_zenith_from_observed': 66, 'vacuum_requested': 66}), ({'z': 14, 'r': -1, 'p': 8, 'p0': 10, 'already': False, 'x': 5}, {'observed_zenith': 15, 'observed_altitude': 75, 'pressure_displacement': -0.8, 'apply_once': 15, 'true_zenith_from_observed': 13, 'vacuum_requested': 14}), ({'z': 64, 'r': 2, 'p': 20, 'p0': 10, 'already': False, 'x': 0}, {'observed_zenith': 62, 'observed_altitude': 28, 'pressure_displacement': 4.0, 'apply_once': 62, 'true_zenith_from_observed': 66, 'vacuum_requested': 64})]}
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 vacuum requested while other fields remain valid.

A supplied refraction displacement r is positive toward zenith. True zenith distance z maps to observed z-r. Apparent altitude equals 90-z+r. Pressure p/p0 scales a reference displacement, and the refraction flag prevents a second application. This model does not compute atmosphere physics. Output fields are defined by: observed_zenith = d['z']-d['r']; observed_altitude = 90-d['z']+d['r']; pressure_displacement = d['r']*d['p']/d['p0']; apply_once = d['z'] if d['already'] else d['z']-d['r']; true_zenith_from_observed = d['z']+d['r']; vacuum_requested = d['z']+d['r'] if d['already'] else d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'geocentric_apparent': d['x']+d['a']+d['d']+d['g'], 'topocentric_apparent': d['x']+d['a']+d['g']+d['d'], 'annual_only_once': d['x'] if d['annual_done'] else d['x']+d['a'], 'diurnal_only_once': d['x'] if d['diurnal_done'] else d['x']+d['d'], 'catalog_from_geocentric': d['x']-d['a']-d['g'], 'geocentric_from_topocentric': d['x']-d['d']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 12, 'diurnal_only_once': 13, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 10, 'diurnal_only_once': 13, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 12, 'diurnal_only_once': 10, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 10, 'topocentric_apparent': 10, 'annual_only_once': 10, 'diurnal_only_once': 10, 'catalog_from_geocentric': 10, 'geocentric_from_topocentric': 10}), ({'x': 10, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 12, 'topocentric_apparent': 11, 'annual_only_once': 8, 'diurnal_only_once': 9, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 10, 'diurnal_only_once': 10, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7})], 2: [({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 13, 'diurnal_only_once': 14, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 11, 'diurnal_only_once': 14, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 13, 'diurnal_only_once': 11, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 11, 'topocentric_apparent': 11, 'annual_only_once': 11, 'diurnal_only_once': 11, 'catalog_from_geocentric': 11, 'geocentric_from_topocentric': 11}), ({'x': 11, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 13, 'topocentric_apparent': 12, 'annual_only_once': 9, 'diurnal_only_once': 10, 'catalog_from_geocentric': 9, 'geocentric_from_topocentric': 12}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 11, 'diurnal_only_once': 11, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8})], 3: [({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 14, 'diurnal_only_once': 15, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 12, 'diurnal_only_once': 15, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 14, 'diurnal_only_once': 12, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 12, 'topocentric_apparent': 12, 'annual_only_once': 12, 'diurnal_only_once': 12, 'catalog_from_geocentric': 12, 'geocentric_from_topocentric': 12}), ({'x': 12, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 14, 'topocentric_apparent': 13, 'annual_only_once': 10, 'diurnal_only_once': 11, 'catalog_from_geocentric': 10, 'geocentric_from_topocentric': 13}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 12, 'diurnal_only_once': 12, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9})], 4: [({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 15, 'diurnal_only_once': 16, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 13, 'diurnal_only_once': 16, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 15, 'diurnal_only_once': 13, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 13, 'topocentric_apparent': 13, 'annual_only_once': 13, 'diurnal_only_once': 13, 'catalog_from_geocentric': 13, 'geocentric_from_topocentric': 13}), ({'x': 13, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 15, 'topocentric_apparent': 14, 'annual_only_once': 11, 'diurnal_only_once': 12, 'catalog_from_geocentric': 11, 'geocentric_from_topocentric': 14}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 13, 'diurnal_only_once': 13, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10})], 5: [({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 16, 'diurnal_only_once': 17, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 14, 'diurnal_only_once': 17, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 16, 'diurnal_only_once': 14, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 14, 'topocentric_apparent': 14, 'annual_only_once': 14, 'diurnal_only_once': 14, 'catalog_from_geocentric': 14, 'geocentric_from_topocentric': 14}), ({'x': 14, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 15, 'annual_only_once': 12, 'diurnal_only_once': 13, 'catalog_from_geocentric': 12, 'geocentric_from_topocentric': 15}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 14, 'diurnal_only_once': 14, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11})]}
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-aberration-correction-provenance

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

N = 1
observations = []
def solve(d):
    return {'geocentric_apparent': d['x']+d['a'], 'topocentric_apparent': d['x']+d['a']+d['g']+d['d'], 'annual_only_once': d['x'] if d['annual_done'] else d['x']+d['a'], 'diurnal_only_once': d['x'] if d['diurnal_done'] else d['x']+d['d'], 'catalog_from_geocentric': d['x']-d['a']-d['g'], 'geocentric_from_topocentric': d['x']-d['d']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 12, 'diurnal_only_once': 13, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 10, 'diurnal_only_once': 13, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 12, 'diurnal_only_once': 10, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7}), ({'x': 10, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 10, 'topocentric_apparent': 10, 'annual_only_once': 10, 'diurnal_only_once': 10, 'catalog_from_geocentric': 10, 'geocentric_from_topocentric': 10}), ({'x': 10, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 12, 'topocentric_apparent': 11, 'annual_only_once': 8, 'diurnal_only_once': 9, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 10, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 16, 'topocentric_apparent': 19, 'annual_only_once': 10, 'diurnal_only_once': 10, 'catalog_from_geocentric': 4, 'geocentric_from_topocentric': 7})], 2: [({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 13, 'diurnal_only_once': 14, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 11, 'diurnal_only_once': 14, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 13, 'diurnal_only_once': 11, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8}), ({'x': 11, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 11, 'topocentric_apparent': 11, 'annual_only_once': 11, 'diurnal_only_once': 11, 'catalog_from_geocentric': 11, 'geocentric_from_topocentric': 11}), ({'x': 11, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 13, 'topocentric_apparent': 12, 'annual_only_once': 9, 'diurnal_only_once': 10, 'catalog_from_geocentric': 9, 'geocentric_from_topocentric': 12}), ({'x': 11, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 17, 'topocentric_apparent': 20, 'annual_only_once': 11, 'diurnal_only_once': 11, 'catalog_from_geocentric': 5, 'geocentric_from_topocentric': 8})], 3: [({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 14, 'diurnal_only_once': 15, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 12, 'diurnal_only_once': 15, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 14, 'diurnal_only_once': 12, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9}), ({'x': 12, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 12, 'topocentric_apparent': 12, 'annual_only_once': 12, 'diurnal_only_once': 12, 'catalog_from_geocentric': 12, 'geocentric_from_topocentric': 12}), ({'x': 12, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 14, 'topocentric_apparent': 13, 'annual_only_once': 10, 'diurnal_only_once': 11, 'catalog_from_geocentric': 10, 'geocentric_from_topocentric': 13}), ({'x': 12, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 18, 'topocentric_apparent': 21, 'annual_only_once': 12, 'diurnal_only_once': 12, 'catalog_from_geocentric': 6, 'geocentric_from_topocentric': 9})], 4: [({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 15, 'diurnal_only_once': 16, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 13, 'diurnal_only_once': 16, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 15, 'diurnal_only_once': 13, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10}), ({'x': 13, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 13, 'topocentric_apparent': 13, 'annual_only_once': 13, 'diurnal_only_once': 13, 'catalog_from_geocentric': 13, 'geocentric_from_topocentric': 13}), ({'x': 13, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 15, 'topocentric_apparent': 14, 'annual_only_once': 11, 'diurnal_only_once': 12, 'catalog_from_geocentric': 11, 'geocentric_from_topocentric': 14}), ({'x': 13, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 19, 'topocentric_apparent': 22, 'annual_only_once': 13, 'diurnal_only_once': 13, 'catalog_from_geocentric': 7, 'geocentric_from_topocentric': 10})], 5: [({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 16, 'diurnal_only_once': 17, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': False}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 14, 'diurnal_only_once': 17, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': False, 'diurnal_done': True}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 16, 'diurnal_only_once': 14, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11}), ({'x': 14, 'a': 0, 'd': 0, 'g': 0, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 14, 'topocentric_apparent': 14, 'annual_only_once': 14, 'diurnal_only_once': 14, 'catalog_from_geocentric': 14, 'geocentric_from_topocentric': 14}), ({'x': 14, 'a': -2, 'd': -1, 'g': 4, 'annual_done': False, 'diurnal_done': False}, {'geocentric_apparent': 16, 'topocentric_apparent': 15, 'annual_only_once': 12, 'diurnal_only_once': 13, 'catalog_from_geocentric': 12, 'geocentric_from_topocentric': 15}), ({'x': 14, 'a': 2, 'd': 3, 'g': 4, 'annual_done': True, 'diurnal_done': True}, {'geocentric_apparent': 20, 'topocentric_apparent': 23, 'annual_only_once': 14, 'diurnal_only_once': 14, 'catalog_from_geocentric': 8, 'geocentric_from_topocentric': 11})]}
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 apparent while other fields remain valid.

Reduced astrometric place pipeline uses supplied additive corrections annual a, diurnal d, and deflection g. Catalog place x is uncorrected; geocentric apparent includes a+g; topocentric apparent additionally includes d. Inverse adapters must remove only corrections already included. No correction is physically calculated. Output fields are defined by: geocentric_apparent = d['x']+d['a']+d['g']; topocentric_apparent = d['x']+d['a']+d['g']+d['d']; annual_only_once = d['x'] if d['annual_done'] else d['x']+d['a']; diurnal_only_once = d['x'] if d['diurnal_done'] else d['x']+d['d']; catalog_from_geocentric = d['x']-d['a']-d['g']; geocentric_from_topocentric = d['x']-d['d']

split: open-access