FA-56111 / Astronomical coordinate conventions / Open access
Radio fft channel labels: Shifted FFT channel coordinates put zero between central bins · case 01
The adapter reports an incorrect shifted frequency while other fields remain valid.
ROOT CAUSE
Shifted FFT channel coordinates put zero between central bins. Faulty expression: d['j']*d['B']/d['N']
VERIFIED REPAIR
Preserve the declared model convention at this site: (d['j']-d['N']//2)*d['B']/d['N']
Unsuccessful approach: A partial convention repair still uses (d['j']-(d['N']-1)/2)*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'], 'shifted_frequency': d['j']*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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| astronomical fixture 0 | {'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': 2.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': 8.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} | Failed |
| astronomical fixture 2 | {'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': 0.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.0, 'channel_width': 2.0, 'shifted_frequency': 14.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': -4.0, 'channel_width': 4.0, 'shifted_frequency': 12.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': 1.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 / bb80694859b03cad5a229fdf6aed4fdc6507942c3cd822c121cf73ab3e484e1d
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'] if d['k']<d['N']//2 else d['k']-d['N'])*d['B']/d['N'], 'shifted_frequency': (d['j']-(d['N']-1)/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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| astronomical fixture 0 | {'baseband_frequency': 4.0, 'channel_width': 2.0, 'shifted_frequency': -5.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': 1.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} | Failed |
| astronomical fixture 2 | {'baseband_frequency': -8.0, 'channel_width': 2.0, 'shifted_frequency': -7.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.0, 'channel_width': 2.0, 'shifted_frequency': 7.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': -4.0, 'channel_width': 4.0, 'shifted_frequency': 6.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': -2.5, '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 / 8fa1dc57a10d8d7539c028cefa83761342e688ade19a8830335e70cfb2c8c8ab
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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:04.029421+00:00.
Case digest / 5faca23129a9c59de1df12764f95471aea70b07f9f82dff1c83272c5d2333107