feat(decode): sensor check results from the unit's own records (group E)
The record chain that starts with the embedded event record runs to the file's end on all 70,041 DL2 files: the event record 0x05, the unit's summary 0x32-0x35, its sensor checks 0x3c-0x3f, then the footer 0x0e (no 0x35 / 0x3f on a unit without a mic, 8 files). _record_chain walks it and refuses a chain that does not end exactly at the file's end; the unit's summary is now read from it too. Each sensor-check record's header holds the results (DL2, 2026-11-06): [2] channel type (1 geophone, 2 mic, 0 disabled), [4] status (0 = passed), [5:7] frequency x 10, [7:9] ratio x 10, [9:11] amplitude mV. Blastware prints them as they are: 209,943 / 209,943 geophone frequencies and ratios, 69,975 / 69,975 mic frequencies and amplitudes; "Passed" on status 0, "Check" on every other (its bits not decoded: a Check can sit inside every passing range), "Disabled" on type 0. Event.sensor_check_results: channel -> SensorCheckResult (result, status, freq_hz, ratio, amplitude_mv). The checker compares them. Behaviour change: an unknown id inside an intact chain now leaves only that record unread (was: everything after it). 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
d2fe675650
commit
f7b310b130
7 files changed
+4158
-30
No files matched your search
@@ -157,6 +157,13 @@ def sfm_side(raw: bytes) -> SfmSide:
|
||||
("LongZCFreq", pv.long_zc_freq), ("MicLZCFreq", pv.mic_zc_freq)):
|
||||
if hz is not None:
|
||||
values[tag] = "<1.0" if hz < 1.0 else hz
|
||||
# The unit's sensor check (2026-11-06), every record type.
|
||||
for ch, r in (ev.sensor_check_results or {}).items():
|
||||
values[f"{ch}TestResults"] = r.result
|
||||
for tag, value in (("TestFreq", r.freq_hz), ("TestRatio", r.ratio),
|
||||
("TestAmplitude", r.amplitude_mv)):
|
||||
if value is not None:
|
||||
values[f"{ch}{tag}"] = value
|
||||
if counts["MicL"]:
|
||||
values["MicLPSPL dB(L)"] = mic_count_to_db(max(abs(c) for c in counts["MicL"]))
|
||||
values["MicLPSPL psi(L)"] = pv.micl if pv is not None else None
|
||||
|
||||
Reference in new issue
Block a user