FA-56321 / Astronomical coordinate conventions / Open access
Wcs header card semantics: CRPIX header defaulting conflates an explicit zero with an absent card · case 01
The adapter reports an incorrect reference pixel while other fields remain valid.
ROOT CAUSE
CRPIX header defaulting conflates an explicit zero with an absent card. Faulty expression: d['crpix'] or 1
VERIFIED REPAIR
Preserve the declared model convention at this site: 1 if d['crpix'] is None else d['crpix']
Unsuccessful approach: A partial convention repair still uses 0 if d['crpix'] is None else d['crpix']
Case contract
A bounded FITS-like header adapter parses the projection code at CTYPE characters 5:8, supports exact case-sensitive frequency units Hz,kHz,MHz,mHz, defaults absent CRPIX to one but preserves explicit zero, resolves WCSNAME to its suffix, and binds PV parameters to world-axis number. Effective dimensionality is max(NAXIS,WCSAXES). Output fields are defined by: projection = d['ctype'][5:8]; frequency_hz = d['frequency']*{'Hz':1,'kHz':1000,'MHz':1000000,'mHz':0.001}[d['unit']]; reference_pixel = 1 if d['crpix'] is None else d['crpix']; dimension = max(d['naxis'],d['wcsaxes']); selected_suffix = next(k for k,v in d['names'].items() if v==d['name']); projection_parameter = d['pv'][d['world']]
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 {'projection': d['ctype'][5:8], 'frequency_hz': d['frequency']*{'Hz':1,'kHz':1000,'MHz':1000000,'mHz':0.001}[d['unit']], 'reference_pixel': d['crpix'] or 1, 'dimension': max(d['naxis'],d['wcsaxes']), 'selected_suffix': next(k for k,v in d['names'].items() if v==d['name']), 'projection_parameter': d['pv'][d['world']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 8, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 8, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 8, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 8000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 8000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 8, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 8, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 8, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 2: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 9, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 9, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 9, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 9000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 9000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 9, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 9, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 9, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 3: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 10, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 10, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 10, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 10000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 10000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 10, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 10, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 10, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 4: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 11, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 11, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 11, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 11000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 11000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 11, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 11, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 11, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 5: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 12, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 12, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 12, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 12000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 12000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 12, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 12, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 12, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})]}
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 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Failed |
| astronomical fixture 1 | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 2 | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Failed |
| astronomical fixture 3 | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 0, 'selected_suffix': 'A'} | Failed |
| astronomical fixture 4 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | Passed |
| astronomical fixture 5 | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 0, 'selected_suffix': 'A'} | Failed |
SHA-256 / b7e2657bba09553556aa68e885732193c0c0ad94e15925562efdfb958a1e0007
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'projection': d['ctype'][5:8], 'frequency_hz': d['frequency']*{'Hz':1,'kHz':1000,'MHz':1000000,'mHz':0.001}[d['unit']], 'reference_pixel': 0 if d['crpix'] is None else d['crpix'], 'dimension': max(d['naxis'],d['wcsaxes']), 'selected_suffix': next(k for k,v in d['names'].items() if v==d['name']), 'projection_parameter': d['pv'][d['world']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 8, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 8, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 8, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 8000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 8000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 8, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 8, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 8, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 2: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 9, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 9, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 9, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 9000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 9000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 9, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 9, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 9, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 3: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 10, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 10, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 10, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 10000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 10000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 10, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 10, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 10, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 4: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 11, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 11, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 11, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 11000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 11000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 11, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 11, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 11, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 5: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 12, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 12, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 12, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 12000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 12000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 12, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 12, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 12, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})]}
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 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 1 | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | Failed |
| astronomical fixture 2 | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 3 | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 4 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | Passed |
| astronomical fixture 5 | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
SHA-256 / c3715961b5afe0dcf61b469a76614eea3ffcc86a51811c33f465b1732e77653d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'projection': d['ctype'][5:8], 'frequency_hz': d['frequency']*{'Hz':1,'kHz':1000,'MHz':1000000,'mHz':0.001}[d['unit']], 'reference_pixel': 1 if d['crpix'] is None else d['crpix'], 'dimension': max(d['naxis'],d['wcsaxes']), 'selected_suffix': next(k for k,v in d['names'].items() if v==d['name']), 'projection_parameter': d['pv'][d['world']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 8, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 8, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 8, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 8000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 8, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 8000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 8, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.008, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 8, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 8, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 2: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 9, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 9, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 9, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 9000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 9, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 9000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 9, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.009000000000000001, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 9, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 9, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 3: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 10, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 10, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 10, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 10000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 10, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 10000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 10, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.01, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 10, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 10, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 4: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 11, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 11, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 11, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 11000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 11, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 11000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 11, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.011, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 11, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 11, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})], 5: [({'ctype': 'RA---TAN-SIP', 'unit': 'mHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'DEC--SIN', 'unit': 'Hz', 'frequency': 12, 'crpix': None, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'SIN', 'frequency_hz': 12, 'reference_pixel': 1, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'GLON-CAR', 'unit': 'kHz', 'frequency': 12, 'crpix': 0, 'naxis': 4, 'wcsaxes': 2, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'CAR', 'frequency_hz': 12000, 'reference_pixel': 0, 'dimension': 4, 'selected_suffix': 'A', 'projection_parameter': 7}), ({'ctype': 'FREQ-LOG', 'unit': 'MHz', 'frequency': 12, 'crpix': 0, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'A'}, 'name': 'A', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 1, 'pixel': 2}, {'projection': 'LOG', 'frequency_hz': 12000000, 'reference_pixel': 0, 'dimension': 3, 'selected_suffix': 'A', 'projection_parameter': 5}), ({'ctype': 'RA---TAN', 'unit': 'mHz', 'frequency': 12, 'crpix': 3, 'naxis': 2, 'wcsaxes': 3, 'names': {'': 'primary', 'A': 'other'}, 'name': 'primary', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 2, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 0.012, 'reference_pixel': 3, 'dimension': 3, 'selected_suffix': '', 'projection_parameter': 7}), ({'ctype': 'DEC--TAN-SIP', 'unit': 'Hz', 'frequency': 12, 'crpix': 0, 'naxis': 1, 'wcsaxes': 1, 'names': {'': 'primary', 'A': 'target'}, 'name': 'target', 'pv': {0: 2, 1: 5, 2: 7}, 'world': 0, 'pixel': 1}, {'projection': 'TAN', 'frequency_hz': 12, 'reference_pixel': 0, 'dimension': 1, 'selected_suffix': 'A', 'projection_parameter': 2})]}
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 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 1 | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8, 'projection': 'SIN', 'projection_parameter': 7, 'reference_pixel': 1, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 2 | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 4, 'frequency_hz': 8000, 'projection': 'CAR', 'projection_parameter': 7, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 3 | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 3, 'frequency_hz': 8000000, 'projection': 'LOG', 'projection_parameter': 5, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
| astronomical fixture 4 | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | {'dimension': 3, 'frequency_hz': 0.008, 'projection': 'TAN', 'projection_parameter': 7, 'reference_pixel': 3, 'selected_suffix': ''} | Passed |
| astronomical fixture 5 | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 0, 'selected_suffix': 'A'} | {'dimension': 1, 'frequency_hz': 8, 'projection': 'TAN', 'projection_parameter': 2, 'reference_pixel': 0, 'selected_suffix': 'A'} | Passed |
SHA-256 / c55ab582e40f352505c15de4756ee263343959efca1f71ff01de0721c43a7782
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:05.977528+00:00.
Case digest / 459026e5f5d1237031bcc96c15f66437192f6267dcfd335b8a301cd812efe367