fix(sensor-check): a unit without a mic keeps its three geophone traces

The trace decoder required all four records 0x3c-0x3f, so BE16352 (no
mic: 0x3c-0x3e only, all 8 of its DL2 events) got no sensor-check traces
at all.  The three geophone records, chained by their length prefixes,
are now enough.  The .h5 writer already stores a three-channel set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-06 13:00:16 -05:00
1 parent f7b310b130
commit f222ea9e80
2 files changed
+19 -8

No files matched your search

+11
View File
@@ -65,3 +65,14 @@ def test_mic_channel_is_a_pulse_train():
def test_returns_empty_when_no_sensor_check_block():
assert decode_sensor_check(b"not a blastware file") == {}
assert decode_sensor_check(b"") == {}
def test_a_unit_without_a_mic_has_its_three_geophone_traces():
# BE16352 records no mic: its chain carries 0x3c-0x3e only (all 8 of its
# DL2 events, 2026-11-06), and the three ring-downs were being dropped.
raw = (Path(__file__).parent / "fixtures" / "decode-checker-10-29-26" / "R352HFZ7.530H").read_bytes()
sc = decode_sensor_check(raw)
assert set(sc) == {"Tran", "Vert", "Long"}
for ch in ("Tran", "Vert", "Long"):
tr = np.asarray(sc[ch], dtype=float)
assert len(tr) > 200 and tr.min() < -500, (ch, len(tr), tr.min())