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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']/d['f']**2, 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-pulsar-dispersion-coordinate

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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['r']**2-1/d['f']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect reference delay while other fields remain valid.

A stipulated cold-plasma timing adapter has constant K, dispersion measure D, positive radio frequency f, positive reference frequency r, channel width w and timestamp t. Delay relative to infinite frequency is K*D/f**2. Finite-reference dedispersion subtracts the difference of inverse squares. Output fields are defined by: infinite_delay = d['K']*d['D']/d['f']**2; reference_delay = d['K']*d['D']*(1/d['f']**2-1/d['r']**2); dedispersed_time = d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2); frequency_slope = -2*d['K']*d['D']/d['f']**3; channel_smearing = abs(2*d['K']*d['D']*d['w']/d['f']**3); infinite_time = d['t']-d['K']*d['D']/d['f']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']+d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

evaluation_group: astro-pulsar-dispersion-coordinate

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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']/d['f']**2, 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect dedispersed time while other fields remain valid.

A stipulated cold-plasma timing adapter has constant K, dispersion measure D, positive radio frequency f, positive reference frequency r, channel width w and timestamp t. Delay relative to infinite frequency is K*D/f**2. Finite-reference dedispersion subtracts the difference of inverse squares. Output fields are defined by: infinite_delay = d['K']*d['D']/d['f']**2; reference_delay = d['K']*d['D']*(1/d['f']**2-1/d['r']**2); dedispersed_time = d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2); frequency_slope = -2*d['K']*d['D']/d['f']**3; channel_smearing = abs(2*d['K']*d['D']*d['w']/d['f']**3); infinite_time = d['t']-d['K']*d['D']/d['f']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -d['K']*d['D']/d['f']**2, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-pulsar-dispersion-coordinate

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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': 2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect frequency slope while other fields remain valid.

A stipulated cold-plasma timing adapter has constant K, dispersion measure D, positive radio frequency f, positive reference frequency r, channel width w and timestamp t. Delay relative to infinite frequency is K*D/f**2. Finite-reference dedispersion subtracts the difference of inverse squares. Output fields are defined by: infinite_delay = d['K']*d['D']/d['f']**2; reference_delay = d['K']*d['D']*(1/d['f']**2-1/d['r']**2); dedispersed_time = d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2); frequency_slope = -2*d['K']*d['D']/d['f']**3; channel_smearing = abs(2*d['K']*d['D']*d['w']/d['f']**3); infinite_time = d['t']-d['K']*d['D']/d['f']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(d['K']*d['D']*d['w']/d['f']**2), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-pulsar-dispersion-coordinate

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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect channel smearing while other fields remain valid.

A stipulated cold-plasma timing adapter has constant K, dispersion measure D, positive radio frequency f, positive reference frequency r, channel width w and timestamp t. Delay relative to infinite frequency is K*D/f**2. Finite-reference dedispersion subtracts the difference of inverse squares. Output fields are defined by: infinite_delay = d['K']*d['D']/d['f']**2; reference_delay = d['K']*d['D']*(1/d['f']**2-1/d['r']**2); dedispersed_time = d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2); frequency_slope = -2*d['K']*d['D']/d['f']**3; channel_smearing = abs(2*d['K']*d['D']*d['w']/d['f']**3); infinite_time = d['t']-d['K']*d['D']/d['f']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-pulsar-dispersion-coordinate

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

N = 1
observations = []
def solve(d):
    return {'infinite_delay': d['K']*d['D']/d['f']**2, 'reference_delay': d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'dedispersed_time': d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2), 'frequency_slope': -2*d['K']*d['D']/d['f']**3, 'channel_smearing': abs(2*d['K']*d['D']*d['w']/d['f']**3), 'infinite_time': d['t']+d['K']*d['D']/d['f']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.375, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 0, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': 0.0, 'channel_smearing': 0.0, 'infinite_time': 100.0}), ({'t': 100, 'K': 4, 'D': 3, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.1875, 'reference_delay': -2.8125, 'dedispersed_time': 102.8125, 'frequency_slope': -0.046875, 'channel_smearing': 0.046875, 'infinite_time': 99.8125}), ({'t': 100, 'K': 1, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 0.75, 'reference_delay': 0.5625, 'dedispersed_time': 99.4375, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 99.25}), ({'t': 100, 'K': 4, 'D': 3, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 0.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.375, 'channel_smearing': 0.75, 'infinite_time': 99.25})], 2: [({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 0.5, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 1, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.25, 'reference_delay': -3.75, 'dedispersed_time': 103.75, 'frequency_slope': -0.0625, 'channel_smearing': 0.0625, 'infinite_time': 99.75}), ({'t': 100, 'K': 1, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.0, 'reference_delay': 0.75, 'dedispersed_time': 99.25, 'frequency_slope': -1.0, 'channel_smearing': 1.0, 'infinite_time': 99.0}), ({'t': 100, 'K': 4, 'D': 4, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.0, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.5, 'channel_smearing': 1.0, 'infinite_time': 99.0})], 3: [({'t': 100, 'K': 4, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 5.0, 'reference_delay': 3.75, 'dedispersed_time': 96.25, 'frequency_slope': -5.0, 'channel_smearing': 5.0, 'infinite_time': 95.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 0.625, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 2, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 2.0, 'reference_delay': 1.5, 'dedispersed_time': 98.5, 'frequency_slope': -2.0, 'channel_smearing': 2.0, 'infinite_time': 98.0}), ({'t': 100, 'K': 4, 'D': 5, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.3125, 'reference_delay': -4.6875, 'dedispersed_time': 104.6875, 'frequency_slope': -0.078125, 'channel_smearing': 0.078125, 'infinite_time': 99.6875}), ({'t': 100, 'K': 1, 'D': 5, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.25, 'reference_delay': 0.9375, 'dedispersed_time': 99.0625, 'frequency_slope': -1.25, 'channel_smearing': 1.25, 'infinite_time': 98.75}), ({'t': 100, 'K': 4, 'D': 5, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.25, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.625, 'channel_smearing': 1.25, 'infinite_time': 98.75})], 4: [({'t': 100, 'K': 4, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 6.0, 'reference_delay': 4.5, 'dedispersed_time': 95.5, 'frequency_slope': -6.0, 'channel_smearing': 6.0, 'infinite_time': 94.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 0.75, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 3, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 3.0, 'reference_delay': 2.25, 'dedispersed_time': 97.75, 'frequency_slope': -3.0, 'channel_smearing': 3.0, 'infinite_time': 97.0}), ({'t': 100, 'K': 4, 'D': 6, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.375, 'reference_delay': -5.625, 'dedispersed_time': 105.625, 'frequency_slope': -0.09375, 'channel_smearing': 0.09375, 'infinite_time': 99.625}), ({'t': 100, 'K': 1, 'D': 6, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.5, 'reference_delay': 1.125, 'dedispersed_time': 98.875, 'frequency_slope': -1.5, 'channel_smearing': 1.5, 'infinite_time': 98.5}), ({'t': 100, 'K': 4, 'D': 6, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.5, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.75, 'channel_smearing': 1.5, 'infinite_time': 98.5})], 5: [({'t': 100, 'K': 4, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 7.0, 'reference_delay': 5.25, 'dedispersed_time': 94.75, 'frequency_slope': -7.0, 'channel_smearing': 7.0, 'infinite_time': 93.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 0.875, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 4, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 4.0, 'reference_delay': 3.0, 'dedispersed_time': 97.0, 'frequency_slope': -4.0, 'channel_smearing': 4.0, 'infinite_time': 96.0}), ({'t': 100, 'K': 4, 'D': 7, 'f': 8, 'r': 2, 'w': 1}, {'infinite_delay': 0.4375, 'reference_delay': -6.5625, 'dedispersed_time': 106.5625, 'frequency_slope': -0.109375, 'channel_smearing': 0.109375, 'infinite_time': 99.5625}), ({'t': 100, 'K': 1, 'D': 7, 'f': 2, 'r': 4, 'w': 1}, {'infinite_delay': 1.75, 'reference_delay': 1.3125, 'dedispersed_time': 98.6875, 'frequency_slope': -1.75, 'channel_smearing': 1.75, 'infinite_time': 98.25}), ({'t': 100, 'K': 4, 'D': 7, 'f': 4, 'r': 4, 'w': 2}, {'infinite_delay': 1.75, 'reference_delay': 0.0, 'dedispersed_time': 100.0, 'frequency_slope': -0.875, 'channel_smearing': 1.75, 'infinite_time': 98.25})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect infinite time while other fields remain valid.

A stipulated cold-plasma timing adapter has constant K, dispersion measure D, positive radio frequency f, positive reference frequency r, channel width w and timestamp t. Delay relative to infinite frequency is K*D/f**2. Finite-reference dedispersion subtracts the difference of inverse squares. Output fields are defined by: infinite_delay = d['K']*d['D']/d['f']**2; reference_delay = d['K']*d['D']*(1/d['f']**2-1/d['r']**2); dedispersed_time = d['t']-d['K']*d['D']*(1/d['f']**2-1/d['r']**2); frequency_slope = -2*d['K']*d['D']/d['f']**3; channel_smearing = abs(2*d['K']*d['D']*d['w']/d['f']**3); infinite_time = d['t']-d['K']*d['D']/d['f']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'sky_frequency': d['L']+d['I'], 'sky_increment': d['s']*d['d'], 'image_frequency': d['L']-d['s']*d['I'], 'second_conversion': d['L']+d['s']*(d['I']+d['m']), 'rest_offset': d['L']+d['s']*d['I']-d['R'], 'inverse_if': d['s']*(d['R']-d['L'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'L': 100, 'I': 10, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 90, 'sky_increment': -2, 'image_frequency': 110, 'second_conversion': 87, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 110, 'sky_increment': 2, 'image_frequency': 90, 'second_conversion': 113, 'rest_offset': -10, 'inverse_if': 20}), ({'L': 100, 'I': 0, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 100, 'sky_increment': -2, 'image_frequency': 100, 'second_conversion': 97, 'rest_offset': -20, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 90, 'sky_increment': 2, 'image_frequency': 110, 'second_conversion': 87, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 90, 'sky_increment': -2, 'image_frequency': 110, 'second_conversion': 90, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 200, 'I': 10, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 190, 'sky_increment': -2, 'image_frequency': 210, 'second_conversion': 187, 'rest_offset': -60, 'inverse_if': -50})], 2: [({'L': 100, 'I': 11, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 89, 'sky_increment': -2, 'image_frequency': 111, 'second_conversion': 86, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 111, 'sky_increment': 2, 'image_frequency': 89, 'second_conversion': 114, 'rest_offset': -9, 'inverse_if': 20}), ({'L': 100, 'I': 1, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 99, 'sky_increment': -2, 'image_frequency': 101, 'second_conversion': 96, 'rest_offset': -21, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 89, 'sky_increment': 2, 'image_frequency': 111, 'second_conversion': 86, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 89, 'sky_increment': -2, 'image_frequency': 111, 'second_conversion': 89, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 200, 'I': 11, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 189, 'sky_increment': -2, 'image_frequency': 211, 'second_conversion': 186, 'rest_offset': -61, 'inverse_if': -50})], 3: [({'L': 100, 'I': 12, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 88, 'sky_increment': -2, 'image_frequency': 112, 'second_conversion': 85, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 112, 'sky_increment': 2, 'image_frequency': 88, 'second_conversion': 115, 'rest_offset': -8, 'inverse_if': 20}), ({'L': 100, 'I': 2, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 98, 'sky_increment': -2, 'image_frequency': 102, 'second_conversion': 95, 'rest_offset': -22, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 88, 'sky_increment': 2, 'image_frequency': 112, 'second_conversion': 85, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 88, 'sky_increment': -2, 'image_frequency': 112, 'second_conversion': 88, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 200, 'I': 12, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 188, 'sky_increment': -2, 'image_frequency': 212, 'second_conversion': 185, 'rest_offset': -62, 'inverse_if': -50})], 4: [({'L': 100, 'I': 13, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 87, 'sky_increment': -2, 'image_frequency': 113, 'second_conversion': 84, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 113, 'sky_increment': 2, 'image_frequency': 87, 'second_conversion': 116, 'rest_offset': -7, 'inverse_if': 20}), ({'L': 100, 'I': 3, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 97, 'sky_increment': -2, 'image_frequency': 103, 'second_conversion': 94, 'rest_offset': -23, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 87, 'sky_increment': 2, 'image_frequency': 113, 'second_conversion': 84, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 87, 'sky_increment': -2, 'image_frequency': 113, 'second_conversion': 87, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 200, 'I': 13, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 187, 'sky_increment': -2, 'image_frequency': 213, 'second_conversion': 184, 'rest_offset': -63, 'inverse_if': -50})], 5: [({'L': 100, 'I': 14, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 86, 'sky_increment': -2, 'image_frequency': 114, 'second_conversion': 83, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 114, 'sky_increment': 2, 'image_frequency': 86, 'second_conversion': 117, 'rest_offset': -6, 'inverse_if': 20}), ({'L': 100, 'I': 4, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 96, 'sky_increment': -2, 'image_frequency': 104, 'second_conversion': 93, 'rest_offset': -24, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 86, 'sky_increment': 2, 'image_frequency': 114, 'second_conversion': 83, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 86, 'sky_increment': -2, 'image_frequency': 114, 'second_conversion': 86, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 200, 'I': 14, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 186, 'sky_increment': -2, 'image_frequency': 214, 'second_conversion': 183, 'rest_offset': -64, 'inverse_if': -50})]}
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-heterodyne-sideband-coordinate

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

N = 1
observations = []
def solve(d):
    return {'sky_frequency': d['L']-d['I'], 'sky_increment': d['s']*d['d'], 'image_frequency': d['L']-d['s']*d['I'], 'second_conversion': d['L']+d['s']*(d['I']+d['m']), 'rest_offset': d['L']+d['s']*d['I']-d['R'], 'inverse_if': d['s']*(d['R']-d['L'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'L': 100, 'I': 10, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 90, 'sky_increment': -2, 'image_frequency': 110, 'second_conversion': 87, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 110, 'sky_increment': 2, 'image_frequency': 90, 'second_conversion': 113, 'rest_offset': -10, 'inverse_if': 20}), ({'L': 100, 'I': 0, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 100, 'sky_increment': -2, 'image_frequency': 100, 'second_conversion': 97, 'rest_offset': -20, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 90, 'sky_increment': 2, 'image_frequency': 110, 'second_conversion': 87, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 100, 'I': 10, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 90, 'sky_increment': -2, 'image_frequency': 110, 'second_conversion': 90, 'rest_offset': -30, 'inverse_if': -20}), ({'L': 200, 'I': 10, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 190, 'sky_increment': -2, 'image_frequency': 210, 'second_conversion': 187, 'rest_offset': -60, 'inverse_if': -50})], 2: [({'L': 100, 'I': 11, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 89, 'sky_increment': -2, 'image_frequency': 111, 'second_conversion': 86, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 111, 'sky_increment': 2, 'image_frequency': 89, 'second_conversion': 114, 'rest_offset': -9, 'inverse_if': 20}), ({'L': 100, 'I': 1, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 99, 'sky_increment': -2, 'image_frequency': 101, 'second_conversion': 96, 'rest_offset': -21, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 89, 'sky_increment': 2, 'image_frequency': 111, 'second_conversion': 86, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 100, 'I': 11, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 89, 'sky_increment': -2, 'image_frequency': 111, 'second_conversion': 89, 'rest_offset': -31, 'inverse_if': -20}), ({'L': 200, 'I': 11, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 189, 'sky_increment': -2, 'image_frequency': 211, 'second_conversion': 186, 'rest_offset': -61, 'inverse_if': -50})], 3: [({'L': 100, 'I': 12, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 88, 'sky_increment': -2, 'image_frequency': 112, 'second_conversion': 85, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 112, 'sky_increment': 2, 'image_frequency': 88, 'second_conversion': 115, 'rest_offset': -8, 'inverse_if': 20}), ({'L': 100, 'I': 2, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 98, 'sky_increment': -2, 'image_frequency': 102, 'second_conversion': 95, 'rest_offset': -22, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 88, 'sky_increment': 2, 'image_frequency': 112, 'second_conversion': 85, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 100, 'I': 12, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 88, 'sky_increment': -2, 'image_frequency': 112, 'second_conversion': 88, 'rest_offset': -32, 'inverse_if': -20}), ({'L': 200, 'I': 12, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 188, 'sky_increment': -2, 'image_frequency': 212, 'second_conversion': 185, 'rest_offset': -62, 'inverse_if': -50})], 4: [({'L': 100, 'I': 13, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 87, 'sky_increment': -2, 'image_frequency': 113, 'second_conversion': 84, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 113, 'sky_increment': 2, 'image_frequency': 87, 'second_conversion': 116, 'rest_offset': -7, 'inverse_if': 20}), ({'L': 100, 'I': 3, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 97, 'sky_increment': -2, 'image_frequency': 103, 'second_conversion': 94, 'rest_offset': -23, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 87, 'sky_increment': 2, 'image_frequency': 113, 'second_conversion': 84, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 100, 'I': 13, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 87, 'sky_increment': -2, 'image_frequency': 113, 'second_conversion': 87, 'rest_offset': -33, 'inverse_if': -20}), ({'L': 200, 'I': 13, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 187, 'sky_increment': -2, 'image_frequency': 213, 'second_conversion': 184, 'rest_offset': -63, 'inverse_if': -50})], 5: [({'L': 100, 'I': 14, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 86, 'sky_increment': -2, 'image_frequency': 114, 'second_conversion': 83, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': 2, 's': 1, 'm': 3, 'R': 120}, {'sky_frequency': 114, 'sky_increment': 2, 'image_frequency': 86, 'second_conversion': 117, 'rest_offset': -6, 'inverse_if': 20}), ({'L': 100, 'I': 4, 'd': 2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 96, 'sky_increment': -2, 'image_frequency': 104, 'second_conversion': 93, 'rest_offset': -24, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': -2, 's': -1, 'm': 3, 'R': 120}, {'sky_frequency': 86, 'sky_increment': 2, 'image_frequency': 114, 'second_conversion': 83, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 100, 'I': 14, 'd': 2, 's': -1, 'm': 0, 'R': 120}, {'sky_frequency': 86, 'sky_increment': -2, 'image_frequency': 114, 'second_conversion': 86, 'rest_offset': -34, 'inverse_if': -20}), ({'L': 200, 'I': 14, 'd': 2, 's': -1, 'm': 3, 'R': 250}, {'sky_frequency': 186, 'sky_increment': -2, 'image_frequency': 214, 'second_conversion': 183, 'rest_offset': -64, 'inverse_if': -50})]}
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 sky frequency while other fields remain valid.

A radio receiver provides positive local oscillator L, intermediate frequency I, signed IF channel step d, sideband s equal +1 or -1, second mixer offset m, and source rest frequency R. Sky frequency is L+s*I; image sideband is L-s*I. This is exact mixer bookkeeping only. Output fields are defined by: sky_frequency = d['L']+d['s']*d['I']; sky_increment = d['s']*d['d']; image_frequency = d['L']-d['s']*d['I']; second_conversion = d['L']+d['s']*(d['I']+d['m']); rest_offset = d['L']+d['s']*d['I']-d['R']; inverse_if = d['s']*(d['R']-d['L'])

split: open-access