evaluation_group: astro-occultation-shadow-coordinate

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

A reduced occultation shadow travels with signed nonzero velocity v along x. Star coordinate xs is fixed, shadow center starts x0 at epoch t0, and positive half-chord h is supplied. Closest longitudinal crossing is t0+(xs-x0)/v; contacts are ordered using absolute transit duration. Output fields are defined by: crossing_epoch = d['t0']+(d['xs']-d['x0'])/d['v']; shadow_center = d['x0']+d['v']*(d['t']-d['t0']); relative_star = d['xs']-d['x0']-d['v']*(d['t']-d['t0']); first_contact = d['t0']+(d['xs']-d['x0'])/d['v']-abs(d['h']/d['v']); last_contact = d['t0']+(d['xs']-d['x0'])/d['v']+abs(d['h']/d['v']); duration = 2*abs(d['h']/d['v'])

split: open-access


meaning: Fixture-count band, not measured model difficulty

deps: stdlib

evaluation_group: astro-occultation-shadow-coordinate

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

A reduced occultation shadow travels with signed nonzero velocity v along x. Star coordinate xs is fixed, shadow center starts x0 at epoch t0, and positive half-chord h is supplied. Closest longitudinal crossing is t0+(xs-x0)/v; contacts are ordered using absolute transit duration. Output fields are defined by: crossing_epoch = d['t0']+(d['xs']-d['x0'])/d['v']; shadow_center = d['x0']+d['v']*(d['t']-d['t0']); relative_star = d['xs']-d['x0']-d['v']*(d['t']-d['t0']); first_contact = d['t0']+(d['xs']-d['x0'])/d['v']-abs(d['h']/d['v']); last_contact = d['t0']+(d['xs']-d['x0'])/d['v']+abs(d['h']/d['v']); duration = 2*abs(d['h']/d['v'])

split: open-access


evaluation_group: astro-occultation-shadow-coordinate

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

A reduced occultation shadow travels with signed nonzero velocity v along x. Star coordinate xs is fixed, shadow center starts x0 at epoch t0, and positive half-chord h is supplied. Closest longitudinal crossing is t0+(xs-x0)/v; contacts are ordered using absolute transit duration. Output fields are defined by: crossing_epoch = d['t0']+(d['xs']-d['x0'])/d['v']; shadow_center = d['x0']+d['v']*(d['t']-d['t0']); relative_star = d['xs']-d['x0']-d['v']*(d['t']-d['t0']); first_contact = d['t0']+(d['xs']-d['x0'])/d['v']-abs(d['h']/d['v']); last_contact = d['t0']+(d['xs']-d['x0'])/d['v']+abs(d['h']/d['v']); duration = 2*abs(d['h']/d['v'])

split: open-access


evaluation_group: astro-occultation-shadow-coordinate

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

A reduced occultation shadow travels with signed nonzero velocity v along x. Star coordinate xs is fixed, shadow center starts x0 at epoch t0, and positive half-chord h is supplied. Closest longitudinal crossing is t0+(xs-x0)/v; contacts are ordered using absolute transit duration. Output fields are defined by: crossing_epoch = d['t0']+(d['xs']-d['x0'])/d['v']; shadow_center = d['x0']+d['v']*(d['t']-d['t0']); relative_star = d['xs']-d['x0']-d['v']*(d['t']-d['t0']); first_contact = d['t0']+(d['xs']-d['x0'])/d['v']-abs(d['h']/d['v']); last_contact = d['t0']+(d['xs']-d['x0'])/d['v']+abs(d['h']/d['v']); duration = 2*abs(d['h']/d['v'])

split: open-access


evaluation_group: astro-occultation-shadow-coordinate

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

A reduced occultation shadow travels with signed nonzero velocity v along x. Star coordinate xs is fixed, shadow center starts x0 at epoch t0, and positive half-chord h is supplied. Closest longitudinal crossing is t0+(xs-x0)/v; contacts are ordered using absolute transit duration. Output fields are defined by: crossing_epoch = d['t0']+(d['xs']-d['x0'])/d['v']; shadow_center = d['x0']+d['v']*(d['t']-d['t0']); relative_star = d['xs']-d['x0']-d['v']*(d['t']-d['t0']); first_contact = d['t0']+(d['xs']-d['x0'])/d['v']-abs(d['h']/d['v']); last_contact = d['t0']+(d['xs']-d['x0'])/d['v']+abs(d['h']/d['v']); duration = 2*abs(d['h']/d['v'])

split: open-access


evaluation_group: astro-wcs-cube-storage-order

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

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']]

split: open-access


evaluation_group: astro-wcs-cube-storage-order

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

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']]

split: open-access


evaluation_group: astro-wcs-cube-storage-order

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

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']]

split: open-access


evaluation_group: astro-wcs-cube-storage-order

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

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']]

split: open-access


evaluation_group: astro-wcs-cube-storage-order

prompt:
The adapter reports an incorrect world axis types while other fields remain valid.

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']]

split: open-access


evaluation_group: astro-wcs-cube-storage-order

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

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']]

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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-spectral-reference-frame-chain

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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']-d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 lsr frequency while other fields remain valid.

A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']+d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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-spectral-reference-frame-chain

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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 geocentric frequency while other fields remain valid.

A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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-spectral-reference-frame-chain

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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['lsr_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 apply barycentric while other fields remain valid.

A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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-spectral-reference-frame-chain

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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['bary_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']-d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 apply lsr while other fields remain valid.

A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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-spectral-reference-frame-chain

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

N = 1
observations = []
def solve(d):
    return {'lsr_frequency': d['f']+d['a']+d['b'], 'geocentric_frequency': d['f']+d['a']-d['g'], 'apply_barycentric': d['f'] if d['bary_done'] else d['f']+d['a'], 'apply_lsr': d['f'] if d['lsr_done'] else d['f']+d['b'], 'recover_topocentric': d['f']-d['a']+d['b'], 'lsr_from_geocenter': d['f']+d['g']+d['b']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 107, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 104, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109}), ({'f': 100, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 100, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 100, 'lsr_from_geocenter': 100}), ({'f': 100, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 99, 'geocentric_frequency': 95, 'apply_barycentric': 97, 'apply_lsr': 102, 'recover_topocentric': 101, 'lsr_from_geocenter': 104}), ({'f': 100, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 111, 'geocentric_frequency': 102, 'apply_barycentric': 100, 'apply_lsr': 100, 'recover_topocentric': 89, 'lsr_from_geocenter': 109})], 2: [({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 108, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 105, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110}), ({'f': 101, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 101, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 101, 'lsr_from_geocenter': 101}), ({'f': 101, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 100, 'geocentric_frequency': 96, 'apply_barycentric': 98, 'apply_lsr': 103, 'recover_topocentric': 102, 'lsr_from_geocenter': 105}), ({'f': 101, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 112, 'geocentric_frequency': 103, 'apply_barycentric': 101, 'apply_lsr': 101, 'recover_topocentric': 90, 'lsr_from_geocenter': 110})], 3: [({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 109, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 106, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111}), ({'f': 102, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 102, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 102, 'lsr_from_geocenter': 102}), ({'f': 102, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 101, 'geocentric_frequency': 97, 'apply_barycentric': 99, 'apply_lsr': 104, 'recover_topocentric': 103, 'lsr_from_geocenter': 106}), ({'f': 102, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 113, 'geocentric_frequency': 104, 'apply_barycentric': 102, 'apply_lsr': 102, 'recover_topocentric': 91, 'lsr_from_geocenter': 111})], 4: [({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 110, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 107, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112}), ({'f': 103, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 103, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 103, 'lsr_from_geocenter': 103}), ({'f': 103, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 102, 'geocentric_frequency': 98, 'apply_barycentric': 100, 'apply_lsr': 105, 'recover_topocentric': 104, 'lsr_from_geocenter': 107}), ({'f': 103, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 114, 'geocentric_frequency': 105, 'apply_barycentric': 103, 'apply_lsr': 103, 'recover_topocentric': 92, 'lsr_from_geocenter': 112})], 5: [({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': False}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 111, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': False, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 108, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113}), ({'f': 104, 'a': 0, 'b': 0, 'g': 0, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 104, 'geocentric_frequency': 104, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 104, 'lsr_from_geocenter': 104}), ({'f': 104, 'a': -3, 'b': 2, 'g': 2, 'bary_done': False, 'lsr_done': False}, {'lsr_frequency': 103, 'geocentric_frequency': 99, 'apply_barycentric': 101, 'apply_lsr': 106, 'recover_topocentric': 105, 'lsr_from_geocenter': 108}), ({'f': 104, 'a': 4, 'b': 7, 'g': 2, 'bary_done': True, 'lsr_done': True}, {'lsr_frequency': 115, 'geocentric_frequency': 106, 'apply_barycentric': 104, 'apply_lsr': 104, 'recover_topocentric': 93, 'lsr_from_geocenter': 113})]}
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 recover topocentric while other fields remain valid.

A finite spectral frame adapter supplies topocentric frequency f and additive shifts a=topocentric-to-barycentric, b=barycentric-to-LSR, and g=geocentric-to-barycentric. These are stipulated precomputed coordinate shifts in common units, not physical velocity or Doppler formulas. Provenance booleans mark shifts already applied. Output fields are defined by: lsr_frequency = d['f']+d['a']+d['b']; geocentric_frequency = d['f']+d['a']-d['g']; apply_barycentric = d['f'] if d['bary_done'] else d['f']+d['a']; apply_lsr = d['f'] if d['lsr_done'] else d['f']+d['b']; recover_topocentric = d['f']-d['a']-d['b']; lsr_from_geocenter = d['f']+d['g']+d['b']

split: open-access