From 621c836109fec6fba031380133fe9a259e3c1c67 Mon Sep 17 00:00:00 2001 From: serversdown Date: Fri, 20 Nov 2026 15:03:38 -0500 Subject: [PATCH] docs(changelog): Unreleased -- a Thor file's own settings, notes and time (#44, #45) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R9LdWawLzUxwewZGA1 --- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc5e3ed..b809755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,55 @@ All notable changes to seismo-relay are documented here. - `scripts/test_thor_render.py`: a one-off re-import. - `scratch/next_experiment_skeleton.py`: early codec scaffolding. +### Fixed +- **A Thor (Micromate) file's own settings, notes and time are read from it + (#44, #45; `fix/idf-file-metadata`, merged 2026-11-20).** Measured + 2026-11-20. + - **The bug:** a Micromate event read without Thor's report (SFM's own + downloads) stored a sample rate, pre-trigger and record time of 0 and + empty notes, and `read_idf_file` dated it 1970-01-01. Every Micromate + `.h5`, report or not, stored a pre-trigger of 0. + - **Why:** + - The settings were found by the bytes `be 80 00 00 00 00`. Those are a + −0.25 s pre-trigger and Fixed stop mode, not a marker, so any other + pre-trigger left the settings unread. + - The notes were never read. + - The time came from two fixed offsets that one header shape misses. + - `to_minimateplus_event` never set the pre-trigger in samples. + - **Now:** + - The event's settings record is found by its signature `00 2a 04 00 00`, + with fields at the offsets of the live `0x1A` block's head. + - The time is read at record + 0x34, and the four notes at 0x23c. + - `pretrig_samples` = pre-trigger × sample rate. + - `save_imported_idf` fills the pre-trigger and notes from the file when + the report lacks them. + - **Measured against Thor's own reports** on 2,027 corpus files: + - sample rate and notes: 2,027 / 2,027 + - record time and pre-trigger: 291 / 291 waveforms. The report rounds the + pre-trigger to 0.01 s; the file has the event's exact value. + - event time equals the filename's: 2,384 / 2,384 + - the issues' 20 UM12947 bench files now store 4096 S/s, 4,096 + pre-trigger samples (1.0 s), 3 s and their notes + - The MiniMate half of #44 / #45 was fixed in v0.33.0, re-measured on the + 20 BE9441 bench files. + - A histogram's settings record holds no record time or pre-trigger: its + `[18:22]` varies file to file. A report-less histogram now stores none, + instead of that value. + - ⚠ **Operational:** codec change. + - The next release bumps `TOOL_VERSION`, then runs + **`scripts/backfill_thor_events.py`**. `backfill_sidecars.py` skips + Thor files. + - Every stored Micromate `.h5` gains its pre-trigger in samples (it was 0). + Report-paired events take it from the report's rounded value; their + other fields are unchanged. + - No schema change, no migration. Prod's Micromate events all arrive with + a report, so only the `.h5` pre-trigger changes there. + +### Protocol / Documentation +- **IDF reference, Signature A:** the event's settings record, time and notes, + measured; the `be 80…` search retracted. Thor writes `.MLG` files too (seen, + not examined). + ## v0.35.0 — 2026-11-16 **The file-only decode reaches 80 of Blastware's 88 report fields, and SFM