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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['a'],d['b']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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-baseline-reversal

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

N = 1
observations = []
def solve(d):
    return {'antennas': sorted([d['a'],d['b']]), 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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 antennas while other fields remain valid.

A visibility row reversed from antenna a,b to b,a must negate its uvw vector, conjugate complex visibility, transpose cross-hand labels, negate geometric delay, and exchange antenna-based phases. The real-valued weight is attached to a sample, not to antenna order. Output fields are defined by: antennas = [d['b'],d['a']]; uvw = [-x for x in d['uvw']]; visibility = [d['re'],-d['im']]; polarization = d['pol'][::-1]; geometric_delay = -d['delay']; phase_difference = d['pa']-d['pb']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': d['uvw'], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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-interferometer-baseline-reversal

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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-d['uvw'][0],-d['uvw'][1],d['uvw'][2]], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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 uvw while other fields remain valid.

A visibility row reversed from antenna a,b to b,a must negate its uvw vector, conjugate complex visibility, transpose cross-hand labels, negate geometric delay, and exchange antenna-based phases. The real-valued weight is attached to a sample, not to antenna order. Output fields are defined by: antennas = [d['b'],d['a']]; uvw = [-x for x in d['uvw']]; visibility = [d['re'],-d['im']]; polarization = d['pol'][::-1]; geometric_delay = -d['delay']; phase_difference = d['pa']-d['pb']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [-d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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-baseline-reversal

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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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 visibility while other fields remain valid.

A visibility row reversed from antenna a,b to b,a must negate its uvw vector, conjugate complex visibility, transpose cross-hand labels, negate geometric delay, and exchange antenna-based phases. The real-valued weight is attached to a sample, not to antenna order. Output fields are defined by: antennas = [d['b'],d['a']]; uvw = [-x for x in d['uvw']]; visibility = [d['re'],-d['im']]; polarization = d['pol'][::-1]; geometric_delay = -d['delay']; phase_difference = d['pa']-d['pb']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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-baseline-reversal

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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': 'YX' if d['pol']=='XY' else d['pol'], 'geometric_delay': -d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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 polarization while other fields remain valid.

A visibility row reversed from antenna a,b to b,a must negate its uvw vector, conjugate complex visibility, transpose cross-hand labels, negate geometric delay, and exchange antenna-based phases. The real-valued weight is attached to a sample, not to antenna order. Output fields are defined by: antennas = [d['b'],d['a']]; uvw = [-x for x in d['uvw']]; visibility = [d['re'],-d['im']]; polarization = d['pol'][::-1]; geometric_delay = -d['delay']; phase_difference = d['pa']-d['pb']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': d['delay'], 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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-baseline-reversal

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

N = 1
observations = []
def solve(d):
    return {'antennas': [d['b'],d['a']], 'uvw': [-x for x in d['uvw']], 'visibility': [d['re'],-d['im']], 'polarization': d['pol'][::-1], 'geometric_delay': abs(d['delay']), 'phase_difference': d['pa']-d['pb']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 7, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [7, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 7, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [7, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 2: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 8, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [8, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 8, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [8, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 3: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 9, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [9, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 9, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [9, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 4: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 10, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [10, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 10, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [10, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})], 5: [({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [0, 0, 0], 're': 11, 'im': 0, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [0, 0, 0], 'visibility': [11, 0], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YX', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XY', 'geometric_delay': -8, 'phase_difference': -7}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XX', 'delay': 8, 'pa': 0, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'XX', 'geometric_delay': -8, 'phase_difference': -9}), ({'a': 2, 'b': 5, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'YY', 'delay': -4, 'pa': 2, 'pb': 9, 'weight': 4}, {'antennas': [5, 2], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YY', 'geometric_delay': 4, 'phase_difference': -7}), ({'a': 8, 'b': 1, 'uvw': [2, -3, 4], 're': 11, 'im': 3, 'pol': 'XY', 'delay': 8, 'pa': 2, 'pb': 9, 'weight': 0}, {'antennas': [1, 8], 'uvw': [-2, 3, -4], 'visibility': [11, -3], 'polarization': 'YX', 'geometric_delay': -8, 'phase_difference': -7})]}
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 geometric delay while other fields remain valid.

A visibility row reversed from antenna a,b to b,a must negate its uvw vector, conjugate complex visibility, transpose cross-hand labels, negate geometric delay, and exchange antenna-based phases. The real-valued weight is attached to a sample, not to antenna order. Output fields are defined by: antennas = [d['b'],d['a']]; uvw = [-x for x in d['uvw']]; visibility = [d['re'],-d['im']]; polarization = d['pol'][::-1]; geometric_delay = -d['delay']; phase_difference = d['pa']-d['pb']

split: open-access