FA-56261 / Astronomical coordinate conventions / Open access
Wcs cube storage order: WCS reference pixel tuple uses a different axis convention from the stored cube · case 01
The adapter reports an incorrect storage reference while other fields remain valid.
ROOT CAUSE
WCS reference pixel tuple uses a different axis convention from the stored cube. Faulty expression: [d['rx']-1,d['ry']-1,d['rz']-1]
VERIFIED REPAIR
Preserve the declared model convention at this site: [d['rz']-1,d['ry']-1,d['rx']-1]
Unsuccessful approach: A partial convention repair still uses [d['rz'],d['ry'],d['rx']]
Case contract
A FITS-like cube uses pixel order x,y,spectral z but a Python array stores z,y,x. Shape is nz,ny,nx, one-based WCS reference pixels rx,ry,rz. Reference tuple and linear CD input columns must honor this permutation; CD output rows and CTYPE world labels retain world-axis order. No celestial projection is evaluated. Output fields are defined by: array_index = [d['z']-1,d['y']-1,d['x']-1]; fits_shape = [d['nx'],d['ny'],d['nz']]; storage_reference = [d['rz']-1,d['ry']-1,d['rx']-1]; storage_cd = [list(reversed(row)) for row in d['cd']]; world_axis_types = d['ctype']; world_delta = [d['x']-d['rx'],d['y']-d['ry'],d['z']-d['rz']]
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 {'array_index': [d['z']-1,d['y']-1,d['x']-1], 'fits_shape': [d['nx'],d['ny'],d['nz']], 'storage_reference': [d['rx']-1,d['ry']-1,d['rz']-1], 'storage_cd': [list(reversed(row)) for row in d['cd']], 'world_axis_types': d['ctype'], 'world_delta': [d['x']-d['rx'],d['y']-d['ry'],d['z']-d['rz']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 1, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 3, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]})], 2: [({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 2, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 1], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-8, -14, -3]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [3, 4, 1]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 4, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -15, -4]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 2, 2]})], 3: [({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 3, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -14, -3]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [4, 4, 1]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 5, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -15, -4]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [7, 2, 2]})], 4: [({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 4, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -14, -3]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 4, 1]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 6, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -15, -4]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [8, 2, 2]})], 5: [({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 5, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -14, -3]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 4, 1]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 7, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -15, -4]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [9, 2, 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 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [9, 14, 3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Failed |
| astronomical fixture 1 | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [9, 14, 3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | Failed |
| astronomical fixture 2 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 0, 0], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 0, 0], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | Passed |
| astronomical fixture 3 | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [9, 14, 3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Failed |
| astronomical fixture 4 | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [9, 14, 3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | Failed |
| astronomical fixture 5 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [-3, 2, -1], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [-1, 2, -3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | Failed |
SHA-256 / c9e3ac6e1c08d4a3ffe0db19f45f2fe04194cbf77cbc27b52ab82111dc7ab921
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'array_index': [d['z']-1,d['y']-1,d['x']-1], 'fits_shape': [d['nx'],d['ny'],d['nz']], 'storage_reference': [d['rz'],d['ry'],d['rx']], 'storage_cd': [list(reversed(row)) for row in d['cd']], 'world_axis_types': d['ctype'], 'world_delta': [d['x']-d['rx'],d['y']-d['ry'],d['z']-d['rz']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 1, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 3, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]})], 2: [({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 2, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 1], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-8, -14, -3]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [3, 4, 1]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 4, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -15, -4]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 2, 2]})], 3: [({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 3, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -14, -3]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [4, 4, 1]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 5, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -15, -4]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [7, 2, 2]})], 4: [({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 4, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -14, -3]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 4, 1]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 6, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -15, -4]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [8, 2, 2]})], 5: [({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 5, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -14, -3]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 4, 1]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 7, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -15, -4]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [9, 2, 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 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [4, 15, 10], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Failed |
| astronomical fixture 1 | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [4, 15, 10], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | Failed |
| astronomical fixture 2 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [1, 1, 1], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 0, 0], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | Failed |
| astronomical fixture 3 | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [4, 15, 10], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Failed |
| astronomical fixture 4 | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [4, 15, 10], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | Failed |
| astronomical fixture 5 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 3, -2], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [-1, 2, -3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | Failed |
SHA-256 / 64736f776a7168ebe723154b8b7324f24db5acf070730b18603c2c60904b4b07
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'array_index': [d['z']-1,d['y']-1,d['x']-1], 'fits_shape': [d['nx'],d['ny'],d['nz']], 'storage_reference': [d['rz']-1,d['ry']-1,d['rx']-1], 'storage_cd': [list(reversed(row)) for row in d['cd']], 'world_axis_types': d['ctype'], 'world_delta': [d['x']-d['rx'],d['y']-d['ry'],d['z']-d['rz']]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 1, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]}), ({'x': 3, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]}), ({'x': 3, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]})], 2: [({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 2, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 1], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-8, -14, -3]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [3, 4, 1]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -10, -2]}), ({'x': 4, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -15, -4]}), ({'x': 4, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 2, 2]})], 3: [({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 3, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 2], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -14, -3]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [4, 4, 1]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -10, -2]}), ({'x': 5, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -15, -4]}), ({'x': 5, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [7, 2, 2]})], 4: [({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 4, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 3], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-6, -14, -3]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 4, 1]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -10, -2]}), ({'x': 6, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-4, -15, -4]}), ({'x': 6, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 5], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [8, 2, 2]})], 5: [({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 5, 'y': 1, 'z': 1, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [0, 0, 4], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-5, -14, -3]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 1, 'ry': 1, 'rz': 1, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [0, 0, 0], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [6, 4, 1]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 10, 'ny': 12, 'nz': 6, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [10, 12, 6], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -10, -2]}), ({'x': 7, 'y': 0, 'z': 0, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': 10, 'ry': 15, 'rz': 4, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [-1, -1, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [3, 14, 9], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-3, -15, -4]}), ({'x': 7, 'y': 5, 'z': 2, 'nx': 20, 'ny': 30, 'nz': 8, 'rx': -2, 'ry': 3, 'rz': 0, 'cd': [[1, 2, 3], [4, 5, 6], [7, 8, 10]], 'ctype': ['RA---TAN', 'DEC--TAN', 'FREQ']}, {'array_index': [1, 4, 6], 'fits_shape': [20, 30, 8], 'storage_reference': [-1, 2, -3], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [9, 2, 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 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Passed |
| astronomical fixture 1 | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | {'array_index': [0, 0, 0], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-9, -14, -3]} | Passed |
| astronomical fixture 2 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 0, 0], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [0, 0, 0], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [2, 4, 1]} | Passed |
| astronomical fixture 3 | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | {'array_index': [1, 4, 2], 'fits_shape': [10, 12, 6], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -10, -2]} | Passed |
| astronomical fixture 4 | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | {'array_index': [-1, -1, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [3, 14, 9], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [-7, -15, -4]} | Passed |
| astronomical fixture 5 | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [-1, 2, -3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | {'array_index': [1, 4, 2], 'fits_shape': [20, 30, 8], 'storage_cd': [[3, 2, 1], [6, 5, 4], [10, 8, 7]], 'storage_reference': [-1, 2, -3], 'world_axis_types': ['RA---TAN', 'DEC--TAN', 'FREQ'], 'world_delta': [5, 2, 2]} | Passed |
SHA-256 / abeb48bafd586ff430cf89a99080bac4b68e641e4d1c08f4af31781153cae47a
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.486882+00:00.
Case digest / 31395cc4bd4531cf934c0dbb7115cb615f63d1f1d2cfb8d63dbdb8faa67216c0