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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon']+d['eqeq']+d['dra'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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-sidereal-hour-angle-adapter

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

N = 1
observations = []
def solve(d):
    return {'local_mean': (d['gmst']+d['lon'])%360, 'local_apparent': (d['gmst']+d['lon']+d['eqeq'])%360, 'apparent_ra': (d['ra']+d['dra'])%360, 'mean_hour_angle': (d['gmst']+d['lon']-d['ra'])%360, 'apparent_hour_angle': (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360, 'meridian_ra': (d['gmst']+d['lon'])%360}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 53, 'mean_hour_angle': 80, 'apparent_hour_angle': 79, 'meridian_ra': 129}), ({'gmst': 100, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 60, 'local_apparent': 62, 'apparent_ra': 53, 'mean_hour_angle': 10, 'apparent_hour_angle': 9, 'meridian_ra': 59}), ({'gmst': 100, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 130, 'local_apparent': 130, 'apparent_ra': 50, 'mean_hour_angle': 80, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 350, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 20, 'local_apparent': 22, 'apparent_ra': 8, 'mean_hour_angle': 15, 'apparent_hour_angle': 14, 'meridian_ra': 19}), ({'gmst': 100, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 130, 'local_apparent': 132, 'apparent_ra': 303, 'mean_hour_angle': 190, 'apparent_hour_angle': 189, 'meridian_ra': 129}), ({'gmst': 100, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 100, 'local_apparent': 97, 'apparent_ra': 48, 'mean_hour_angle': 50, 'apparent_hour_angle': 49, 'meridian_ra': 99})], 2: [({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 53, 'mean_hour_angle': 81, 'apparent_hour_angle': 80, 'meridian_ra': 130}), ({'gmst': 101, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 61, 'local_apparent': 63, 'apparent_ra': 53, 'mean_hour_angle': 11, 'apparent_hour_angle': 10, 'meridian_ra': 60}), ({'gmst': 101, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 131, 'local_apparent': 131, 'apparent_ra': 50, 'mean_hour_angle': 81, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 351, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 21, 'local_apparent': 23, 'apparent_ra': 8, 'mean_hour_angle': 16, 'apparent_hour_angle': 15, 'meridian_ra': 20}), ({'gmst': 101, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 131, 'local_apparent': 133, 'apparent_ra': 303, 'mean_hour_angle': 191, 'apparent_hour_angle': 190, 'meridian_ra': 130}), ({'gmst': 101, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 101, 'local_apparent': 98, 'apparent_ra': 48, 'mean_hour_angle': 51, 'apparent_hour_angle': 50, 'meridian_ra': 100})], 3: [({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 53, 'mean_hour_angle': 82, 'apparent_hour_angle': 81, 'meridian_ra': 131}), ({'gmst': 102, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 62, 'local_apparent': 64, 'apparent_ra': 53, 'mean_hour_angle': 12, 'apparent_hour_angle': 11, 'meridian_ra': 61}), ({'gmst': 102, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 132, 'local_apparent': 132, 'apparent_ra': 50, 'mean_hour_angle': 82, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 352, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 22, 'local_apparent': 24, 'apparent_ra': 8, 'mean_hour_angle': 17, 'apparent_hour_angle': 16, 'meridian_ra': 21}), ({'gmst': 102, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 132, 'local_apparent': 134, 'apparent_ra': 303, 'mean_hour_angle': 192, 'apparent_hour_angle': 191, 'meridian_ra': 131}), ({'gmst': 102, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 102, 'local_apparent': 99, 'apparent_ra': 48, 'mean_hour_angle': 52, 'apparent_hour_angle': 51, 'meridian_ra': 101})], 4: [({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 53, 'mean_hour_angle': 83, 'apparent_hour_angle': 82, 'meridian_ra': 132}), ({'gmst': 103, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 63, 'local_apparent': 65, 'apparent_ra': 53, 'mean_hour_angle': 13, 'apparent_hour_angle': 12, 'meridian_ra': 62}), ({'gmst': 103, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 133, 'local_apparent': 133, 'apparent_ra': 50, 'mean_hour_angle': 83, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 353, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 23, 'local_apparent': 25, 'apparent_ra': 8, 'mean_hour_angle': 18, 'apparent_hour_angle': 17, 'meridian_ra': 22}), ({'gmst': 103, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 133, 'local_apparent': 135, 'apparent_ra': 303, 'mean_hour_angle': 193, 'apparent_hour_angle': 192, 'meridian_ra': 132}), ({'gmst': 103, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 103, 'local_apparent': 100, 'apparent_ra': 48, 'mean_hour_angle': 53, 'apparent_hour_angle': 52, 'meridian_ra': 102})], 5: [({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 53, 'mean_hour_angle': 84, 'apparent_hour_angle': 83, 'meridian_ra': 133}), ({'gmst': 104, 'lon': -40, 'eqeq': 2, 'ra': 50, 'dra': 3}, {'local_mean': 64, 'local_apparent': 66, 'apparent_ra': 53, 'mean_hour_angle': 14, 'apparent_hour_angle': 13, 'meridian_ra': 63}), ({'gmst': 104, 'lon': 30, 'eqeq': 0, 'ra': 50, 'dra': 0}, {'local_mean': 134, 'local_apparent': 134, 'apparent_ra': 50, 'mean_hour_angle': 84, 'apparent_hour_angle': 84, 'meridian_ra': 134}), ({'gmst': 354, 'lon': 30, 'eqeq': 2, 'ra': 5, 'dra': 3}, {'local_mean': 24, 'local_apparent': 26, 'apparent_ra': 8, 'mean_hour_angle': 19, 'apparent_hour_angle': 18, 'meridian_ra': 23}), ({'gmst': 104, 'lon': 30, 'eqeq': 2, 'ra': 300, 'dra': 3}, {'local_mean': 134, 'local_apparent': 136, 'apparent_ra': 303, 'mean_hour_angle': 194, 'apparent_hour_angle': 193, 'meridian_ra': 133}), ({'gmst': 104, 'lon': 0, 'eqeq': -3, 'ra': 50, 'dra': -2}, {'local_mean': 104, 'local_apparent': 101, 'apparent_ra': 48, 'mean_hour_angle': 54, 'apparent_hour_angle': 53, 'meridian_ra': 103})]}
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 meridian ra while other fields remain valid.

All angular values are exact model degrees. East longitude is positive. Local mean sidereal angle is gmst+lon, apparent sidereal includes eqeq, apparent RA is ra+dra. Hour angle is sidereal minus RA, normalized into [0,360). No Earth rotation is calculated. Output fields are defined by: local_mean = (d['gmst']+d['lon'])%360; local_apparent = (d['gmst']+d['lon']+d['eqeq'])%360; apparent_ra = (d['ra']+d['dra'])%360; mean_hour_angle = (d['gmst']+d['lon']-d['ra'])%360; apparent_hour_angle = (d['gmst']+d['lon']+d['eqeq']-d['ra']-d['dra'])%360; meridian_ra = (d['gmst']+d['lon']+d['eqeq']-d['dra'])%360

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx'], 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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-catalog-error-ellipse

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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*abs(d['sx']), 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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 scaled variance x while other fields remain valid.

A tangent-plane catalog covariance has variances a,b and covariance c. Axis scale sx,sy includes signed orientation. A 90-degree basis rotation maps (x,y) to (-y,x). A projected RA coordinate supplied factor q converts covariance using a diagonal Jacobian. No confidence-level conversion is implied. Output fields are defined by: scaled_variance_x = d['a']*d['sx']**2; scaled_covariance = d['c']*d['sx']*d['sy']; rotated_covariance = -d['c']; projected_variance = d['a']*d['q']**2; projected_cross_term = d['c']*d['q']; determinant = d['a']*d['b']-d['c']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*abs(d['sx']*d['sy']), 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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-catalog-error-ellipse

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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']**2, 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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 scaled covariance while other fields remain valid.

A tangent-plane catalog covariance has variances a,b and covariance c. Axis scale sx,sy includes signed orientation. A 90-degree basis rotation maps (x,y) to (-y,x). A projected RA coordinate supplied factor q converts covariance using a diagonal Jacobian. No confidence-level conversion is implied. Output fields are defined by: scaled_variance_x = d['a']*d['sx']**2; scaled_covariance = d['c']*d['sx']*d['sy']; rotated_covariance = -d['c']; projected_variance = d['a']*d['q']**2; projected_cross_term = d['c']*d['q']; determinant = d['a']*d['b']-d['c']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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-catalog-error-ellipse

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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': abs(d['c']), 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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 rotated covariance while other fields remain valid.

A tangent-plane catalog covariance has variances a,b and covariance c. Axis scale sx,sy includes signed orientation. A 90-degree basis rotation maps (x,y) to (-y,x). A projected RA coordinate supplied factor q converts covariance using a diagonal Jacobian. No confidence-level conversion is implied. Output fields are defined by: scaled_variance_x = d['a']*d['sx']**2; scaled_covariance = d['c']*d['sx']*d['sy']; rotated_covariance = -d['c']; projected_variance = d['a']*d['q']**2; projected_cross_term = d['c']*d['q']; determinant = d['a']*d['b']-d['c']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q'], 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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-catalog-error-ellipse

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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']/d['q']**2, 'projected_cross_term': d['c']*d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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 projected variance while other fields remain valid.

A tangent-plane catalog covariance has variances a,b and covariance c. Axis scale sx,sy includes signed orientation. A 90-degree basis rotation maps (x,y) to (-y,x). A projected RA coordinate supplied factor q converts covariance using a diagonal Jacobian. No confidence-level conversion is implied. Output fields are defined by: scaled_variance_x = d['a']*d['sx']**2; scaled_covariance = d['c']*d['sx']*d['sy']; rotated_covariance = -d['c']; projected_variance = d['a']*d['q']**2; projected_cross_term = d['c']*d['q']; determinant = d['a']*d['b']-d['c']**2

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']*d['q']**2, 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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-catalog-error-ellipse

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

N = 1
observations = []
def solve(d):
    return {'scaled_variance_x': d['a']*d['sx']**2, 'scaled_covariance': d['c']*d['sx']*d['sy'], 'rotated_covariance': -d['c'], 'projected_variance': d['a']*d['q']**2, 'projected_cross_term': d['c']/d['q'], 'determinant': d['a']*d['b']-d['c']**2}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 9, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 36, 'projected_cross_term': 0, 'determinant': 144}), ({'a': 9, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 36, 'projected_cross_term': 6, 'determinant': 135}), ({'a': 9, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 36, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 9, 'projected_cross_term': 3, 'determinant': 135}), ({'a': 4, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 16, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 16, 'projected_cross_term': -4, 'determinant': 96})], 2: [({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 10, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 40, 'projected_cross_term': 0, 'determinant': 160}), ({'a': 10, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 40, 'projected_cross_term': 6, 'determinant': 151}), ({'a': 10, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 40, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 10, 'projected_cross_term': 3, 'determinant': 151}), ({'a': 5, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 20, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 20, 'projected_cross_term': -4, 'determinant': 121})], 3: [({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 11, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 44, 'projected_cross_term': 0, 'determinant': 176}), ({'a': 11, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 44, 'projected_cross_term': 6, 'determinant': 167}), ({'a': 11, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 44, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 11, 'projected_cross_term': 3, 'determinant': 167}), ({'a': 6, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 24, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 24, 'projected_cross_term': -4, 'determinant': 146})], 4: [({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 12, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 48, 'projected_cross_term': 0, 'determinant': 192}), ({'a': 12, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 48, 'projected_cross_term': 6, 'determinant': 183}), ({'a': 12, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 48, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 12, 'projected_cross_term': 3, 'determinant': 183}), ({'a': 7, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 28, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 28, 'projected_cross_term': -4, 'determinant': 171})], 5: [({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 1, 'sy': 1, 'q': 2}, {'scaled_variance_x': 13, 'scaled_covariance': 3, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 0, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': 0, 'rotated_covariance': 0, 'projected_variance': 52, 'projected_cross_term': 0, 'determinant': 208}), ({'a': 13, 'b': 16, 'c': 3, 'sx': -2, 'sy': 3, 'q': 2}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 52, 'projected_cross_term': 6, 'determinant': 199}), ({'a': 13, 'b': 16, 'c': 3, 'sx': 2, 'sy': -3, 'q': 1}, {'scaled_variance_x': 52, 'scaled_covariance': -18, 'rotated_covariance': -3, 'projected_variance': 13, 'projected_cross_term': 3, 'determinant': 199}), ({'a': 8, 'b': 25, 'c': -2, 'sx': 2, 'sy': -3, 'q': 2}, {'scaled_variance_x': 32, 'scaled_covariance': 12, 'rotated_covariance': 2, 'projected_variance': 32, 'projected_cross_term': -4, 'determinant': 196})]}
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 projected cross term while other fields remain valid.

A tangent-plane catalog covariance has variances a,b and covariance c. Axis scale sx,sy includes signed orientation. A 90-degree basis rotation maps (x,y) to (-y,x). A projected RA coordinate supplied factor q converts covariance using a diagonal Jacobian. No confidence-level conversion is implied. Output fields are defined by: scaled_variance_x = d['a']*d['sx']**2; scaled_covariance = d['c']*d['sx']*d['sy']; rotated_covariance = -d['c']; projected_variance = d['a']*d['q']**2; projected_cross_term = d['c']*d['q']; determinant = d['a']*d['b']-d['c']**2

split: open-access