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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 2*d['p']+d['k'], 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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-nested-sky-cell-address

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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k']+1, 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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 child local while other fields remain valid.

A stipulated hierarchical sky tessellation has 12 base faces and four nested children per cell. At order o a face has 4**o pixels. p is the local pixel index, f the face, k the child digit. Parent and descendant ranges are nested indexing operations; no geometric HEALPix projection is implemented. Output fields are defined by: global_pixel = d['f']*4**d['o']+d['p']; parent_local = d['p']//4; child_local = 4*d['p']+d['k']; descendant_first = d['p']*4**d['depth']; descendant_stop = (d['p']+1)*4**d['depth']; face_count = 12*4**d['o']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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-nested-sky-cell-address

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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*2**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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 descendant first while other fields remain valid.

A stipulated hierarchical sky tessellation has 12 base faces and four nested children per cell. At order o a face has 4**o pixels. p is the local pixel index, f the face, k the child digit. Parent and descendant ranges are nested indexing operations; no geometric HEALPix projection is implemented. Output fields are defined by: global_pixel = d['f']*4**d['o']+d['p']; parent_local = d['p']//4; child_local = 4*d['p']+d['k']; descendant_first = d['p']*4**d['depth']; descendant_stop = (d['p']+1)*4**d['depth']; face_count = 12*4**d['o']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': d['p']*4**d['depth']+1, 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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-nested-sky-cell-address

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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth']-1, 'face_count': 12*4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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 descendant stop while other fields remain valid.

A stipulated hierarchical sky tessellation has 12 base faces and four nested children per cell. At order o a face has 4**o pixels. p is the local pixel index, f the face, k the child digit. Parent and descendant ranges are nested indexing operations; no geometric HEALPix projection is implemented. Output fields are defined by: global_pixel = d['f']*4**d['o']+d['p']; parent_local = d['p']//4; child_local = 4*d['p']+d['k']; descendant_first = d['p']*4**d['depth']; descendant_stop = (d['p']+1)*4**d['depth']; face_count = 12*4**d['o']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 12*2**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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-nested-sky-cell-address

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

N = 1
observations = []
def solve(d):
    return {'global_pixel': d['f']*4**d['o']+d['p'], 'parent_local': d['p']//4, 'child_local': 4*d['p']+d['k'], 'descendant_first': d['p']*4**d['depth'], 'descendant_stop': (d['p']+1)*4**d['depth'], 'face_count': 4**d['o']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 0, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 0, 'parent_local': 0, 'child_local': 0, 'descendant_first': 0, 'descendant_stop': 16, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 181, 'parent_local': 1, 'child_local': 23, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 53, 'parent_local': 1, 'child_local': 22, 'descendant_first': 5, 'descendant_stop': 6, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 18, 'parent_local': 0, 'child_local': 10, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 3, 'p': 20, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 212, 'parent_local': 5, 'child_local': 82, 'descendant_first': 80, 'descendant_stop': 84, 'face_count': 768})], 2: [({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 1, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 1, 'parent_local': 0, 'child_local': 4, 'descendant_first': 16, 'descendant_stop': 32, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 182, 'parent_local': 1, 'child_local': 27, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 54, 'parent_local': 1, 'child_local': 26, 'descendant_first': 6, 'descendant_stop': 7, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 19, 'parent_local': 0, 'child_local': 14, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 3, 'p': 21, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 213, 'parent_local': 5, 'child_local': 86, 'descendant_first': 84, 'descendant_stop': 88, 'face_count': 768})], 3: [({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 2, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 2, 'parent_local': 0, 'child_local': 8, 'descendant_first': 32, 'descendant_stop': 48, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 183, 'parent_local': 1, 'child_local': 31, 'descendant_first': 112, 'descendant_stop': 128, 'face_count': 192}), ({'o': 2, 'p': 7, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 55, 'parent_local': 1, 'child_local': 30, 'descendant_first': 7, 'descendant_stop': 8, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 20, 'parent_local': 1, 'child_local': 18, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 3, 'p': 22, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 214, 'parent_local': 5, 'child_local': 90, 'descendant_first': 88, 'descendant_stop': 92, 'face_count': 768})], 4: [({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 3, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 3, 'parent_local': 0, 'child_local': 12, 'descendant_first': 48, 'descendant_stop': 64, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 184, 'parent_local': 2, 'child_local': 35, 'descendant_first': 128, 'descendant_stop': 144, 'face_count': 192}), ({'o': 2, 'p': 8, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 56, 'parent_local': 2, 'child_local': 34, 'descendant_first': 8, 'descendant_stop': 9, 'face_count': 192}), ({'o': 2, 'p': 5, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 21, 'parent_local': 1, 'child_local': 22, 'descendant_first': 80, 'descendant_stop': 96, 'face_count': 192}), ({'o': 3, 'p': 23, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 215, 'parent_local': 5, 'child_local': 94, 'descendant_first': 92, 'descendant_stop': 96, 'face_count': 768})], 5: [({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 2}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 4, 'f': 0, 'k': 0, 'depth': 2}, {'global_pixel': 4, 'parent_local': 1, 'child_local': 16, 'descendant_first': 64, 'descendant_stop': 80, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 11, 'k': 3, 'depth': 2}, {'global_pixel': 185, 'parent_local': 2, 'child_local': 39, 'descendant_first': 144, 'descendant_stop': 160, 'face_count': 192}), ({'o': 2, 'p': 9, 'f': 3, 'k': 2, 'depth': 0}, {'global_pixel': 57, 'parent_local': 2, 'child_local': 38, 'descendant_first': 9, 'descendant_stop': 10, 'face_count': 192}), ({'o': 2, 'p': 6, 'f': 1, 'k': 2, 'depth': 2}, {'global_pixel': 22, 'parent_local': 1, 'child_local': 26, 'descendant_first': 96, 'descendant_stop': 112, 'face_count': 192}), ({'o': 3, 'p': 24, 'f': 3, 'k': 2, 'depth': 1}, {'global_pixel': 216, 'parent_local': 6, 'child_local': 98, 'descendant_first': 96, 'descendant_stop': 100, 'face_count': 768})]}
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 face count while other fields remain valid.

A stipulated hierarchical sky tessellation has 12 base faces and four nested children per cell. At order o a face has 4**o pixels. p is the local pixel index, f the face, k the child digit. Parent and descendant ranges are nested indexing operations; no geometric HEALPix projection is implemented. Output fields are defined by: global_pixel = d['f']*4**d['o']+d['p']; parent_local = d['p']//4; child_local = 4*d['p']+d['k']; descendant_first = d['p']*4**d['depth']; descendant_stop = (d['p']+1)*4**d['depth']; face_count = 12*4**d['o']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


evaluation_group: astro-multiorder-sky-cell-encoding

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

A bounded multiorder sky cell uses uniq=4*4**order+pixel, where pixel is the global nested pixel index with 0<=pixel<12*4**order. Coarsening one level preserves face by integer division of pixel by four. Cell area is normalized to whole-sky area one. Output fields are defined by: uniq = 4*4**d['order']+d['pixel']; band_start = 4*4**d['order']; cell_area = 1/(12*4**d['order']); cell_mass = d['density']/(12*4**d['order']); child_uniq = 4*4**(d['order']+1)+4*d['pixel']+d['sub']; order_stop = 16*4**d['order']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+d['x']*d['u']/d['S'], 'elapsed_seconds': (d['x']+d['z'])*d['u'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
for i, (record, expected) in enumerate(fixtures[N]):
    check('astronomical fixture %s' % i, solve(record), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': d['x']*d['u']+d['z'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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-fits-split-time-reference

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

N = 1
observations = []
def solve(d):
    return {'absolute_day': d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S'], 'elapsed_seconds': d['x']+d['z'], 'reference_seconds': d['f0']*d['S'], 'zero_day_offset': d['z']*d['u']/d['S'], 'relative_day': (d['x']+d['z'])*d['u']/d['S'], 'inverse_tick': ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499016.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.65, 'elapsed_seconds': 40, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.4, 'inverse_tick': -2499012.5}), ({'d0': 50000, 'f0': 0, 'x': 20, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.48, 'elapsed_seconds': 48, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.48, 'inverse_tick': -2499004.0}), ({'d0': 50000, 'f0': 0.25, 'x': -10, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.01, 'elapsed_seconds': -24, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.24, 'inverse_tick': -2500510.5}), ({'d0': 50000, 'f0': 0.25, 'x': 20, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.49, 'elapsed_seconds': 24, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.24, 'inverse_tick': -4998029.0}), ({'d0': 50000, 'f0': 0.75, 'x': 20, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.71, 'elapsed_seconds': 96, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 0.96, 'inverse_tick': -1249522.75})], 2: [({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.75, 'elapsed_seconds': 50, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498966.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.67, 'elapsed_seconds': 42, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.42, 'inverse_tick': -2498962.5}), ({'d0': 50000, 'f0': 0, 'x': 21, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 50, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.5, 'inverse_tick': -2498954.0}), ({'d0': 50000, 'f0': 0.25, 'x': -9, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.03, 'elapsed_seconds': -22, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.22, 'inverse_tick': -2500460.5}), ({'d0': 50000, 'f0': 0.25, 'x': 21, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.5, 'elapsed_seconds': 25, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.25, 'inverse_tick': -4997929.0}), ({'d0': 50000, 'f0': 0.75, 'x': 21, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.75, 'elapsed_seconds': 100, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.0, 'inverse_tick': -1249497.75})], 3: [({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.77, 'elapsed_seconds': 52, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498916.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.69, 'elapsed_seconds': 44, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.44, 'inverse_tick': -2498912.5}), ({'d0': 50000, 'f0': 0, 'x': 22, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 52, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.52, 'inverse_tick': -2498904.0}), ({'d0': 50000, 'f0': 0.25, 'x': -8, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.05, 'elapsed_seconds': -20, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.2, 'inverse_tick': -2500410.5}), ({'d0': 50000, 'f0': 0.25, 'x': 22, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.51, 'elapsed_seconds': 26, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.26, 'inverse_tick': -4997829.0}), ({'d0': 50000, 'f0': 0.75, 'x': 22, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.79, 'elapsed_seconds': 104, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.04, 'inverse_tick': -1249472.75})], 4: [({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.79, 'elapsed_seconds': 54, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498866.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.71, 'elapsed_seconds': 46, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.46, 'inverse_tick': -2498862.5}), ({'d0': 50000, 'f0': 0, 'x': 23, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.54, 'elapsed_seconds': 54, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.54, 'inverse_tick': -2498854.0}), ({'d0': 50000, 'f0': 0.25, 'x': -7, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.07, 'elapsed_seconds': -18, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.18, 'inverse_tick': -2500360.5}), ({'d0': 50000, 'f0': 0.25, 'x': 23, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.52, 'elapsed_seconds': 27, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.27, 'inverse_tick': -4997729.0}), ({'d0': 50000, 'f0': 0.75, 'x': 23, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.83, 'elapsed_seconds': 108, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.08, 'inverse_tick': -1249447.75})], 5: [({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.81, 'elapsed_seconds': 56, 'reference_seconds': 25.0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498816.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 0, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.73, 'elapsed_seconds': 48, 'reference_seconds': 25.0, 'zero_day_offset': 0.0, 'relative_day': 0.48, 'inverse_tick': -2498812.5}), ({'d0': 50000, 'f0': 0, 'x': 24, 'z': 4, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.56, 'elapsed_seconds': 56, 'reference_seconds': 0, 'zero_day_offset': 0.08, 'relative_day': 0.56, 'inverse_tick': -2498804.0}), ({'d0': 50000, 'f0': 0.25, 'x': -6, 'z': -2, 'u': 2, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.09, 'elapsed_seconds': -16, 'reference_seconds': 25.0, 'zero_day_offset': -0.04, 'relative_day': -0.16, 'inverse_tick': -2500310.5}), ({'d0': 50000, 'f0': 0.25, 'x': 24, 'z': 4, 'u': 1, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50000.53, 'elapsed_seconds': 28, 'reference_seconds': 25.0, 'zero_day_offset': 0.04, 'relative_day': 0.28, 'inverse_tick': -4997629.0}), ({'d0': 50000, 'f0': 0.75, 'x': 24, 'z': 4, 'u': 4, 'S': 100, 'refpos': 'TOPOCENTER'}, {'absolute_day': 50001.87, 'elapsed_seconds': 112, 'reference_seconds': 75.0, 'zero_day_offset': 0.16, 'relative_day': 1.12, 'inverse_tick': -1249422.75})]}
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 elapsed seconds while other fields remain valid.

A FITS-like time coordinate stores integer reference day d0, fractional reference f0, tick x in units u seconds, TIMEZERO z in the same units, and day length S. Output day is d0+f0+(x+z)*u/S; no calendar, leap-second, or time-scale conversion is inferred. Output fields are defined by: absolute_day = d['d0']+d['f0']+(d['x']+d['z'])*d['u']/d['S']; elapsed_seconds = (d['x']+d['z'])*d['u']; reference_seconds = d['f0']*d['S']; zero_day_offset = d['z']*d['u']/d['S']; relative_day = (d['x']+d['z'])*d['u']/d['S']; inverse_tick = ((d['x']-d['d0']-d['f0'])*d['S'])/d['u']-d['z']

split: open-access