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

N = 1
observations = []
def solve(d):
    return {'delay_cycles': d['u']*d['l']+d['v']*d['m']+d['w']*d['dn'], 'shifted_phase': d['phase']-d['u']*d['l']-d['v']*d['m']-d['w']*d['dn'], 'reference_x': d['oldx']+d['l'], 'reference_y': d['oldy']+d['m'], 'inverse_delay': -d['u']*d['l']-d['v']*d['m']-d['w']*d['dn'], 'line_of_sight_direction': d['dn']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'u': 3, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 8, 'shifted_phase': 2, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -8, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 3, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 1, 'shifted_phase': 9, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -1, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -13, 'shifted_phase': 23, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 13, 'line_of_sight_direction': -1}), ({'u': 3, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 18, 'shifted_phase': -8, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -18, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 13, 'shifted_phase': -13, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -13, 'line_of_sight_direction': 2})], 2: [({'u': 4, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 10, 'shifted_phase': 0, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -10, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 4, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 3, 'shifted_phase': 7, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -3, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -11, 'shifted_phase': 21, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 11, 'line_of_sight_direction': -1}), ({'u': 4, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 15, 'shifted_phase': -5, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -15, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 15, 'shifted_phase': -15, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -15, 'line_of_sight_direction': 2})], 3: [({'u': 5, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 12, 'shifted_phase': -2, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -12, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 5, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 5, 'shifted_phase': 5, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -5, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -9, 'shifted_phase': 19, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 9, 'line_of_sight_direction': -1}), ({'u': 5, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 12, 'shifted_phase': -2, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -12, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 17, 'shifted_phase': -17, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -17, 'line_of_sight_direction': 2})], 4: [({'u': 6, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 14, 'shifted_phase': -4, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -14, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 6, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 7, 'shifted_phase': 3, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -7, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -7, 'shifted_phase': 17, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 7, 'line_of_sight_direction': -1}), ({'u': 6, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 9, 'shifted_phase': 1, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -9, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 19, 'shifted_phase': -19, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -19, 'line_of_sight_direction': 2})], 5: [({'u': 7, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 16, 'shifted_phase': -6, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -16, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 7, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 9, 'shifted_phase': 1, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -9, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -5, 'shifted_phase': 15, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 5, 'line_of_sight_direction': -1}), ({'u': 7, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 6, 'shifted_phase': 4, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -6, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 21, 'shifted_phase': -21, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -21, 'line_of_sight_direction': 2})]}
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-phase-center-shift

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

N = 1
observations = []
def solve(d):
    return {'delay_cycles': d['u']*d['l']+d['v']*d['m']+d['w']*d['dn'], 'shifted_phase': d['phase']-d['u']*d['l']-d['v']*d['m']-d['w']*d['dn'], 'reference_x': d['oldx']+d['l'], 'reference_y': d['oldy']+d['m'], 'inverse_delay': -d['u']*d['l']-d['v']*d['m']-d['w']*d['dn'], 'line_of_sight_direction': 1-d['dn']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'u': 3, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 8, 'shifted_phase': 2, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -8, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 3, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 1, 'shifted_phase': 9, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -1, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -13, 'shifted_phase': 23, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 13, 'line_of_sight_direction': -1}), ({'u': 3, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 18, 'shifted_phase': -8, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -18, 'line_of_sight_direction': 2}), ({'u': 3, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 13, 'shifted_phase': -13, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -13, 'line_of_sight_direction': 2})], 2: [({'u': 4, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 10, 'shifted_phase': 0, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -10, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 4, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 3, 'shifted_phase': 7, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -3, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -11, 'shifted_phase': 21, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 11, 'line_of_sight_direction': -1}), ({'u': 4, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 15, 'shifted_phase': -5, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -15, 'line_of_sight_direction': 2}), ({'u': 4, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 15, 'shifted_phase': -15, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -15, 'line_of_sight_direction': 2})], 3: [({'u': 5, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 12, 'shifted_phase': -2, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -12, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 5, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 5, 'shifted_phase': 5, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -5, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -9, 'shifted_phase': 19, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 9, 'line_of_sight_direction': -1}), ({'u': 5, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 12, 'shifted_phase': -2, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -12, 'line_of_sight_direction': 2}), ({'u': 5, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 17, 'shifted_phase': -17, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -17, 'line_of_sight_direction': 2})], 4: [({'u': 6, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 14, 'shifted_phase': -4, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -14, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 6, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 7, 'shifted_phase': 3, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -7, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -7, 'shifted_phase': 17, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 7, 'line_of_sight_direction': -1}), ({'u': 6, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 9, 'shifted_phase': 1, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -9, 'line_of_sight_direction': 2}), ({'u': 6, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 19, 'shifted_phase': -19, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -19, 'line_of_sight_direction': 2})], 5: [({'u': 7, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 16, 'shifted_phase': -6, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -16, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 5, 'w': 7, 'l': 0, 'm': 0, 'dn': 0, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 0, 'shifted_phase': 10, 'reference_x': 20, 'reference_y': 30, 'inverse_delay': 0, 'line_of_sight_direction': 1}), ({'u': 7, 'v': 5, 'w': 0, 'l': 2, 'm': -1, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 9, 'shifted_phase': 1, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -9, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 5, 'w': 7, 'l': 2, 'm': -1, 'dn': -2, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': -5, 'shifted_phase': 15, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': 5, 'line_of_sight_direction': -1}), ({'u': 7, 'v': 5, 'w': 7, 'l': -3, 'm': 4, 'dn': 1, 'phase': 10, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 6, 'shifted_phase': 4, 'reference_x': 17, 'reference_y': 34, 'inverse_delay': -6, 'line_of_sight_direction': 2}), ({'u': 7, 'v': 0, 'w': 7, 'l': 2, 'm': -1, 'dn': 1, 'phase': 0, 'oldx': 20, 'oldy': 30}, {'delay_cycles': 21, 'shifted_phase': -21, 'reference_x': 22, 'reference_y': 29, 'inverse_delay': -21, 'line_of_sight_direction': 2})]}
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 line of sight direction while other fields remain valid.

A stipulated small-field interferometer phase-center update supplies old uvw u,v,w and direction differences l,m,nminus1. Delay cycles are u*l+v*m+w*nminus1. Visibility represented by phase cycles subtracts this delay; image tangent reference and phase provenance change together. Output fields are defined by: delay_cycles = d['u']*d['l']+d['v']*d['m']+d['w']*d['dn']; shifted_phase = d['phase']-d['u']*d['l']-d['v']*d['m']-d['w']*d['dn']; reference_x = d['oldx']+d['l']; reference_y = d['oldy']+d['m']; inverse_delay = -d['u']*d['l']-d['v']*d['m']-d['w']*d['dn']; line_of_sight_direction = 1+d['dn']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']-d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': d['gmst']%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 local mean while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']-d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 local apparent while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': d['ra']%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']-d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 apparent ra while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['ra']-d['gmst']-d['lon'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%180, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 mean hour angle while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 apparent hour angle while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access