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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['u'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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 reference seconds while other fields remain valid.

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect zero day offset while other fields remain valid.

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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 relative day while other fields remain valid.

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S']-d['z'])/d['u']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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 inverse tick while other fields remain valid.

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'roemer_delay': d['r']/d['c'], 'arrival': d['t']+d['r']*d['n']/d['c']+d['E']+d['S'], 'topocentric_residual': (d['r']-d['g'])*d['n']/d['c'], 'geocentric_arrival': d['t']+d['g']*d['n']/d['c']+d['E']+d['S'], 'observer_arrival': d['t']-d['r']*d['n']/d['c']-d['E']-d['S'], 'geometric_rate': d['n']/d['c']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 104.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 104.0, 'observer_arrival': 96.0, 'geometric_rate': 0.0}), ({'t': 100, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 104.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 101.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 104.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 99.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 100.5, 'observer_arrival': 101.0, 'geometric_rate': -0.25})], 2: [({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 105.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 105.0, 'observer_arrival': 97.0, 'geometric_rate': 0.0}), ({'t': 101, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 105.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 102.0, 'observer_arrival': 97.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 105.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 100.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 101.5, 'observer_arrival': 102.0, 'geometric_rate': -0.25})], 3: [({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 106.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 106.0, 'observer_arrival': 98.0, 'geometric_rate': 0.0}), ({'t': 102, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 104.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 106.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 103.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 106.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 101.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 102.5, 'observer_arrival': 103.0, 'geometric_rate': -0.25})], 4: [({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 107.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 107.0, 'observer_arrival': 99.0, 'geometric_rate': 0.0}), ({'t': 103, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 105.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 101.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 107.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 104.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 107.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 103.5, 'observer_arrival': 104.0, 'geometric_rate': -0.25})], 5: [({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 108.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 108.0, 'observer_arrival': 100.0, 'geometric_rate': 0.0}), ({'t': 104, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 106.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 102.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 108.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 104.5, 'observer_arrival': 105.0, 'geometric_rate': -0.25})]}
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-barycentric-arrival-corrections

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

N = 1
observations = []
def solve(d):
    return {'roemer_delay': -d['r']*d['n']/d['c'], 'arrival': d['t']+d['r']*d['n']/d['c']+d['E']+d['S'], 'topocentric_residual': (d['r']-d['g'])*d['n']/d['c'], 'geocentric_arrival': d['t']+d['g']*d['n']/d['c']+d['E']+d['S'], 'observer_arrival': d['t']-d['r']*d['n']/d['c']-d['E']-d['S'], 'geometric_rate': d['n']/d['c']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 104.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 104.0, 'observer_arrival': 96.0, 'geometric_rate': 0.0}), ({'t': 100, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 104.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 101.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 104.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 99.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 100.5, 'observer_arrival': 101.0, 'geometric_rate': -0.25})], 2: [({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 105.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 105.0, 'observer_arrival': 97.0, 'geometric_rate': 0.0}), ({'t': 101, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 105.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 102.0, 'observer_arrival': 97.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 105.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 100.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 101.5, 'observer_arrival': 102.0, 'geometric_rate': -0.25})], 3: [({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 106.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 106.0, 'observer_arrival': 98.0, 'geometric_rate': 0.0}), ({'t': 102, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 104.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 106.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 103.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 106.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 101.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 102.5, 'observer_arrival': 103.0, 'geometric_rate': -0.25})], 4: [({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 107.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 107.0, 'observer_arrival': 99.0, 'geometric_rate': 0.0}), ({'t': 103, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 105.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 101.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 107.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 104.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 107.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 103.5, 'observer_arrival': 104.0, 'geometric_rate': -0.25})], 5: [({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 108.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 108.0, 'observer_arrival': 100.0, 'geometric_rate': 0.0}), ({'t': 104, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 106.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 102.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 108.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 104.5, 'observer_arrival': 105.0, 'geometric_rate': -0.25})]}
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 roemer delay while other fields remain valid.

A supplied timing adapter has observer position r projected onto source direction n, speed c>0, Einstein delay E, Shapiro delay S, and geocenter projection g. Barycentric arrival is t+r*n/c+E+S. This model composes explicit corrections only and does not calculate ephemerides or relativistic delays. Output fields are defined by: roemer_delay = d['r']*d['n']/d['c']; arrival = d['t']+d['r']*d['n']/d['c']+d['E']+d['S']; topocentric_residual = (d['r']-d['g'])*d['n']/d['c']; geocentric_arrival = d['t']+d['g']*d['n']/d['c']+d['E']+d['S']; observer_arrival = d['t']-d['r']*d['n']/d['c']-d['E']-d['S']; geometric_rate = d['n']/d['c']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'roemer_delay': d['r']*d['n']/d['c'], 'arrival': d['t']+d['r']*d['n']/d['c'], 'topocentric_residual': (d['r']-d['g'])*d['n']/d['c'], 'geocentric_arrival': d['t']+d['g']*d['n']/d['c']+d['E']+d['S'], 'observer_arrival': d['t']-d['r']*d['n']/d['c']-d['E']-d['S'], 'geometric_rate': d['n']/d['c']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 104.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 104.0, 'observer_arrival': 96.0, 'geometric_rate': 0.0}), ({'t': 100, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 104.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 101.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 104.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 99.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 100.5, 'observer_arrival': 101.0, 'geometric_rate': -0.25})], 2: [({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 105.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 105.0, 'observer_arrival': 97.0, 'geometric_rate': 0.0}), ({'t': 101, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 105.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 102.0, 'observer_arrival': 97.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 105.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 100.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 101.5, 'observer_arrival': 102.0, 'geometric_rate': -0.25})], 3: [({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 106.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 106.0, 'observer_arrival': 98.0, 'geometric_rate': 0.0}), ({'t': 102, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 104.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 106.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 103.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 106.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 101.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 102.5, 'observer_arrival': 103.0, 'geometric_rate': -0.25})], 4: [({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 107.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 107.0, 'observer_arrival': 99.0, 'geometric_rate': 0.0}), ({'t': 103, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 105.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 101.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 107.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 104.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 107.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 103.5, 'observer_arrival': 104.0, 'geometric_rate': -0.25})], 5: [({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 108.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 108.0, 'observer_arrival': 100.0, 'geometric_rate': 0.0}), ({'t': 104, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 106.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 102.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 108.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 104.5, 'observer_arrival': 105.0, 'geometric_rate': -0.25})]}
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-barycentric-arrival-corrections

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

N = 1
observations = []
def solve(d):
    return {'roemer_delay': d['r']*d['n']/d['c'], 'arrival': d['t']+d['r']*d['n']/d['c']+d['E']-d['S'], 'topocentric_residual': (d['r']-d['g'])*d['n']/d['c'], 'geocentric_arrival': d['t']+d['g']*d['n']/d['c']+d['E']+d['S'], 'observer_arrival': d['t']-d['r']*d['n']/d['c']-d['E']-d['S'], 'geometric_rate': d['n']/d['c']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 104.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 104.0, 'observer_arrival': 96.0, 'geometric_rate': 0.0}), ({'t': 100, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 104.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 101.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 104.0, 'observer_arrival': 92.0, 'geometric_rate': 0.5}), ({'t': 100, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 99.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 100.5, 'observer_arrival': 101.0, 'geometric_rate': -0.25})], 2: [({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 105.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 105.0, 'observer_arrival': 97.0, 'geometric_rate': 0.0}), ({'t': 101, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 106.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 105.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 102.0, 'observer_arrival': 97.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 109.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 105.0, 'observer_arrival': 93.0, 'geometric_rate': 0.5}), ({'t': 101, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 100.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 101.5, 'observer_arrival': 102.0, 'geometric_rate': -0.25})], 3: [({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 106.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 106.0, 'observer_arrival': 98.0, 'geometric_rate': 0.0}), ({'t': 102, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 104.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 107.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 106.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 103.0, 'observer_arrival': 98.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 110.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 106.0, 'observer_arrival': 94.0, 'geometric_rate': 0.5}), ({'t': 102, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 101.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 102.5, 'observer_arrival': 103.0, 'geometric_rate': -0.25})], 4: [({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 107.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 107.0, 'observer_arrival': 99.0, 'geometric_rate': 0.0}), ({'t': 103, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 105.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 108.0, 'observer_arrival': 101.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 107.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 104.0, 'observer_arrival': 99.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 111.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 107.0, 'observer_arrival': 95.0, 'geometric_rate': 0.5}), ({'t': 103, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 102.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 103.5, 'observer_arrival': 104.0, 'geometric_rate': -0.25})], 5: [({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 0, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': 0.0, 'arrival': 108.0, 'topocentric_residual': 0.0, 'geocentric_arrival': 108.0, 'observer_arrival': 100.0, 'geometric_rate': 0.0}), ({'t': 104, 'r': -4, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 106.0, 'topocentric_residual': -3.0, 'geocentric_arrival': 109.0, 'observer_arrival': 102.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 0, 'S': 0, 'g': 2}, {'roemer_delay': 4.0, 'arrival': 108.0, 'topocentric_residual': 3.0, 'geocentric_arrival': 105.0, 'observer_arrival': 100.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': 2, 'c': 4, 'E': 3, 'S': 1, 'g': 0}, {'roemer_delay': 4.0, 'arrival': 112.0, 'topocentric_residual': 4.0, 'geocentric_arrival': 108.0, 'observer_arrival': 96.0, 'geometric_rate': 0.5}), ({'t': 104, 'r': 8, 'n': -1, 'c': 4, 'E': 3, 'S': -2, 'g': 2}, {'roemer_delay': -2.0, 'arrival': 103.0, 'topocentric_residual': -1.5, 'geocentric_arrival': 104.5, 'observer_arrival': 105.0, 'geometric_rate': -0.25})]}
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 arrival while other fields remain valid.

A supplied timing adapter has observer position r projected onto source direction n, speed c>0, Einstein delay E, Shapiro delay S, and geocenter projection g. Barycentric arrival is t+r*n/c+E+S. This model composes explicit corrections only and does not calculate ephemerides or relativistic delays. Output fields are defined by: roemer_delay = d['r']*d['n']/d['c']; arrival = d['t']+d['r']*d['n']/d['c']+d['E']+d['S']; topocentric_residual = (d['r']-d['g'])*d['n']/d['c']; geocentric_arrival = d['t']+d['g']*d['n']/d['c']+d['E']+d['S']; observer_arrival = d['t']-d['r']*d['n']/d['c']-d['E']-d['S']; geometric_rate = d['n']/d['c']

split: open-access