feat(decode): histogram interval times and peak times (#51 group C)
With the start right, the rest of Blastware's histogram timing follows, measured on a 2,000-histogram DL2 sample: - each interval's printed time is its end, start + (i + 1) x interval, capped at the stop: 2,308,524 / 2,308,524 rows (event_file_io.interval_times) - each of Tran / Vert / Long / PVS / MicL's peak date and time is that of the interval holding its first maximum: 2,000 / 2,000 each. The checker compares intervals.Time and the ten peak date/time fields. 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
a9bb9f08c0
commit
9cfa82117b
3 files changed
+59
-3
No files matched your search
@@ -325,3 +325,21 @@ def test_an_oorange_interval_vector_sum_is_saturation():
|
||||
|
||||
def test_an_oorange_vector_sum_needs_a_clamped_channel_in_that_interval():
|
||||
assert _pvs_oorange(unclamp=True).verdict == "mismatch"
|
||||
|
||||
|
||||
_PEAK_TIMES = ("TranPeakDate", "TranPeakTime", "VertPeakDate", "VertPeakTime", "LongPeakDate",
|
||||
"LongPeakTime", "PeakVectorSumDate", "PeakVectorSumTime", "MicLDate", "MicLTime")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path", [FIX / "T004JTRF.ME0H", # 1 interval
|
||||
FIX.parent / "footer-11-03-26" / "T003LCYV.JD0H", # 145
|
||||
FIX.parent / "histogram-decode-11-02-26" / "K440HA3C.JM0H"]) # 8 x 5 s
|
||||
def test_histogram_times_match_blastware(path):
|
||||
# #51: an interval's printed time is its end -- start + (n + 1) x interval,
|
||||
# capped at the stop -- and each peak's date and time are its interval's:
|
||||
# 2,308,524 / 2,308,524 rows and 2,000 / 2,000 peaks each on a DL2 sample.
|
||||
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 f in (("HistogramStartDate", "HistogramStartTime", "HistogramStopTime", "intervals.Time")
|
||||
+ tuple(t for t in _PEAK_TIMES if t in ref.scalars)):
|
||||
assert res[f].verdict == "match", (f, res[f])
|
||||
Reference in new issue
Block a user