merge: dev into feat/series4-sfm-parity -- the geophone range from the file, and v0.33.0

Brings 057df47 (fix 4844135, changelog be58b4f) from the decode checker's branch
-- Event.geo_range from the file's setup channel block (label+29: 0 Normal,
1 Sensitive, None not read), peaks and histogram PVS scaled by it,
write_event_hdf5(geo_range=None) using it -- and dev's v0.33.0 release commit
(6c7c6b0).

Conflicts, resolved as agreed with the decode session:
- sfm/waveform_store.py save_imported_bw: dev dropped the forced
  geo_range="normal"; this branch keeps its geo_range parameter, now
  Optional, default None -- an import uses the file's own range, an explicit
  value (a live download's) still wins.
- CLAUDE.md: dev's newer 'Where things stand (updated 2026-11-01)' date.

Measured on the merged tree: K557J1KB.RQ0W (Sensitive waveform) decodes
0.019 / 0.055 / 0.019, PVS 0.061 -- Blastware's report -- and its imported
.h5 peaks 0.0194 / 0.055 / 0.0194 (forcing 'normal' gives 8x: 0.155 / 0.44).
M010HR6K.OA0H (Sensitive histogram) likewise.  The live path still passes the
unit's 1A range or 'normal' when unread -- unchanged by this merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-02 12:06:35 -05:00
commit d0c14aaec8
17 files changed
+3724 -62

No files matched your search

+31 -25
View File
@@ -2,7 +2,7 @@
Ground-up Python replacement for **Blastware**, Instantel's Windows-only software for
managing MiniMate Plus seismographs. Connects over direct RS-232 or cellular modem
(Sierra Wireless RV50 / RV55). Current version: **v0.32.0**.
(Sierra Wireless RV50 / RV55). Current version: **v0.33.0**.
Stack-level context — which repo owns what, and how the three project versions
pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as
@@ -10,36 +10,42 @@ pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as
---
## Where things stand (updated 2026-10-26)
## Where things stand (updated 2026-11-01)
Read this first when picking the project back up.
- **🔑 The Series-3 decode checker (2026-10-29).** Goal: SFM produces everything
Blastware reports, from the event file alone (spec/plan in `docs/superpowers/`).
Run it with `scratch/check_s3_decode.py ~/dl2-archive/files ~/dl2-archive/xml`.
It decodes each event from its bytes only (no filename, no report) and
compares every field, sample and interval with Blastware's `_XML.XML`: 70,042
events, 2016–2026, ~22 min at `--jobs 4`. Run output (`summary.md`,
`details.json`, `changes.md`) goes to `~/dl2-archive/checker-runs/` and is
never committed. The rule: every mismatch is SFM's bug unless a carve-out
with evidence covers it.
**First full run:**
- ✅ Sample rate, record time, pre-trigger and notes match everywhere.
- ✅ Geophone samples are exact on 6,491 / 6,524 waveforms in every year. The
33 others are the 1.250 in/s range, 8× under SFM's Normal-range assumption.
- ❌ Every histogram reads as a waveform without its filename (#41), and
their start times are 1 s early (#51).
- ❌ Open findings:
- histogram PVS: SFM takes the vector magnitude of each channel's interval
peak (peaks that may come from different moments); Blastware takes the
per-interval vector sum
- mic psi conversion
- mic dB off by 0.05–0.1 on ~1,000 events
- **🔑 The Series-3 decode checker (2026-10-29; v0.33.0).**
- **Goal:** SFM produces everything Blastware reports, from the event file
alone (spec and plan in `docs/superpowers/`).
- **Running it:** `scratch/check_s3_decode.py ~/dl2-archive/files
~/dl2-archive/xml` decodes each event from its bytes only (no filename, no
report). It compares every field, sample and interval with Blastware's
`_XML.XML`: 70,042 events, 2016–2026, ~22 min at `--jobs 4`.
- **Output** (`summary.md`, `details.json`, `changes.md`) goes to
`~/dl2-archive/checker-runs/` and is never committed.
- **The rule:** every mismatch is SFM's bug unless a carve-out with evidence
covers it.
**As of v0.33.0:**
- ✅ **Match on every event:** sample rate, record time, pre-trigger, notes,
and event type (#41, from STRT[18]).
- ✅ **Geophone samples** are exact on 6,491 / 6,524 waveforms in every year.
The 33 others are the 1.250 in/s range, 8× under SFM's Normal-range
assumption.
- ✅ **Histogram PVS** = the stored per-interval PVS²: 69,919 / 70,042.
- ✅ **Mic: one count = 0.25 Pa,** with Blastware's dB offset at 81.9384. It
fails on only a few dozen events.
- ❌ **Open:**
- histogram start times are 1 s early (#51)
- 35 sub-minute (5 s / 2 s) histograms decode wrongly, plus 2 one-minute
no-mic histograms (`R352HFZ7`-shaped, likely a separate cause)
- 26 histogram start dates are a day off
- ⬜ Not read yet: job number, ZC frequency, acceleration, displacement, time
of peak, sensor check, battery, calibration, range, units, monitor log.
- the per-interval PVS is not stored
- Blastware prints `OORANGE` when the vector sum alone exceeds the range
(a carve-out to prove)
- ⬜ **Not read yet:** job number, ZC frequency, acceleration, displacement,
time of peak, sensor check, battery, calibration, range, units, monitor
log.
- **The Series-4 LIVE wire protocol is reverse-engineered end to end
(2026-09-25).** `docs/micromate_protocol_reference.md` is the Series-4
Rosetta Stone, sibling to `instantel_protocol_reference.md`. **A Micromate