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

+6 -1
View File
@@ -180,7 +180,7 @@ def write_event_hdf5(
event: Event,
*,
serial: str,
geo_range = "normal",
geo_range = None,
source_kind: str = "sfm-live",
tool_version: Optional[str] = None,
captured_at: Optional[datetime.datetime] = None,
@@ -190,6 +190,9 @@ def write_event_hdf5(
"""
Persist a decoded Event as an HDF5 file with samples in physical units.
``geo_range`` left as None takes the event's own (``event.geo_range``,
which a Blastware file's decode reads from its setup block), else Normal.
``geo_ips_per_count`` overrides the range-derived MiniMate count scale
for sources whose counts differ — Thor IDF imports pass
``micromate.idf_file._GEO_LSB_IPS`` (issue #42).
@@ -202,6 +205,8 @@ def write_event_hdf5(
pv = event.peak_values
pi = event.project_info
if geo_range is None:
geo_range = event.geo_range if getattr(event, "geo_range", None) is not None else "normal"
geo_fs = _resolve_geo_full_scale(geo_range)
geo_range_str = _normalise_range(geo_range)
captured_at = captured_at or datetime.datetime.utcnow()
+4 -3
View File
@@ -298,7 +298,7 @@ class WaveformStore:
serial_hint: Optional[str] = None,
bw_report_text: Optional[Union[str, bytes]] = None,
source_kind: str = "bw-import",
geo_range: Union[str, int] = "normal",
geo_range: Optional[Union[str, int]] = None,
) -> tuple[Event, dict]:
"""
Ingest a Blastware event file produced by an external tool
@@ -417,8 +417,9 @@ class WaveformStore:
event_hdf5.write_event_hdf5(
hdf5_path, ev,
serial=serial,
# The BW file doesn't carry the range (yet); an import assumes Normal,
# a live download passes the unit's own (event_ingest).
# None (an import): the event's own range, read from the file's
# setup (ev.geo_range), else Normal. An explicit value -- a live
# download's (event_ingest) -- wins.
geo_range=geo_range,
source_kind="bw-import",
)