.h5 pre-trigger, record time and note fields are wrong or empty for the same files as #44 #45

Open
opened 2026-10-26 14:22:11 -04:00 by serversdown · 4 comments
Owner

Summary

The same 40 events as #44 also have wrong or empty pre-trigger, record time and note fields in their .h5 and sidecars:

pretrig_samples rectime_seconds project / client / operator / location
MiniMate BE9441 (bw-import) 66–74 (real 1024: 0.25 s at 4096) 70 (real 5 s) empty
Micromate UM12947 (SFM download) 0 (real 4096: 1.0 s) 0 (real 3 s) empty

Re-checked on origin/feat/series4-sfm-parity at 465bc70:

  • read_blastware_file gives a pre-trigger of 74;
  • read_idf_file gives pre_trigger_sec, record_time_sec and every project_info field as None.

How the real values are known

  • Record lengths: 21,504 samples = 0.25 s + 5 s at 4096 (MiniMate); 16,384 = 1 s + 3 s (Micromate).
  • Pre-trigger difference: on all 20 thumps, the Micromate's record starts 0.750 s before the MiniMate's (tmi-seismo's comparison, aligned by cross-correlation). That is the difference between a 1.0 s and a 0.25 s pre-trigger.
  • The MiniMate Plus pre-trigger is fixed at 0.25 s (716U0101 Rev 15, specifications).

The note text is in the binaries

  • BE9441's files contain "TestUnit-Minimate", "Test unit 1", "Terra-Mechanics Inc. - Harrison" and "Standard Recording Setup.set".
  • UM12947's contain "Test Unit 2", "Location", "Operator", "Company" and "thump.MMB".
  • The Micromate's event list (GET /device/events?serial=UM12947) did return setup: "Test Unit 2" and sensor_location: "Location" in detail. The stored .h5 and sidecar have them empty.

A pointer

The Unreleased changelog's timestamp fix (#43) reads the MiniMate's record time as a big-endian float32 in the recording-setup config block, 30 bytes before the Standard Recording Setup marker. The same value could fill rectime_seconds for a bw-import.

Evidence

The same files as #44: tmi-seismo c0b6390, bench/data/2026-10-25_phase2_garage/unit-originals/.

## Summary The same 40 events as #44 also have wrong or empty pre-trigger, record time and note fields in their `.h5` and sidecars: | | `pretrig_samples` | `rectime_seconds` | project / client / operator / location | |---|---|---|---| | MiniMate BE9441 (bw-import) | 66–74 (real 1024: 0.25 s at 4096) | 70 (real 5 s) | empty | | Micromate UM12947 (SFM download) | 0 (real 4096: 1.0 s) | 0 (real 3 s) | empty | Re-checked on `origin/feat/series4-sfm-parity` at `465bc70`: - `read_blastware_file` gives a pre-trigger of 74; - `read_idf_file` gives `pre_trigger_sec`, `record_time_sec` and every `project_info` field as None. ## How the real values are known - **Record lengths:** 21,504 samples = 0.25 s + 5 s at 4096 (MiniMate); 16,384 = 1 s + 3 s (Micromate). - **Pre-trigger difference:** on all 20 thumps, the Micromate's record starts 0.750 s before the MiniMate's (tmi-seismo's comparison, aligned by cross-correlation). That is the difference between a 1.0 s and a 0.25 s pre-trigger. - **The MiniMate Plus pre-trigger is fixed at 0.25 s** (716U0101 Rev 15, specifications). ## The note text is in the binaries - BE9441's files contain "TestUnit-Minimate", "Test unit 1", "Terra-Mechanics Inc. - Harrison" and "Standard Recording Setup.set". - UM12947's contain "Test Unit 2", "Location", "Operator", "Company" and "thump.MMB". - The Micromate's event list (`GET /device/events?serial=UM12947`) did return `setup: "Test Unit 2"` and `sensor_location: "Location"` in `detail`. The stored `.h5` and sidecar have them empty. ## A pointer The Unreleased changelog's timestamp fix (#43) reads the MiniMate's record time as a big-endian float32 in the recording-setup config block, 30 bytes before the `Standard Recording Setup` marker. The same value could fill `rectime_seconds` for a bw-import. ## Evidence The same files as #44: tmi-seismo `c0b6390`, `bench/data/2026-10-25_phase2_garage/unit-originals/`.
serversdown added the Kind/Bug
Priority
Low
4
labels 2026-10-26 14:22:11 -04:00
Author
Owner

Series-3 half fixed on dev (merge 42fe35f, fix b4706a3). Ships in the next release. This issue stays open for the Micromate half.

What the wrong values were (measured)

  • Record time "70": that byte is STRT[18], the record-type marker (0x46 for a waveform, 0x0A for a histogram), not a record time.
  • Pre-trigger and sample count: these came from STRT bytes [16:18] and [8:10], and neither field is either value.
  • Blank notes: the reader stopped at the NUL that follows each label.

Where the real values are (measured)

All of these are in the recording-setup block, at offsets from the start of the setup's name (see #44 for how the name is found):

Field Location Verified against Blastware's _XML.XML reports (DL2, 2016–2026)
Record time f32 BE at name − 30 6,524 / 6,524 waveforms
Pre-trigger f32 BE at name − 36. It is the exact value Blastware prints, −0.247 s as well as −0.25 s. 6,484 / 6,484
Sample count the decoded count 6,523 / 6,524; T438HGTZ.B30W decodes 3 samples short, a separate codec issue
Setup name + four notes NUL-terminated label/value pairs after the name 70,042 / 70,042
  • The notes are read by position, not by label. Blastware lets the operator edit the labels: Seis. Loc: vs Seis Loc:, Project: with a trailing space, Location:, General:. The ASCII parser already reads them by position.
  • A histogram gets a sample rate only. Blastware reports neither a record time nor a pre-trigger for one.
  • BE9441's bench file now reads 5.0 s, 1,024 pre-trigger samples, 21,504 samples, and its notes as in the summary above.

Not done yet

  • Job number: 2,997 DL2 events carry one, and SFM doesn't read it yet.
  • The waveform-time estimate still finds the record time by the "Standard Recording Setup" name. Moving it to the new lookup would add a check for 37% of files, and that could move event times, so it needs measuring first. No DL2 waveform uses the estimate today: all 6,538 that decode as waveforms take their time from the unit's event record.
  • Micromate: the read_idf_file() side of this issue stays with the parity branch.
**Series-3 half fixed on `dev`** (merge `42fe35f`, fix `b4706a3`). Ships in the next release. This issue stays open for the Micromate half. ### What the wrong values were (measured) - **Record time "70":** that byte is `STRT[18]`, the record-type marker (`0x46` for a waveform, `0x0A` for a histogram), not a record time. - **Pre-trigger and sample count:** these came from STRT bytes `[16:18]` and `[8:10]`, and neither field is either value. - **Blank notes:** the reader stopped at the NUL that follows each label. ### Where the real values are (measured) All of these are in the recording-setup block, at offsets from the start of the setup's name (see #44 for how the name is found): | Field | Location | Verified against Blastware's `_XML.XML` reports (DL2, 2016–2026) | |---|---|---| | Record time | f32 BE at name − 30 | **6,524 / 6,524** waveforms | | Pre-trigger | f32 BE at name − 36. It is the exact value Blastware prints, −0.247 s as well as −0.25 s. | **6,484 / 6,484** | | Sample count | the decoded count | **6,523 / 6,524**; `T438HGTZ.B30W` decodes 3 samples short, a separate codec issue | | Setup name + four notes | NUL-terminated label/value pairs after the name | **70,042 / 70,042** | - **The notes are read by position, not by label.** Blastware lets the operator edit the labels: `Seis. Loc:` vs `Seis Loc:`, `Project: ` with a trailing space, `Location:`, `General:`. The ASCII parser already reads them by position. - **A histogram gets a sample rate only.** Blastware reports neither a record time nor a pre-trigger for one. - **BE9441's bench file now reads 5.0 s, 1,024 pre-trigger samples, 21,504 samples,** and its notes as in the summary above. ### Not done yet - **Job number:** 2,997 DL2 events carry one, and SFM doesn't read it yet. - **The waveform-time estimate** still finds the record time by the "Standard Recording Setup" name. Moving it to the new lookup would add a check for 37% of files, and that could move event times, so it needs measuring first. No DL2 waveform uses the estimate today: all 6,538 that decode as waveforms take their time from the unit's event record. - **Micromate:** the `read_idf_file()` side of this issue stays with the parity branch.
Author
Owner

Correction to the comment above (measured 2026-10-29): T438HGTZ.B30W is not a decoder truncation. Its Tran, Vert and MicL end 3 samples before Long, and Blastware's own _XML.XML sample table does the same: its last three rows carry only the Long cell. SFM's samples match Blastware's on every row once cells are paired with the channels still running. The setup-field harness compared Tran's length (2,301) with the table's row count (2,304). So sample count is effectively 6,524 / 6,524. Corrected in the dev changelog (b023083).

**Correction to the comment above (measured 2026-10-29):** `T438HGTZ.B30W` is **not** a decoder truncation. Its Tran, Vert and MicL end 3 samples before Long, and Blastware's own `_XML.XML` sample table does the same: its last three rows carry only the Long cell. SFM's samples match Blastware's on every row once cells are paired with the channels still running. The setup-field harness compared Tran's length (2,301) with the table's row count (2,304). So sample count is effectively 6,524 / 6,524. Corrected in the dev changelog (`b023083`).
Author
Owner

Series-3 half shipped in v0.33.0. It reached main with release PR #56 on 2026-11-01. It was deployed to prod the same day with its backfills (backfill_event_shape.py exit 0, 26,711 rows updated, 0 cleared).

This issue stays open for the Micromate half, which belongs to feat/series4-sfm-parity.

**Series-3 half shipped in v0.33.0.** It reached `main` with release PR #56 on 2026-11-01. It was deployed to prod the same day with its backfills (`backfill_event_shape.py` exit 0, 26,711 rows updated, 0 cleared). This issue stays open for the Micromate half, which belongs to `feat/series4-sfm-parity`.
Author
Owner

Fixed on dev (merge 0c228fa, 2026-11-20); ships in the next release, whose dev->main PR will close this.

  • MiniMate half: fixed in v0.33.0 (BE9441 bench files: pre-trigger 1,024 samples, record time 5 s, notes read).
  • Micromate half: pre-trigger, record time and the four notes are now read from the Thor file.
    • The 20 UM12947 bench files store 4,096 pre-trigger samples (1.0 s), 3 s, and "Test Unit 2" / "Terra-Mechanics".
    • Against Thor's own reports on 2,027 corpus files: record time and pre-trigger 291 / 291 waveforms, notes 2,027 / 2,027.
  • Also fixed: every Micromate .h5, report-paired or not, had stored pre-trigger 0. It now carries the pre-trigger in samples. The next release's scripts/backfill_thor_events.py run regenerates the stored ones.
Fixed on dev (merge 0c228fa, 2026-11-20); ships in the next release, whose dev->main PR will close this. - **MiniMate half:** fixed in v0.33.0 (BE9441 bench files: pre-trigger 1,024 samples, record time 5 s, notes read). - **Micromate half:** pre-trigger, record time and the four notes are now read from the Thor file. - The 20 UM12947 bench files store 4,096 pre-trigger samples (1.0 s), 3 s, and "Test Unit 2" / "Terra-Mechanics". - Against Thor's own reports on 2,027 corpus files: record time and pre-trigger 291 / 291 waveforms, notes 2,027 / 2,027. - **Also fixed:** every Micromate .h5, report-paired or not, had stored pre-trigger 0. It now carries the pre-trigger in samples. The next release's scripts/backfill_thor_events.py run regenerates the stored ones.
Sign in to join this conversation.