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['pb']-d['pa']}
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 phase difference 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 {'channel_uvw': d['b']*d['fr']/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']}
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

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['fr'], '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']}
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 channel uvw 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 {'channel_uvw': d['b']*d['f']/d['c'], 'physical_baseline': d['b']*d['f']/d['c'], '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']}
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['fr'], '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']}
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 physical baseline 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 {'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['fr'], 'channel_phase_step': d['tau']*d['df'], 'time_phase_step': d['rate']*d['dt'], 'frequency_jacobian': d['b']/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['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)

prompt:
The adapter reports an incorrect phase cycles 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 {'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['f'], 'time_phase_step': d['rate']*d['dt'], 'frequency_jacobian': d['b']/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['df']/d['f'], 'time_phase_step': d['rate']*d['dt'], 'frequency_jacobian': d['b']/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)

prompt:
The adapter reports an incorrect channel phase step 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 {'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'], 'frequency_jacobian': d['b']/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['f']*d['dt'], 'frequency_jacobian': d['b']/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)

prompt:
The adapter reports an incorrect time phase step 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