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

N = 1
observations = []
def solve(d):
    return {'channel_uvw': d['b']*d['f']/d['c'], 'physical_baseline': d['b']*d['f']/d['c']*d['c']/d['f'], 'phase_cycles': d['tau']*d['f'], 'channel_phase_step': d['tau']*d['df'], 'time_phase_step': d['rate']*d['dt'], 'frequency_jacobian': d['b']*d['f']/d['c']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'b': 12, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 12, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.0, 'physical_baseline': 12.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 0, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 0.0, 'physical_baseline': 0.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.0}), ({'b': -7, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -3.5, 'physical_baseline': -7.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.4375}), ({'b': 12, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 12, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 12.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.5})], 2: [({'b': 13, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.5, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 13, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.25, 'physical_baseline': 13.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 1, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 0.5, 'physical_baseline': 1.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.0625}), ({'b': -6, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -3.0, 'physical_baseline': -6.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.375}), ({'b': 13, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.5, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 13, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 13.0, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.625})], 3: [({'b': 14, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 14, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.5, 'physical_baseline': 14.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 2, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 1.0, 'physical_baseline': 2.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.125}), ({'b': -5, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -2.5, 'physical_baseline': -5.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.3125}), ({'b': 14, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 14, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 14.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.75})], 4: [({'b': 15, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.5, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 15, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.75, 'physical_baseline': 15.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 3, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 1.5, 'physical_baseline': 3.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.1875}), ({'b': -4, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -2.0, 'physical_baseline': -4.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.25}), ({'b': 15, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.5, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 15, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 15.0, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.875})], 5: [({'b': 16, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 8.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 16, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 4.0, 'physical_baseline': 16.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 4, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 2.0, 'physical_baseline': 4.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.25}), ({'b': -3, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -1.5, 'physical_baseline': -3.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.1875}), ({'b': 16, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 8.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 16, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 16.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 2.0})]}
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-interferometer-channel-uvw

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

N = 1
observations = []
def solve(d):
    return {'channel_uvw': d['b']*d['f']/d['c'], 'physical_baseline': d['b']*d['f']/d['c']*d['c']/d['f'], 'phase_cycles': d['tau']*d['f'], 'channel_phase_step': d['tau']*d['df'], 'time_phase_step': d['rate']*d['dt'], 'frequency_jacobian': d['b']/d['fr']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'b': 12, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 12, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.0, 'physical_baseline': 12.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 0, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 0.0, 'physical_baseline': 0.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.0}), ({'b': -7, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -3.5, 'physical_baseline': -7.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.4375}), ({'b': 12, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.75}), ({'b': 12, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 12.0, 'physical_baseline': 12.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.5})], 2: [({'b': 13, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.5, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 13, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.25, 'physical_baseline': 13.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 1, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 0.5, 'physical_baseline': 1.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.0625}), ({'b': -6, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -3.0, 'physical_baseline': -6.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.375}), ({'b': 13, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 6.5, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.8125}), ({'b': 13, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 13.0, 'physical_baseline': 13.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.625})], 3: [({'b': 14, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 14, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.5, 'physical_baseline': 14.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 2, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 1.0, 'physical_baseline': 2.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.125}), ({'b': -5, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -2.5, 'physical_baseline': -5.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.3125}), ({'b': 14, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.875}), ({'b': 14, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 14.0, 'physical_baseline': 14.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.75})], 4: [({'b': 15, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.5, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 15, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 3.75, 'physical_baseline': 15.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 3, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 1.5, 'physical_baseline': 3.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.1875}), ({'b': -4, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -2.0, 'physical_baseline': -4.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.25}), ({'b': 15, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 7.5, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.9375}), ({'b': 15, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 15.0, 'physical_baseline': 15.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 1.875})], 5: [({'b': 16, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 8.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 16, 'f': 4, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 4.0, 'physical_baseline': 16.0, 'phase_cycles': 8, 'channel_phase_step': 6, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 4, 'f': 8, 'fr': 4, 'c': 16, 'tau': 0, 'df': 3, 'dt': 5, 'rate': 2}, {'channel_uvw': 2.0, 'physical_baseline': 4.0, 'phase_cycles': 0, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 0.25}), ({'b': -3, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 3, 'dt': 5, 'rate': -2}, {'channel_uvw': -1.5, 'physical_baseline': -3.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': -10, 'frequency_jacobian': -0.1875}), ({'b': 16, 'f': 8, 'fr': 4, 'c': 16, 'tau': 2, 'df': 0, 'dt': 5, 'rate': 2}, {'channel_uvw': 8.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 0, 'time_phase_step': 10, 'frequency_jacobian': 1.0}), ({'b': 16, 'f': 8, 'fr': 4, 'c': 8, 'tau': 2, 'df': 3, 'dt': 1, 'rate': 2}, {'channel_uvw': 16.0, 'physical_baseline': 16.0, 'phase_cycles': 16, 'channel_phase_step': 6, 'time_phase_step': 2, 'frequency_jacobian': 2.0})]}
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 frequency jacobian while other fields remain valid.

A reduced visibility coordinate adapter supplies speed constant c, channel frequency f, reference frequency fr, physical baseline b, and delay tau. Wavelength uvw scales as b*f/c. Angular fringe rate is represented in cycles, not radians. Frequencies and c are positive. Output fields are defined by: channel_uvw = d['b']*d['f']/d['c']; physical_baseline = d['b']*d['f']/d['c']*d['c']/d['f']; phase_cycles = d['tau']*d['f']; channel_phase_step = d['tau']*d['df']; time_phase_step = d['rate']*d['dt']; frequency_jacobian = d['b']/d['c']

split: open-access


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'], '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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

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 delay cycles 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 {'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)

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'], '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 shifted phase 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 {'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)

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['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 reference x 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 {'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['l'], '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)

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 reference y 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 {'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)

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'], '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 inverse delay 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