• serversdown released this 2026-11-16 15:50:19 -05:00 | 0 commits to main since this release

    v0.35.0: 80 of Blastware's 88 report fields from the file, and monitor logs (.MLG)

    Three lines of work ship together. The full detail is in CHANGELOG.md → v0.35.0.

    The file-only decode, groups D (part 2), E and F

    • 80 of Blastware's 88 report fields now match on every DL2 event (47 at v0.34.0). The last 16 values, in two causes, are left as they are by decision.
    • New, from the unit's own records:
      • ZC frequency, displacement and times of peak
      • the sensor check results
      • the Monitor Log line
      • over range (OORANGE)
    • Fixed:
      • a range-1 mic read 8× high (7 DL2 events)
      • the mic dB offset
      • a unit without a mic lost its sensor-check traces

    Monitor logs (.MLG)

    • SFM reads Blastware's .MLG files: the format is measured, each record's CRC is verified, and real files rebuild byte for byte.
    • It keeps each unit's monitoring timeline and answers "was unit X monitoring at T" for shot reports.
    • New: tables mlg_files and mlg_records; routes POST /db/import/mlg_file, GET /db/units/{serial}/timeline, /monitoring_at, /db/mlg_records, /db/mlg_files/{id}; and scripts/import_mlg_dir.py.
    • Nothing flows in until the watcher forwards .MLGs or they are bulk-imported.

    An escaped checksum is the checksum, not data. SFM's live reads no longer carry a stray byte.

    Fixes #58

    Deploy

    ⚠ A backfill, about 8 hours on the NAS, and two new empty tables on first start. There is no migration, and no stored event time moves. This has not been rehearsed on a prod snapshot.

    1. Back up seismo_relay.db.
    2. Deploy. TOOL_VERSION is 0.35.0 and gates the regeneration, so no --force is needed.
    3. In the sfm container: python scripts/backfill_sidecars.py.
    4. Then: python scripts/backfill_event_shape.py --db-path bridges/captures/seismo_relay.db --store-root bridges/captures/waveforms.
    5. Optional, any time after: scripts/import_mlg_dir.py on a robocopy copy of DL2's C:\Blastware 10\Event\autocall home, with --dry-run first.

    What changes in Terra-View (no Terra-View change is needed):

    • Report-less events gain a ZC frequency.
    • The range-1 mic values drop 8×.

    Tests

    dev at c2b8e76: 1,787 passed, 20 skipped, 0 failed (pytest -q on the dev box).

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01ALX2R9LdWawLzUxwewZGA1

    Downloads
  • serversdown released this 2026-11-04 18:20:24 -05:00 | 51 commits to main since this release

    SFM reaches Series-4 parity, and reads most of Blastware's report from the event file alone.

    What changes

    Series-4 parity (feat/series4-sfm-parity). One device door, by serial, for both series. Each change is audited, identity-checked, sent once and read back. Benched on BE9441 and UM20147.

    • reads and downloads
    • start / stop monitoring
    • call-home on / off
    • settings changes: preview → send → read back

    It also fixes MiniMate request framing (#46) and the 5A walk across a unit's 64 KB page.

    The file-only decode, groups A–D. 47 of Blastware's 88 report fields now match on every DL2 event, about 6 before v0.33.0. Eight more match on all but one or two of 6,524 waveforms.

    • Fixed:
      • Sensitive-range events no longer read 8× high
      • the histograms that decoded wrongly now decode
      • histograms are no longer a day late
      • every histogram's start and stop are Blastware's own (#51)
      • interval frequencies follow the sample rate (#50)
    • New from the file:
      • the job number
      • the unit's serial, version, calibration and battery
      • the trigger source and levels
      • each interval's frequencies, vector sum and time
      • the peak dates and times
      • a waveform's time of peak and peak acceleration
    • Events are identified by unit + time + type (UNIQUE(serial, timestamp, record_type)), so a waveform and its histogram may share a second.

    Prod still overlays a paired ASCII report onto the decode. Retiring that overlay is the plan's step 3, not part of this release.

    Verified

    • Decode checker, all 70,112 DL2 event files: every fix proven by a full run with 0 regressions. After the parity merge, the run matches pre-parity dev on every verdict of every event.
    • Migration and backfills rehearsed twice on a copy of prod's 2026-09-30 snapshot (15,432 events), before and after the parity merge, with identical results:
      • migration: every row identical, integrity ok
      • backfill_sidecars.py: 11,944 files, 0 errors; 9,852 Series-3 histograms moved +1 s in place, 0 refused, no id lost, review state untouched; the 209 same-second waveform/histogram pairs now coexist
      • backfill_event_shape.py: exit 0, cleared_stale 0
    • Suite: 16 known failures, 1,566 passed.

    Deploy

    ⚠ Schema migration plus an overnight backfill. Full notes are in CHANGELOG Migration.

    1. Back up seismo_relay.db.
    2. Deploy. SFM migrates by itself on first start: it re-keys events and creates device_commands.
    3. In the sfm container, run python scripts/backfill_sidecars.py. TOOL_VERSION 0.34.0 gates it, so no --force. ⚠ About 64,000 events, roughly 12 h on the NAS. It moves every Series-3 histogram time +1 s in place.
    4. Then run python scripts/backfill_event_shape.py --db-path bridges/captures/seismo_relay.db --store-root bridges/captures/waveforms.

    Terra-View needs no change: twins pair by peak values, and rows are read by id.

    Fixes #46
    Fixes #50
    Fixes #51

    #44 and #45 stay open for their Micromate half (no closing statement recorded yet). #48 stays open.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9

    Downloads
  • serversdown released this 2026-11-01 14:36:27 -05:00 | 297 commits to main since this release

    This one fixed a bunch of bandaids we were using to properly display data from BW events forwarded to SFM. Everything now is written by from information contained within the binary files. SFM can now make binary files that are compatible with BW without using a forwarded BW created event!

    #56 See this here PR for more info!

    Downloads
  • serversdown released this 2026-10-27 11:02:29 -04:00 | 332 commits to main since this release

    v0.32.0: event times you can trust, and Series 4 mapped

    Release PR, dev → main. The full notes are in CHANGELOG.md under v0.32.0 — 2026-10-27; this is the summary.

    What ships

    Correct stored data

    • Series-3 waveform event times come from the instrument's own event record, which the unit sends inside its 5A stream.
      • They were the monitoring-session start, often hours off (#43).
      • The new time matches Blastware's report on 1,320/1,320, the filename on 7,935/7,935, and the unit's 0C record on 10/10.
      • No filename is needed: it's only a cross-check.
      • Without a validated record, the event is kept with a flagged estimate that can never move, merge into or duplicate a row.
      • Series-III reference §7.8.9.
    • Re-storing an event at its corrected time moves its row in place (same id, review kept), instead of inserting a duplicate.
    • Prod's ISO-dated Blastware reports are read. Their event time is used only where no record exists.
    • Sub-minute histograms recorded with the mic off now decode, and mic-on ones are read correctly (#47, #49).
    • Micromate .h5 samples are on Thor's own scale (#42, already closed).

    Series IV (no shipped code path changes): the live wire protocol is mapped, with a read-only client and the setup decoded. Plus the SFM webapp's Diagnostics tab.

    ⚠ Deploy: owes a backfill, and moves stored waveform times

    TOOL_VERSION is 0.32.0. Back up seismo_relay.db first. Then, in the sfm container:

    1. python scripts/backfill_sidecars.py --force --reparse-txt (~2 h on the NAS; --reparse-txt is required the first time)
    2. python scripts/backfill_thor_events.py
    3. python scripts/backfill_event_shape.py --db-path bridges/captures/seismo_relay.db --store-root bridges/captures/waveforms

    Rehearsed on prod's 2026-09-30 store snapshot (11,827 Series-3 files, stored with v0.31.0 as the watcher does, then step 1):

    • waveforms on Blastware's exact time went from 1,016 to 1,394 of 1,394 (373 had been hours off, up to 14.3 h);
    • every row id kept; none lost or merged; 0 errors;
    • histograms don't move (#51).

    One known pre-existing extra row is added (#52). Terra-View needs no change, but it will show the corrected times: some events land on a different day or deployment window.

    Verification

    • Tests: suite on dev 582 passed. The 16 failures are the same tests with byte-identical reasons as before this release's changes: 15 missing fixtures in test_bw_ascii_report, 1 in test_event_file_io.
    • Archive: the DL2 archive harness is still 14,338/14,338.
    • Raw bytes, no names: 7,961/7,961 waveforms decode on the event record, with 0 disagreements against filename or report.
    • Merge: dev merges into main with no conflicts.

    Issues

    Fixes #47
    Fixes #49

    Addresses #43. That event (N844LTF1.QB0W) isn't on the dev box; its symptom (06:00:13) is the BE12844 session-start case this release corrects. Verify it after the deploy, then close.

    Follow-ups, not in this release: #51 (histogram times need the events key changed), #52 (restamp follow-ups), #53 (Series-III binary audit), #46 (MiniMate config-write escaping).

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL

    Downloads
  • serversdown released this 2026-08-28 22:41:40 -04:00 | 507 commits to main since this release

    Stable release with the s3 decoders adjusted. now accurate. s4 still need work tho

    Downloads