feat(decode): over range inside a histogram's intervals, as in the event
Inside an interval the rule is the event's: a peak past 2,000 units (the mic in counts) is Blastware's OORANGE, and the interval's vector sum is OORANGE when any geophone is. DL2 (2026-11-09): numeric up to 1,846 (geophones) / 1,414 (mic), OORANGE from 2,001; vector sums 16 / 16 OORANGE with a geophone over, 2,862 / 2,862 numeric without. event_file_io.over_full_scale(count, channel); the checker renders those interval cells as OORANGE. The saturation carve-out compares SFM's own words properly (_differs): an OORANGE from SFM never counts as saturation, and an OORANGE equal to Blastware's is not a difference. Its interval tests run on the numeric values it used to see. 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
836c9e864b
commit
e25784d9db
4 files changed
+54
-10
No files matched your search
@@ -329,7 +329,11 @@ def _pvs_oorange(unclamp=False):
|
||||
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)}
|
||||
side = sfm_side((hb / "T190LD5Q.LD0H").read_bytes())
|
||||
# The carve-out's own path: SFM's numeric interval sums, as before it
|
||||
# rendered OORANGE itself (2026-11-09).
|
||||
side.interval_values["Geo PVS in/s"] = list(side.event.interval_pvs)
|
||||
res = {r.field: r for r in compare(side, ref, CARVEOUTS)}
|
||||
return res["intervals.Geo PVS in/s"]
|
||||
|
||||
|
||||
@@ -341,6 +345,24 @@ def test_an_oorange_interval_vector_sum_is_saturation():
|
||||
assert (r.verdict, r.carveout) == ("accepted", "saturation")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path,columns", [
|
||||
# a Vert interval past full scale: its peak and the interval's vector sum
|
||||
(FIX.parent / "histogram-intervals-11-03-26" / "T190LD5Q.LD0H", ("Vert Peak in/s", "Geo PVS in/s")),
|
||||
# a mic interval past full scale (2,001 counts)
|
||||
(FIX.parent / "over-range-11-09-26" / "K558KD43.NZ0H", ("MicL Peak dB(L)", "MicL Peak psi(L)")),
|
||||
])
|
||||
def test_interval_over_range_matches_blastware(path, columns):
|
||||
# Inside an interval the rule is the event's: a peak past 2,000 units (the
|
||||
# mic in counts) is OORANGE, and the vector sum when any geophone is. DL2:
|
||||
# numeric up to 1,846 / 1,414, OORANGE from 2,001; vector sums 16 / 16
|
||||
# OORANGE with a geophone over, 2,862 / 2,862 numeric without (2026-11-09).
|
||||
ref = parse_xml_report_file(path.with_name(path.name.replace(".", "_", 1) + "_XML.XML"))
|
||||
res = {r.field: r for r in compare(sfm_side(path.read_bytes()), ref, CARVEOUTS)}
|
||||
for c in columns:
|
||||
if c in (ref.interval_columns or []):
|
||||
assert res[f"intervals.{c}"].verdict == "match", (c, res[f"intervals.{c}"])
|
||||
|
||||
|
||||
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