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
@@ -383,6 +383,17 @@ class PeakValues:
|
||||
long_peak_disp_in: Optional[float] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class SensorCheckResult:
|
||||
"""One channel's sensor check, as the unit stores it in the event file
|
||||
(2026-11-06). `result` is Blastware's word for it."""
|
||||
result: str # "Passed", "Check" or "Disabled"
|
||||
status: int # the unit's code: 0 passed; its bits are not decoded
|
||||
freq_hz: Optional[float] = None # geophone resonance / mic test frequency; None when Disabled
|
||||
ratio: Optional[float] = None # geophones only
|
||||
amplitude_mv: Optional[int] = None # the mic only
|
||||
|
||||
|
||||
# ── Project / operator metadata ───────────────────────────────────────────────
|
||||
|
||||
@dataclass
|
||||
@@ -592,6 +603,9 @@ class Event:
|
||||
# Raw ADC counts; the source series' scale differs but the trace is a
|
||||
# shape diagnostic (rendered fit-to-box). None when absent.
|
||||
sensor_check: Optional[dict] = None # {"Tran": [...], ..., "MicL": [...]}
|
||||
# And its results per channel, from the same records (2026-11-06): None
|
||||
# when the file's record chain is not whole.
|
||||
sensor_check_results: Optional[dict] = None # channel -> SensorCheckResult
|
||||
|
||||
# Where `timestamp` came from, when decoded from a Blastware binary
|
||||
# (event_file_io): "event_record" -- the instrument's own event record in
|
||||
|
||||
Reference in new issue
Block a user