feat(ingest): compute shape from the written .h5 in all save paths
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user