feat(ingest): compute shape from the written .h5 in all save paths

This commit is contained in:
2026-08-22 06:01:43 +00:00
parent 54c4182023
commit e64e3bcd3e
2 changed files with 38 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from pathlib import Path
from sfm.waveform_store import WaveformStore
_FIX = Path(__file__).parent / "fixtures/histogram-extension-re/events-5-21-26/K558LL8B.7I0W"
def test_save_imported_bw_attaches_shape(tmp_path):
store = WaveformStore(tmp_path / "waveforms")
ev, rec = store.save_imported_bw(_FIX.read_bytes(), source_path=_FIX, serial_hint="BE9558")
assert rec.get("shape_axis") in ("Tran", "Vert", "Long")
assert rec["shape_crest_factor"] > 0
assert rec["shape_sample_count"] > 200