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

N = 1
observations = []
def solve(d):
    return {'a_science_column': d['x']-d['serial'], 'b_detector_column': d['a']+d['gap']+d['b']+1-d['x'], 'science_row': d['y']-d['parallel'], 'b_first_pixel': d['a']+d['gap']+1, 'mosaic_extent': d['a']+d['b'], 'science_rows': d['rows']-d['parallel']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 23, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 1, 'y': 1, 'rows': 20}, {'a_science_column': -1, 'b_detector_column': 25, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 9}, {'a_science_column': 1, 'b_detector_column': 11, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 8, 'y': 20, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 18, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 2: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 22, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 2, 'y': 1, 'rows': 20}, {'a_science_column': 0, 'b_detector_column': 24, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 9}, {'a_science_column': 2, 'b_detector_column': 10, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 9, 'y': 20, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 17, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 3: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 21, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 18, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 1, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 9}, {'a_science_column': 3, 'b_detector_column': 9, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 10, 'y': 20, 'rows': 20}, {'a_science_column': 8, 'b_detector_column': 16, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 4: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 20, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 17, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 1, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 9}, {'a_science_column': 4, 'b_detector_column': 8, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 11, 'y': 20, 'rows': 20}, {'a_science_column': 9, 'b_detector_column': 15, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 5: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 19, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 16, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 1, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 9}, {'a_science_column': 5, 'b_detector_column': 7, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 12, 'y': 20, 'rows': 20}, {'a_science_column': 10, 'b_detector_column': 14, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-detector-mosaic-sections

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

N = 1
observations = []
def solve(d):
    return {'a_science_column': d['x']-d['serial'], 'b_detector_column': d['a']+d['gap']+d['b']+1-d['x'], 'science_row': d['y']-d['parallel'], 'b_first_pixel': d['a']+d['gap']+1, 'mosaic_extent': d['a']+2*d['gap']+d['b'], 'science_rows': d['rows']-d['parallel']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 23, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 1, 'y': 1, 'rows': 20}, {'a_science_column': -1, 'b_detector_column': 25, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 9}, {'a_science_column': 1, 'b_detector_column': 11, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 8, 'y': 20, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 18, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 2: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 22, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 2, 'y': 1, 'rows': 20}, {'a_science_column': 0, 'b_detector_column': 24, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 9}, {'a_science_column': 2, 'b_detector_column': 10, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 9, 'y': 20, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 17, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 3: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 21, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 18, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 1, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 9}, {'a_science_column': 3, 'b_detector_column': 9, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 10, 'y': 20, 'rows': 20}, {'a_science_column': 8, 'b_detector_column': 16, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 4: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 20, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 17, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 1, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 9}, {'a_science_column': 4, 'b_detector_column': 8, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 11, 'y': 20, 'rows': 20}, {'a_science_column': 9, 'b_detector_column': 15, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 5: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 19, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 16, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 1, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 9}, {'a_science_column': 5, 'b_detector_column': 7, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 12, 'y': 20, 'rows': 20}, {'a_science_column': 10, 'b_detector_column': 14, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect mosaic extent while other fields remain valid.

Two readout amplifiers cover a focal plane with overscan removed. Amplifier B is physically reversed. Detector labels are one-based; chip gap has no samples. Serial overscan is measured in columns and parallel overscan in rows. Output fields are defined by: a_science_column = d['x']-d['serial']; b_detector_column = d['a']+d['gap']+d['b']+1-d['x']; science_row = d['y']-d['parallel']; b_first_pixel = d['a']+d['gap']+1; mosaic_extent = d['a']+d['gap']+d['b']; science_rows = d['rows']-d['parallel']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'a_science_column': d['x']-d['serial'], 'b_detector_column': d['a']+d['gap']+d['b']+1-d['x'], 'science_row': d['y']-d['parallel'], 'b_first_pixel': d['a']+d['gap']+1, 'mosaic_extent': d['a']+d['gap']+d['b'], 'science_rows': d['rows']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 23, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 1, 'y': 1, 'rows': 20}, {'a_science_column': -1, 'b_detector_column': 25, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 9}, {'a_science_column': 1, 'b_detector_column': 11, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 8, 'y': 20, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 18, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 2: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 22, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 2, 'y': 1, 'rows': 20}, {'a_science_column': 0, 'b_detector_column': 24, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 9}, {'a_science_column': 2, 'b_detector_column': 10, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 9, 'y': 20, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 17, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 3: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 21, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 18, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 1, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 9}, {'a_science_column': 3, 'b_detector_column': 9, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 10, 'y': 20, 'rows': 20}, {'a_science_column': 8, 'b_detector_column': 16, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 4: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 20, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 17, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 1, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 9}, {'a_science_column': 4, 'b_detector_column': 8, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 11, 'y': 20, 'rows': 20}, {'a_science_column': 9, 'b_detector_column': 15, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 5: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 19, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 16, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 1, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 9}, {'a_science_column': 5, 'b_detector_column': 7, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 12, 'y': 20, 'rows': 20}, {'a_science_column': 10, 'b_detector_column': 14, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

evaluation_group: astro-detector-mosaic-sections

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

N = 1
observations = []
def solve(d):
    return {'a_science_column': d['x']-d['serial'], 'b_detector_column': d['a']+d['gap']+d['b']+1-d['x'], 'science_row': d['y']-d['parallel'], 'b_first_pixel': d['a']+d['gap']+1, 'mosaic_extent': d['a']+d['gap']+d['b'], 'science_rows': d['rows']-2*d['parallel']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 23, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 1, 'y': 1, 'rows': 20}, {'a_science_column': -1, 'b_detector_column': 25, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 7, 'rows': 9}, {'a_science_column': 1, 'b_detector_column': 11, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 8, 'y': 20, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 18, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 2: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 22, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 2, 'y': 1, 'rows': 20}, {'a_science_column': 0, 'b_detector_column': 24, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 7, 'rows': 9}, {'a_science_column': 2, 'b_detector_column': 10, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 9, 'y': 20, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 17, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 3: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 21, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 18, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 3, 'y': 1, 'rows': 20}, {'a_science_column': 1, 'b_detector_column': 23, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 7, 'rows': 9}, {'a_science_column': 3, 'b_detector_column': 9, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 10, 'y': 20, 'rows': 20}, {'a_science_column': 8, 'b_detector_column': 16, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 4: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 20, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 6, 'b_detector_column': 20, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 20}, {'a_science_column': 4, 'b_detector_column': 17, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 4, 'y': 1, 'rows': 20}, {'a_science_column': 2, 'b_detector_column': 22, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 6, 'y': 7, 'rows': 9}, {'a_science_column': 4, 'b_detector_column': 8, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 11, 'y': 20, 'rows': 20}, {'a_science_column': 9, 'b_detector_column': 15, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})], 5: [({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 19, 'science_row': 3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 0, 'parallel': 0, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 7, 'b_detector_column': 19, 'science_row': 7, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 20}), ({'a': 12, 'b': 10, 'gap': 0, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 20}, {'a_science_column': 5, 'b_detector_column': 16, 'science_row': 3, 'b_first_pixel': 13, 'mosaic_extent': 22, 'science_rows': 16}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 5, 'y': 1, 'rows': 20}, {'a_science_column': 3, 'b_detector_column': 21, 'science_row': -3, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16}), ({'a': 4, 'b': 6, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 7, 'y': 7, 'rows': 9}, {'a_science_column': 5, 'b_detector_column': 7, 'science_row': 3, 'b_first_pixel': 8, 'mosaic_extent': 13, 'science_rows': 5}), ({'a': 12, 'b': 10, 'gap': 3, 'serial': 2, 'parallel': 4, 'x': 12, 'y': 20, 'rows': 20}, {'a_science_column': 10, 'b_detector_column': 14, 'science_row': 16, 'b_first_pixel': 16, 'mosaic_extent': 25, 'science_rows': 16})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect science rows while other fields remain valid.

Two readout amplifiers cover a focal plane with overscan removed. Amplifier B is physically reversed. Detector labels are one-based; chip gap has no samples. Serial overscan is measured in columns and parallel overscan in rows. Output fields are defined by: a_science_column = d['x']-d['serial']; b_detector_column = d['a']+d['gap']+d['b']+1-d['x']; science_row = d['y']-d['parallel']; b_first_pixel = d['a']+d['gap']+1; mosaic_extent = d['a']+d['gap']+d['b']; science_rows = d['rows']-d['parallel']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*d['p']+d['c']*d['p']**2+d['e']*d['p']**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-linear-spectral-pixel-calibration

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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Spectral coordinate is a reference-centered cubic in one-based pixel displacement t=p-r. Report coordinate, local derivative, reference-independent absolute constant, and the three coefficients after a shift of reference by s. This is a finite exact calibration polynomial, not a dispersion solution. Output fields are defined by: coordinate = d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3; local_dispersion = d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2; absolute_constant = d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3; shifted_zero = d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3; shifted_linear = d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2; shifted_quadratic = d['c']+3*d['e']*d['s']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b'], 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-linear-spectral-pixel-calibration

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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r']), 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect local dispersion while other fields remain valid.

Spectral coordinate is a reference-centered cubic in one-based pixel displacement t=p-r. Report coordinate, local derivative, reference-independent absolute constant, and the three coefficients after a shift of reference by s. This is a finite exact calibration polynomial, not a dispersion solution. Output fields are defined by: coordinate = d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3; local_dispersion = d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2; absolute_constant = d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3; shifted_zero = d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3; shifted_linear = d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2; shifted_quadratic = d['c']+3*d['e']*d['s']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a'], 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-linear-spectral-pixel-calibration

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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a']-d['b']*d['r'], 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect absolute constant while other fields remain valid.

Spectral coordinate is a reference-centered cubic in one-based pixel displacement t=p-r. Report coordinate, local derivative, reference-independent absolute constant, and the three coefficients after a shift of reference by s. This is a finite exact calibration polynomial, not a dispersion solution. Output fields are defined by: coordinate = d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3; local_dispersion = d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2; absolute_constant = d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3; shifted_zero = d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3; shifted_linear = d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2; shifted_quadratic = d['c']+3*d['e']*d['s']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s'], 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: astro-linear-spectral-pixel-calibration

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

N = 1
observations = []
def solve(d):
    return {'coordinate': d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3, 'local_dispersion': d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2, 'absolute_constant': d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3, 'shifted_zero': d['a']+d['b']*d['s']+d['c']*d['s']**2, 'shifted_linear': d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2, 'shifted_quadratic': d['c']+3*d['e']*d['s']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 108, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 3, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 100, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 7, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 200, 'local_dispersion': 69, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 76, 'local_dispersion': -30, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 2: [({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 310, 'local_dispersion': 107, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 110, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 4, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 106, 'local_dispersion': 11, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 8, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 285, 'local_dispersion': 102, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 8, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': 35, 'local_dispersion': -53, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 3: [({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 436, 'local_dispersion': 146, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 112, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 5, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 124, 'local_dispersion': 26, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 9, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 406, 'local_dispersion': 141, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 9, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -32, 'local_dispersion': -82, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 4: [({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 604, 'local_dispersion': 191, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 114, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 6, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 160, 'local_dispersion': 47, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 10, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 569, 'local_dispersion': 186, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 10, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -131, 'local_dispersion': -117, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})], 5: [({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 0}, {'coordinate': 820, 'local_dispersion': 242, 'absolute_constant': 94, 'shifted_zero': 100, 'shifted_linear': 2, 'shifted_quadratic': 3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 0, 'e': 0, 's': 2}, {'coordinate': 116, 'local_dispersion': 2, 'absolute_constant': 94, 'shifted_zero': 104, 'shifted_linear': 2, 'shifted_quadratic': 0}), ({'p': 7, 'r': 3, 'a': 100, 'b': 2, 'c': 3, 'e': 1, 's': 2}, {'coordinate': 220, 'local_dispersion': 74, 'absolute_constant': 94, 'shifted_zero': 124, 'shifted_linear': 26, 'shifted_quadratic': 9}), ({'p': 11, 'r': 3, 'a': 100, 'b': -3, 'c': 3, 'e': 1, 's': -2}, {'coordinate': 780, 'local_dispersion': 237, 'absolute_constant': 109, 'shifted_zero': 110, 'shifted_linear': -3, 'shifted_quadratic': -3}), ({'p': 11, 'r': 3, 'a': 100, 'b': 2, 'c': 2, 'e': -1, 's': 2}, {'coordinate': -268, 'local_dispersion': -158, 'absolute_constant': 139, 'shifted_zero': 104, 'shifted_linear': -2, 'shifted_quadratic': -4})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The adapter reports an incorrect shifted zero while other fields remain valid.

Spectral coordinate is a reference-centered cubic in one-based pixel displacement t=p-r. Report coordinate, local derivative, reference-independent absolute constant, and the three coefficients after a shift of reference by s. This is a finite exact calibration polynomial, not a dispersion solution. Output fields are defined by: coordinate = d['a']+d['b']*(d['p']-d['r'])+d['c']*(d['p']-d['r'])**2+d['e']*(d['p']-d['r'])**3; local_dispersion = d['b']+2*d['c']*(d['p']-d['r'])+3*d['e']*(d['p']-d['r'])**2; absolute_constant = d['a']-d['b']*d['r']+d['c']*d['r']**2-d['e']*d['r']**3; shifted_zero = d['a']+d['b']*d['s']+d['c']*d['s']**2+d['e']*d['s']**3; shifted_linear = d['b']+2*d['c']*d['s']+3*d['e']*d['s']**2; shifted_quadratic = d['c']+3*d['e']*d['s']

split: open-access