FAILURE MAP
← Case archive

FA-56106 / Astronomical coordinate conventions / Open access

Radio fft channel labels: FFT channel spacing uses endpoint-inclusive rather than periodic bins · case 01

The adapter reports an incorrect baseband frequency while other fields remain valid.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

FFT channel spacing uses endpoint-inclusive rather than periodic bins. Faulty expression: (d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/(d['N']-1)

VERIFIED REPAIR

Preserve the declared model convention at this site: (d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N']

Unsuccessful approach: A partial convention repair still uses d['k']*d['B']/d['N']

Case contract

An even-length complex radio spectrum has N channels and bandwidth B. Unshifted bin k has signed index k below N/2 and k-N otherwise, including negative Nyquist. After fftshift index j denotes j-N/2. Local oscillator L translates baseband to sky frequency. Output fields are defined by: signed_bin = d['k'] if d['k']<d['N']//2 else d['k']-d['N']; baseband_frequency = (d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N']; shifted_frequency = (d['j']-d['N']//2)*d['B']/d['N']; sky_frequency = d['L']+(d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N']; shifted_index = (d['k']+d['N']//2)%d['N']; channel_width = d['B']/d['N']

Why this case matters

Catalog, detector, sky-coordinate, and spectroscopy adapters must preserve the association between numeric coordinates and their declared reference conventions.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'signed_bin': d['k'] if d['k']<d['N']//2 else d['k']-d['N'], 'baseband_frequency': (d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/(d['N']-1), 'shifted_frequency': (d['j']-d['N']//2)*d['B']/d['N'], 'sky_frequency': d['L']+(d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N'], 'shifted_index': (d['k']+d['N']//2)%d['N'], 'channel_width': d['B']/d['N']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 104.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 100, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 100.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 100, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 92.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 98.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 96.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 101.0, 'shifted_index': 5, 'channel_width': 1.0})], 2: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 105.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 101, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 101.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 101, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 93.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 99.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 97.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 102.0, 'shifted_index': 5, 'channel_width': 1.0})], 3: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 106.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 102, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 102.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 102, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 94.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 100.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 98.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 103.0, 'shifted_index': 5, 'channel_width': 1.0})], 4: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 107.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 103, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 103.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 103, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 95.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 101.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 99.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 104.0, 'shifted_index': 5, 'channel_width': 1.0})], 5: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 108.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 104, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 104.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 104, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 96.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 102.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 100.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 105.0, 'shifted_index': 5, 'channel_width': 1.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)
Boundary fixtureActualExpectedOutcome
astronomical fixture 0{'baseband_frequency': 4.571428571428571, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}{'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}Failed
astronomical fixture 1{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}Passed
astronomical fixture 2{'baseband_frequency': -9.142857142857142, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}{'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}Failed
astronomical fixture 3{'baseband_frequency': -2.2857142857142856, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}{'baseband_frequency': -2.0, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}Failed
astronomical fixture 4{'baseband_frequency': -5.333333333333333, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}{'baseband_frequency': -4.0, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}Failed
astronomical fixture 5{'baseband_frequency': 1.1428571428571428, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}{'baseband_frequency': 1.0, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}Failed

SHA-256 / 9ec42d6b69b86711df081194a7e7c44e6d98c80f1b6b595d0c44b69933474f38

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'signed_bin': d['k'] if d['k']<d['N']//2 else d['k']-d['N'], 'baseband_frequency': d['k']*d['B']/d['N'], 'shifted_frequency': (d['j']-d['N']//2)*d['B']/d['N'], 'sky_frequency': d['L']+(d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N'], 'shifted_index': (d['k']+d['N']//2)%d['N'], 'channel_width': d['B']/d['N']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 104.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 100, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 100.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 100, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 92.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 98.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 96.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 101.0, 'shifted_index': 5, 'channel_width': 1.0})], 2: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 105.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 101, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 101.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 101, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 93.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 99.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 97.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 102.0, 'shifted_index': 5, 'channel_width': 1.0})], 3: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 106.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 102, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 102.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 102, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 94.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 100.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 98.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 103.0, 'shifted_index': 5, 'channel_width': 1.0})], 4: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 107.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 103, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 103.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 103, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 95.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 101.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 99.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 104.0, 'shifted_index': 5, 'channel_width': 1.0})], 5: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 108.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 104, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 104.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 104, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 96.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 102.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 100.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 105.0, 'shifted_index': 5, 'channel_width': 1.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)
Boundary fixtureActualExpectedOutcome
astronomical fixture 0{'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}{'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}Passed
astronomical fixture 1{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}Passed
astronomical fixture 2{'baseband_frequency': 8.0, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}{'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}Failed
astronomical fixture 3{'baseband_frequency': 14.0, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}{'baseband_frequency': -2.0, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}Failed
astronomical fixture 4{'baseband_frequency': 12.0, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}{'baseband_frequency': -4.0, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}Failed
astronomical fixture 5{'baseband_frequency': 1.0, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}{'baseband_frequency': 1.0, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}Passed

SHA-256 / cb9ea6cff0e43468ae18021ec1c46d60f3eabf6472ddb21a5cdbf962761e3c7b

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'signed_bin': d['k'] if d['k']<d['N']//2 else d['k']-d['N'], 'baseband_frequency': (d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N'], 'shifted_frequency': (d['j']-d['N']//2)*d['B']/d['N'], 'sky_frequency': d['L']+(d['k'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N'], 'shifted_index': (d['k']+d['N']//2)%d['N'], 'channel_width': d['B']/d['N']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 104.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 100, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 100.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 100, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 92.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 98.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 100, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 96.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 100, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 101.0, 'shifted_index': 5, 'channel_width': 1.0})], 2: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 105.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 101, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 101.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 101, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 93.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 99.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 101, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 97.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 101, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 102.0, 'shifted_index': 5, 'channel_width': 1.0})], 3: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 106.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 102, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 102.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 102, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 94.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 100.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 102, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 98.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 102, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 103.0, 'shifted_index': 5, 'channel_width': 1.0})], 4: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 107.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 103, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 103.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 103, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 95.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 101.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 103, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 99.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 103, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 104.0, 'shifted_index': 5, 'channel_width': 1.0})], 5: [({'N': 8, 'B': 16, 'k': 2, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 2, 'baseband_frequency': 4.0, 'shifted_frequency': -6.0, 'sky_frequency': 108.0, 'shifted_index': 6, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 0, 'j': 4, 'L': 104, 'offset': 0}, {'signed_bin': 0, 'baseband_frequency': 0.0, 'shifted_frequency': 0.0, 'sky_frequency': 104.0, 'shifted_index': 4, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 4, 'j': 0, 'L': 104, 'offset': 0}, {'signed_bin': -4, 'baseband_frequency': -8.0, 'shifted_frequency': -8.0, 'sky_frequency': 96.0, 'shifted_index': 0, 'channel_width': 2.0}), ({'N': 8, 'B': 16, 'k': 7, 'j': 7, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -2.0, 'shifted_frequency': 6.0, 'sky_frequency': 102.0, 'shifted_index': 3, 'channel_width': 2.0}), ({'N': 4, 'B': 16, 'k': 3, 'j': 3, 'L': 104, 'offset': 0}, {'signed_bin': -1, 'baseband_frequency': -4.0, 'shifted_frequency': 4.0, 'sky_frequency': 100.0, 'shifted_index': 1, 'channel_width': 4.0}), ({'N': 8, 'B': 8, 'k': 1, 'j': 1, 'L': 104, 'offset': 0}, {'signed_bin': 1, 'baseband_frequency': 1.0, 'shifted_frequency': -3.0, 'sky_frequency': 105.0, 'shifted_index': 5, 'channel_width': 1.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)
Boundary fixtureActualExpectedOutcome
astronomical fixture 0{'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}{'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -6.0, 'shifted_index': 6, 'signed_bin': 2, 'sky_frequency': 104.0}Passed
astronomical fixture 1{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}{'baseband_frequency': 0.0, 'channel_width': 2.0, 'shifted_frequency': 0.0, 'shifted_index': 4, 'signed_bin': 0, 'sky_frequency': 100.0}Passed
astronomical fixture 2{'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}{'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': -8.0, 'shifted_index': 0, 'signed_bin': -4, 'sky_frequency': 92.0}Passed
astronomical fixture 3{'baseband_frequency': -2.0, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}{'baseband_frequency': -2.0, 'channel_width': 2.0, 'shifted_frequency': 6.0, 'shifted_index': 3, 'signed_bin': -1, 'sky_frequency': 98.0}Passed
astronomical fixture 4{'baseband_frequency': -4.0, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}{'baseband_frequency': -4.0, 'channel_width': 4.0, 'shifted_frequency': 4.0, 'shifted_index': 1, 'signed_bin': -1, 'sky_frequency': 96.0}Passed
astronomical fixture 5{'baseband_frequency': 1.0, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}{'baseband_frequency': 1.0, 'channel_width': 1.0, 'shifted_frequency': -3.0, 'shifted_index': 5, 'signed_bin': 1, 'sky_frequency': 101.0}Passed

SHA-256 / c58d6308919ac487231504e7f1e05bee305b69cffd1fbc7dc4ff40864cb57bac

Verification & scope

Explicitly stipulated finite algebraic adapter; no standards conformance, physical accuracy, or production-library claim. Inputs are the documented finite valid model domain. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:46:03.989202+00:00.

Case digest / 0f493dd498268cc5e9b4a1603647a77621f9e28d6bec141f2185394f7cb5c53b