text
string
/verifier/test_outputs.py:422: AssertionError
________________ test_block_frequency_reduction_matches_counts _________________
def test_block_frequency_reduction_matches_counts():
got, ref = agent_blocks(), reference()["blocks"]
assert list(got[0]) == [
"run_id",
"block_id",
"t_s",
"freq_R_hz",
"freq_L_hz",
"freq_bar_hz",
"sigma_bar_hz",
"field_gauss",
"axial_khz",
"zeeman_correction_hz",
"quadrupole_correction_hz",
"corrected_hz",
]
failures = []
for index, (actual, expected) in enumerate(zip(got, ref, strict=True)):
if actual["run_id"] != expected["run_id"]:
failures.append(f"row {index}: run_id")
continue
if int(float(actual["block_id"])) != expected["block_id"]:
failures.append(f"row {index}: block_id")
for key in ("freq_R_hz", "freq_L_hz", "freq_bar_hz", "corrected_hz"):
if abs(float(actual[key]) - expected[key]) > 0.15:
failures.append(f"row {index}: {key}")
if not (
0.45 * expected["sigma_bar_hz"]
<= float(actual["sigma_bar_hz"])
<= 2.2 * expected["sigma_bar_hz"]
):
failures.append(f"row {index}: sigma_bar_hz")
for key, tolerance in (
("field_gauss", 2e-5),
("axial_khz", 0.025),
("zeeman_correction_hz", 0.00025),
("quadrupole_correction_hz", 0.003),
):
if abs(float(actual[key]) - expected[key]) > tolerance:
failures.append(f"row {index}: {key}")
> assert not failures, "block reduction mismatch:\n" + "\n".join(failures[:40])
E AssertionError: block reduction mismatch:
E row 0: freq_bar_hz
E row 0: corrected_hz
E row 1: freq_bar_hz
E row 1: corrected_hz
E row 2: freq_bar_hz
E row 2: corrected_hz
E row 3: freq_bar_hz
E row 3: corrected_hz
E row 4: freq_bar_hz
E row 4: corrected_hz
E row 4: quadrupole_correction_hz
E row 5: freq_bar_hz
E row 5: corrected_hz
E row 6: freq_bar_hz
E row 6: corrected_hz
E row 7: freq_bar_hz
E row 7: corrected_hz
E row 8: freq_bar_hz
E row 8: corrected_hz
E row 9: freq_bar_hz
E row 9: corrected_hz
E row 10: freq_bar_hz
E row 10: corrected_hz
E row 11: freq_bar_hz
E row 11: corrected_hz
E row 12: freq_bar_hz
E row 12: corrected_hz
E row 13: freq_bar_hz
E row 13: corrected_hz
E row 14: freq_bar_hz
E row 14: corrected_hz
E row 15: freq_bar_hz
E row 15: corrected_hz
E row 16: freq_bar_hz
E row 16: corrected_hz
E row 17: freq_bar_hz
E row 17: corrected_hz
E row 18: freq_bar_hz
E row 18: corrected_hz
E row 19: freq_bar_hz
E assert not ['row 0: freq_bar_hz', 'row 0: corrected_hz', 'row 1: freq_bar_hz', 'row 1: corrected_hz', 'row 2: freq_bar_hz', 'row 2: corrected_hz', ...]
/verifier/test_outputs.py:486: AssertionError
___________________ test_hourly_bins_are_weighted_reductions ___________________
def test_hourly_bins_are_weighted_reductions():
got, ref = agent_hourly(), reference()["hourly"]
assert list(got[0]) == [
"run_id",
"hour_index",
"t_s",
"corrected_hz",
"sigma_hz",
"n_blocks",
]