v0.23.0 - ZC freq in events store #31

Merged
serversdown merged 5 commits from dev into main 2026-08-06 12:12:20 -04:00
Owner

v0.23.0 — 2026-08-04

Per-channel ZC frequency in the events store. The events table and the
/db/events feed now carry per-channel zero-crossing frequency, so consumers
(Terra-View's Vibration Summary) get frequency in bulk instead of one sidecar
fetch per event.

Added

  • events columns tran_zc_freq, vert_zc_freq, long_zc_freq, mic_zc_freq
    (Hz) + *_zc_above_range flags (the Blastware >N Hz device-ceiling case). Added
    via the existing incremental _migrate ADD COLUMN pass — auto-migrates on
    SeismoDb() construction, no manual migration
    . query_events / get_event
    (and thus /db/events) return them automatically (SELECT *).
  • Populated at ingest — PeakValues gains the ZC-freq fields; both
    apply_report_to_event and apply_bw_report_dict_to_event copy per-channel
    zc_freq_hz / zc_freq_above_range from the parsed report onto them, and
    insert_events persists them on INSERT and UPSERT.
  • Backfill scripts/backfill_event_zc_freq.py — fills the columns for existing
    events from their .sfm.json sidecars (idempotent, UPDATE-only).

Fixed

  • sfm/server.py app-version string was stale at 0.17.0; now tracks the real version.

Upgrade Notes

Run the backfill once after deploying, against the events DB + waveform store:
python3 scripts/backfill_event_zc_freq.py --db-path <seismo_relay.db> --store-root <waveforms/>
Events whose sidecar carries no frequency (or that have no sidecar) stay NULL and
render "—" downstream.

## v0.23.0 — 2026-08-04 **Per-channel ZC frequency in the events store.** The `events` table and the `/db/events` feed now carry per-channel zero-crossing frequency, so consumers (Terra-View's Vibration Summary) get frequency in bulk instead of one sidecar fetch per event. ### Added - **`events` columns** `tran_zc_freq`, `vert_zc_freq`, `long_zc_freq`, `mic_zc_freq` (Hz) + `*_zc_above_range` flags (the Blastware `>N Hz` device-ceiling case). Added via the existing incremental `_migrate` ADD COLUMN pass — **auto-migrates on `SeismoDb()` construction, no manual migration**. `query_events` / `get_event` (and thus `/db/events`) return them automatically (`SELECT *`). - **Populated at ingest** — `PeakValues` gains the ZC-freq fields; both `apply_report_to_event` and `apply_bw_report_dict_to_event` copy per-channel `zc_freq_hz` / `zc_freq_above_range` from the parsed report onto them, and `insert_events` persists them on INSERT and UPSERT. - **Backfill** `scripts/backfill_event_zc_freq.py` — fills the columns for existing events from their `.sfm.json` sidecars (idempotent, UPDATE-only). ### Fixed - `sfm/server.py` app-version string was stale at `0.17.0`; now tracks the real version. ### Upgrade Notes Run the backfill once after deploying, against the events DB + waveform store: `python3 scripts/backfill_event_zc_freq.py --db-path <seismo_relay.db> --store-root <waveforms/>` Events whose sidecar carries no frequency (or that have no sidecar) stay NULL and render "—" downstream.
serversdown added 5 commits 2026-08-06 12:11:39 -04:00
serversdown merged commit 5b65718b72 into main 2026-08-06 12:12:20 -04:00
Sign in to join this conversation.