feat(decode_check): an OORANGE interval vector sum is saturation
Blastware prints OORANGE for an interval's vector sum when it exceeds the range in an interval where Blastware also clamped a channel: 17 / 17 DL2 cells, SFM's sum 10.01 .. 17.33 in/s (sqrt 3 x 10.005). The saturation carve-out now covers intervals.Geo PVS in/s with that rule, per interval, as it already did for PeakVectorSum. The 4 other cells left mismatching sit 4e-6 past a rounding boundary (Blastware's arithmetic is a hair lower) and stay mismatches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
1 parent
2b698e74cf
commit
13f2769736
4 files changed
+161
-2
No files matched your search
@@ -300,3 +300,28 @@ def test_blastwares_interval_frequency_words(halfp, sr, want):
|
||||
# below 1 Hz -- on ~3.1 M DL2 cells, 2026-11-03.
|
||||
from minimateplus.decode_check import interval_frequency
|
||||
assert interval_frequency(halfp, sr) == want
|
||||
|
||||
|
||||
def _pvs_oorange(unclamp=False):
|
||||
hb = FIX.parent / "histogram-intervals-11-03-26"
|
||||
ref = parse_xml_report_file(hb / "T190LD5Q_LD0H_XML.XML") # Geo PVS OORANGE, Vert OORANGE
|
||||
if unclamp:
|
||||
cols = ref.interval_columns
|
||||
t, row = ref.intervals[0]
|
||||
row = list(row)
|
||||
row[cols.index("Vert Peak in/s")] = "0.500"
|
||||
ref.intervals[0] = (t, row)
|
||||
res = {r.field: r for r in compare(sfm_side((hb / "T190LD5Q.LD0H").read_bytes()), ref, CARVEOUTS)}
|
||||
return res["intervals.Geo PVS in/s"]
|
||||
|
||||
|
||||
def test_an_oorange_interval_vector_sum_is_saturation():
|
||||
# Blastware prints OORANGE for an interval's vector sum above the range when
|
||||
# it clamped a channel in that interval: 17 / 17 DL2 cells, SFM's sum
|
||||
# 10.01 .. 17.33 (= sqrt 3 x 10.005).
|
||||
r = _pvs_oorange()
|
||||
assert (r.verdict, r.carveout) == ("accepted", "saturation")
|
||||
|
||||
|
||||
def test_an_oorange_vector_sum_needs_a_clamped_channel_in_that_interval():
|
||||
assert _pvs_oorange(unclamp=True).verdict == "mismatch"
|
||||
Reference in new issue
Block a user