From b6e726f850e1b0db14e1db528c37093a7083b525 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 14:03:47 -0500 Subject: [PATCH 01/13] docs: the event-file fields SFM reads from the file alone (reference Appendix D.6) New Appendix D.6 records the bytes and DL2 verification for every field SFM reads from a Blastware event file: record type STRT[18], the recording-setup block (sample rate k-42, pre-trigger k-36, record time k-30, the four notes), the geophone range (label+29), each histogram interval's PVS^2, and the mic scale (0.25 Pa per count, dB offset 81.9384). None of these were written down outside code and issues. Retracted in place: - D.3.1's STRT[20] = record time: it is 00 on 70,041 / 70,041 DL2 files. - the 2026-08-26 reading of sub-minute histogram records as little- endian: big-endian from byte 5 since v0.32.0 (#47/#49), and the '2-word tail' is the PVS^2. Also in CLAUDE.md. Measured for #48 (files only): the 1A 'stable anchor' be 80 00 00 00 00 is the setup's pre-trigger -0.25 s plus 00 00. It is present only on the 3,886 / 6,541 DL2 waveforms recorded at exactly -0.25 s, and on no histogram. The live 1A read is still unmeasured. CLAUDE.md: Where things stand reflects the range fix on dev (6,524 / 6,524 waveforms exact); the 8x sensitive-range item and the MicL dB item are marked resolved in place. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CLAUDE.md | 49 ++++++--- docs/instantel_protocol_reference.md | 156 ++++++++++++++++++++++++++- 2 files changed, 187 insertions(+), 18 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8ceb078..83fd210 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as --- -## Where things stand (updated 2026-11-01) +## Where things stand (updated 2026-11-02) Read this first when picking the project back up. @@ -25,14 +25,16 @@ Read this first when picking the project back up. `~/dl2-archive/checker-runs/` and is never committed. - **The rule:** every mismatch is SFM's bug unless a carve-out with evidence covers it. + - **Byte layouts** of every field read from the file: + `docs/instantel_protocol_reference.md` Appendix **D.6**. - **As of v0.33.0:** + **As of v0.33.0, plus the range fix on `dev` (`057df47`, 2026-11-02):** - ✅ **Match on every event:** sample rate, record time, pre-trigger, notes, - and event type (#41, from STRT[18]). - - ✅ **Geophone samples** are exact on 6,491 / 6,524 waveforms in every year. - The 33 others are the 1.250 in/s range, 8× under SFM's Normal-range - assumption. - - ✅ **Histogram PVS** = the stored per-interval PVS²: 69,919 / 70,042. + event type (#41, from STRT[18]), and geophone range (`dev`). + - ✅ **Geophone samples** are exact on **6,524 / 6,524** waveforms in every + year (`dev`). v0.33.0 had 6,491: the 33 others were on the 1.250 in/s + range, 8× high under SFM's old Normal-range assumption. + - ✅ **Histogram PVS** = the stored per-interval PVS²: 69,952 / 70,042. - ✅ **Mic: one count = 0.25 Pa,** with Blastware's dB offset at 81.9384. It fails on only a few dozen events. - ❌ **Open:** @@ -44,8 +46,12 @@ Read this first when picking the project back up. - Blastware prints `OORANGE` when the vector sum alone exceeds the range (a carve-out to prove) - ⬜ **Not read yet:** job number, ZC frequency, acceleration, displacement, - time of peak, sensor check, battery, calibration, range, units, monitor - log. + time of peak, sensor check, battery, calibration, units, monitor log. + - 🔶 **#48, measured on files only:** the 1A "stable anchor" + `be 80 00 00 00 00` is the setup's pre-trigger −0.25 s followed by + `00 00`. It appears only on the 3,886 / 6,541 DL2 waveforms recorded at + exactly −0.25 s, and on no histogram. Whether the live 1A read breaks the + same way is still unmeasured (reference D.6.2). - **The Series-4 LIVE wire protocol is reverse-engineered end to end (2026-09-25).** `docs/micromate_protocol_reference.md` is the Series-4 Rosetta Stone, sibling to `instantel_protocol_reference.md`. **A Micromate @@ -229,8 +235,9 @@ Read this first when picking the project back up. over) needs a BW capture of a spanning event first. Do not ship layer one alone without a loud truncation warning — a silently short event is the failure mode this codec has been bitten by repeatedly. -- **Open, not blocking:** 14 sensitive-range files show an exact 8x - (= 10.0/1.25) units discrepancy; `scripts/backfill_sidecars.py --force` also +- **Open, not blocking:** ~~14 sensitive-range files show an exact 8x + (= 10.0/1.25) units discrepancy~~ (**resolved on `dev` 2026-11-02:** the + range is read from the file, reference D.6.4); `scripts/backfill_sidecars.py --force` also inserts DB rows for store files that have none (one-time per store) and the dry-run does not report that count. - **After any codec change, regenerate the store** — `backfill_sidecars.py` @@ -640,6 +647,14 @@ block still covers exactly one minute: | 15 s | 4 | 92 | | 2 s | 30 | 612 | +> ⚠ **CORRECTED in v0.32.0 (#47/#49), recorded here 2026-11-02.** The +> records are **big-endian, starting at byte 5**. Each holds a uint16 peak +> and a uint16 half-period per channel, then the interval's **PVS² as a +> uint32 BE**. Record = 4 × channels + 4 bytes: 20 with the mic, 16 +> without. `stride = 12 + n × record`. The little-endian reading below was +> the same words shifted by one byte. Its "2-word tail" is the PVS² +> (reference D.6.5). + `stride = 12 + n * 20`. Block = `[00][segment][ctr uint16 LE][0a][00]`, then n x 20-byte records of 8 x uint16 **LITTLE**-endian values (`T_peak, T_halfp, V_peak, V_halfp, L_peak, L_halfp, M_peak, M_halfp`) @@ -647,6 +662,7 @@ plus a 2-word tail whose first word is `0000` on every real interval, then a 6-byte block trailer. ⚠ The standard 32-byte block is BIG-endian; this variant is LITTLE-endian. +*(Retracted: both are big-endian; see the box above.)* Recovers **415 files** (216 on BE18193, 199 on BE9440) that decoded to nothing. Ground truth `BE9440/K440L3AQ.T70H` matches its BW ASCII export @@ -674,6 +690,9 @@ block has its own tail signature. Two long-standing errors: `1e 0a 00 00`, with arbitrary bytes at `[21:23]`. Rejecting it dropped the final interval of nearly every histogram — frequently the one holding the event peak, so the file's PPV read low. +- **`[21:25]` is the interval's PVS² as a uint32 BE** (v0.33.0, reference + D.6.5). The "arbitrary bytes" above are probably its high half + (inferred). Verified against 1211 production histograms paired with their BW ASCII exports: **1211/1211 decode exactly** (interval count plus every @@ -682,11 +701,13 @@ with zero mismatches. Before: 1 of 1196. ### What's NOT solved -- **MicL channel conversion to dB(L)** — the codec emits MicL as +- ~~**MicL channel conversion to dB(L)** — the codec emits MicL as raw ADC counts (same format as geo channels), but BW's ASCII export shows mic in dB(L) with ~6 dB quantization steps. Need to map ADC counts → dB(L) for direct comparison; likely - `dB = 20*log10(|counts|) + offset` or similar. + `dB = 20*log10(|counts|) + offset` or similar.~~ **Solved in v0.33.0.** + One count = 0.25 Pa, and dB(L) = 81.9384 + 20·log10(|count|), an offset + measured from Blastware's printed values (reference D.6.6). - **Variable-prefix segment descriptors** — 3 of the 75 ground-truth production events still truncate. The walk reaches a segment header whose channel-id field is preceded by a *variable-width* prefix (2, 4 @@ -1345,7 +1366,7 @@ Do NOT use fixed absolute offsets for sample_rate or record_time. | trigger_level_geo | float32 BE, located in channel block | | alarm_level_geo | float32 BE, adjacent to trigger_level_geo | | geo_hardware_constant (adc_scale_factor) | float32 BE at **channel_label+28** in both read (E5) and write (SUB 71) payloads — reads **6.206053** on BOTH tested units (BE11529 and BE18189); identical across all geo channels (Tran/Vert/Long) and all captures. **Confirmed 2026-04-17 from Interface Handbook §4.5**: this is the **ADC-to-velocity scale factor** = 1/sensitivity = (in/s per V). Firmware uses it as: `PPV (in/s) = ADC_voltage × 6.206053`. Cross-check: `1.61133 V (ADC full-scale) × 6.206053 = 10.000 in/s` (Normal range ✅). Do NOT write this field — it is a hardware/firmware constant. | -| geo_range (sensitivity selector) | **uint8 at channel_label+33** in both read (E5) and write (SUB 71) payloads — **CONFIRMED 2026-04-20** from 4-20-26 geo sensitivity captures: `0x00` = Normal 10.000 in/s (standard gain), `0x01` = Sensitive 1.250 in/s (high gain). Present in all three geo channel blocks (Tran, Vert, Long). **NOTE: `channel_label+20` reads `0x01` on ALL captures regardless of range setting — it is NOT this field.** Note: the "SUB 71 write offset = +29" that appears in earlier analysis was an artifact of incorrect BW-style destuffing applied to write frame data — write frame data is RAW, so the literal `0x10` bytes in the channel block header are preserved, and the offset is the same as in the E5 read payload. | +| geo_range (sensitivity selector) | **uint8 at channel_label+33** in both read (E5) and write (SUB 71) payloads (an event file's setup copy has it at label+29: reference D.6.4) — **CONFIRMED 2026-04-20** from 4-20-26 geo sensitivity captures: `0x00` = Normal 10.000 in/s (standard gain), `0x01` = Sensitive 1.250 in/s (high gain). Present in all three geo channel blocks (Tran, Vert, Long). **NOTE: `channel_label+20` reads `0x01` on ALL captures regardless of range setting — it is NOT this field.** Note: the "SUB 71 write offset = +29" that appears in earlier analysis was an artifact of incorrect BW-style destuffing applied to write frame data — write frame data is RAW, so the literal `0x10` bytes in the channel block header are preserved, and the offset is the same as in the E5 read payload. | | setup_name | ASCII, null-padded, in cfg body | | project / client / operator / sensor_location | ASCII, label-value pairs | diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index ccd9fa9..a59d4b7 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -11,9 +11,10 @@ | Date | Section | Change | |---|---|---| +| 2026-11-02 | Appendix D.3.1, D.6 (NEW), §15 | ✅ **Event fields SFM reads from the file alone (v0.33.0, plus the range on `dev`).** New D.6 records the bytes and the DL2 verification for each field: the record type `STRT[18]`, the recording-setup block (sample rate, pre-trigger, record time, the four notes), the geophone range (label + 29 in the setup's channel blocks), each histogram interval's PVS², and the mic scale (one count = 0.25 Pa). **Retracted in place:** D.3.1's `STRT[20]` = record time (it is `00` on every DL2 file; the "70 s" SFM used to report was `STRT[18]`, the record-type byte), and the 2026-08-26 reading of sub-minute histogram records as little-endian (big-endian from byte 5 since v0.32.0, #47/#49). 🔶 **For #48 (measured on files only):** the 1A "stable anchor" `be 80 00 00 00 00` is the file's pre-trigger −0.25 s followed by `00 00`. It appears only on the 3,886 / 6,541 DL2 waveforms recorded at exactly −0.25 s, and on no histogram. | | 2026-10-26 (5) | §7.8.9 | ✅ **The embedded event record: the instrument's trigger time, inside the 5A stream.** Every Blastware waveform file carries `00 28 05 00 ?? ?? fe 80 [trigger 8 B][stop 8 B]`, times as `dd mm yyyy(BE) 00 hh mm ss`. The trigger equals Blastware's report 1,320/1,320, the filename 7,935/7,935 and the unit's 0C record 10/10. It occurs once in the unit's own A5 payloads (8/8 events) and in SFM-only downloads (2/2): instrument data, not Blastware's. The footer's `ts2 - record time` is only an estimate, a second off on ~19%. Decoder rule, validation and an open case (3 waveform-named files the codec does not recognise) in §7.8.9. 🔶 The §7.5 `0C` "sub_code" timestamp variants look like the same 8-byte form read with its escapes. | | 2026-10-17 | §7.6.1 | 🔶 **OPEN — the 6-byte "stable anchor" may be two settings at their defaults, not a constant.** Series IV's `0x1A` has the same field order as the S3 compliance block, and a keypad diff pass on a Micromate (UM20147) measured the bytes in the anchor's position: `[f32 BE pre-trigger, negative seconds][record stop mode, 00 00 = Fixed]`. `be 80 00 00` is exactly −0.25 s. If S3 matches — **inferred, not measured on S3** — then any S3 unit set to Record Stop Mode = Auto (a basic Blastware Compliance Setup option) or a non-default pre-trigger loses the anchor, and `client.py` silently decodes no recording mode / sample rate / interval / record time and skips them on write. No S3 capture has ever been taken in Auto stop mode (see the 2026-03-09 Auto Window rows), which would explain why the anchor never broke. To settle: one BW capture with Record Stop Mode = Auto. See `docs/micromate_protocol_reference.md` → *The `0x1A` field map from a keypad pass*. | -| 2026-08-26 | S7.6.2, S15 | **MULTI-INTERVAL HISTOGRAM BLOCKS - sub-minute intervals pack several per block.** The device always writes one minute of data per block, so a shorter histogram interval means more intervals packed into a longer block: 1 min -> 1 (the standard 32-byte block), 15 s -> 4 (stride 92), 2 s -> 30 (stride 612), with `stride = 12 + n * 20`. Each 20-byte record holds 8 x uint16 **little**-endian values (peak/half-period per channel) plus a 2-word tail whose first word is `0000` on every real interval. The standard block is big-endian - the variant is not. This recovers **415 files** (216 on BE18193 at 2 s, 199 on BE9440 at 15 s) that previously decoded to nothing, and before that were being accepted by the WAVEFORM codec and returning garbage up to 400x the device-reported PPV. | +| 2026-08-26 | S7.6.2, S15 | **MULTI-INTERVAL HISTOGRAM BLOCKS - sub-minute intervals pack several per block.** ⚠ *Corrected 2026-11-02: the records are big-endian from byte 5, not little-endian (v0.32.0, #47/#49), and the "2-word tail" is the interval's PVS². See D.6.5.* The device always writes one minute of data per block, so a shorter histogram interval means more intervals packed into a longer block: 1 min -> 1 (the standard 32-byte block), 15 s -> 4 (stride 92), 2 s -> 30 (stride 612), with `stride = 12 + n * 20`. Each 20-byte record holds 8 x uint16 **little**-endian values (peak/half-period per channel) plus a 2-word tail whose first word is `0000` on every real interval. The standard block is big-endian - the variant is not. This recovers **415 files** (216 on BE18193 at 2 s, 199 on BE9440 at 15 s) that previously decoded to nothing, and before that were being accepted by the WAVEFORM codec and returning garbage up to 400x the device-reported PPV. | | 2026-08-25 (3) | S7.6.1, S15 | **THE WAVEFORM BODY IS A RECORD CHAIN, NOT A TAG STREAM — supersedes the segment-header model entirely.** Records are self-delimiting: `off+2` is a uint16 BE length and `next = off + 2 + len`; the chain ends on a record whose chan_id is `0x06`. `off+8` holds a 3-valued mode enum - `02 00` (14-byte header, anchors, cumulative deltas), `01 00` (10-byte, no anchors, ABSOLUTE values), `00 03` (10-byte, no tags at all, raw 12-bit absolute). **`40 NN` is an ordinary int16 BE data block of length 2*NN+2**, never a header; reading it as a 2*NN+16 header is what made walks drift, and the 'variable prefix' of 0/2/4/6/8 bytes reported earlier the same day was walker drift, exactly `4 - (old_stop - true_record_start)`. Verified: chain terminates on `06` in 1387/1388 files; all four channels equal length in **1388/1388** (was 156/1388); ASCII sample-count exact 72/75 -> **75/75**, fully exact 70/75 -> **73/75**; device PPV on a live decode **1306/1306** waveform (mean abs ratio error 0.00000) and **4458/4459** histogram. Also eliminated the walker-over-read class: 24 of those files were histograms the waveform codec was wrongly accepting. The superseded model is retained as `decode_waveform_legacy` because `micromate/idf_file.py` pins it for Thor IDFW body-offset search. | | 2026-08-25 (2) | S7.6.2, S15 | **HISTOGRAM BLOCK IS BIG-ENDIAN + terminal block tail.** The 32-byte histogram block's per-channel fields are uint16 **big-endian** (`T_peak` [5:7], `T_halfperiod` [7:9], `V_peak` [9:11], `V_halfperiod` [11:13], `L_peak` [13:15], `L_halfperiod` [15:17], `M_peak` [17:19], `M_halfperiod` [19:21]); only `block_ctr` [2:4] is little-endian. The marker is `block[4]` alone - the previous uint16 LE marker test at [4:6] forced `block[5] == 0` and thereby capped every geo peak at 255 counts (1.275 in/s), silently clipping larger peaks. The byte previously documented as a per-channel "annotation" is the high byte of the big-endian half-period, which is why it was non-zero exactly on sub-Hz intervals. Separately, the **final block of each stream carries tail `9c 06 00 42`** rather than `1e 0a 00 00` and holds arbitrary bytes at [21:23]; rejecting it dropped the last interval of nearly every histogram. Verified against 1211 production histograms paired with their Blastware ASCII exports: 1211/1211 decode exactly, plus 842,442 per-interval frequency comparisons with zero mismatches (previously 1 of 1196 files fully correct). | | 2026-08-25 | §7.6.1, §15, Appendix E (NEW) | **BODY CODEC + SCALE PASS — five findings, all verified against 75 production events paired with their preserved Blastware ASCII exports.** (1) **Geo full scale is 32000 ADC counts, not 32768** — one decoder unit (16 counts) is exactly 0.005 in/s, so 10.000 in/s = 32000 counts. Consumers dividing by 32768 read every geophone sample and derived peak **2.34% low**; the error scales with amplitude so it was invisible on quiet events and worst on loud ones. 216 per-channel comparisons: 32768 → 151/216 exact (worst 0.238 in/s on a 10 in/s event); 32000 → 216/216 exact, worst 1 LSB. Affects waveforms, histograms and series-4 alike. (2) **Wide-NN RLE `0X NN`** — the 12-bit NN encoding already known for `1X`/`2X` also applies to the `00 NN` RLE tag (runs > 252 samples). (3) **`30 NN` is not capped at NN=0x10** — data-section blocks reach at least 0x18; the length formula was already right. (4) **`40 NN` segment headers are variable width** — NN counts the previous-channel continuation deltas, so the header is `2*NN + 16` bytes; `40 01` and `40 03` occur alongside `40 02`. A header can also appear **tagless** (the NN=0 case): just the 14-byte tail. (5) **The header field documented as a "monotonic uint32 LE counter" is really `[channel_id][00][00][segment_index]`** with 0x46=Tran 0x47=Vert 0x48=Long 0x49=MicL — verified on 1697/1697 segment headers, zero disagreements. Decoders should take the channel from this field, not from rotation position. Items (2)–(5) each caused **silent channel truncation**: an unhandled tag ends the walk and the decoder returns short channels with no error. Corpus result end-to-end: exact 37 → 72, truncated 23 → 3, full-length value errors 15 → 0. New Appendix E documents the field-observed "offset" device fault. | @@ -3170,7 +3171,7 @@ The `.bin` files produced by `s3_bridge` are **not raw wire bytes**. The logger | **RV55 DCD/DTR default** — newer Sierra Wireless RV55 firmware does not assert DCD/DTR by default, so the MiniMate Plus never detects TCP disconnect and stays idle instead of resuming monitoring. Root cause: RV55 ACEmanager `DCD Control` setting. Workaround not yet found. | MEDIUM | 2026-04-11 | Still open | | ~~**Variable-prefix segment descriptors**~~ - **RESOLVED 2026-08-25:** there is no variable prefix. The body is a chain of self-delimiting records (see S7.6.1); the 0/2/4/6/8-byte prefix was walker drift from reading `40 NN` as a segment header. All 25 affected files now chain cleanly to the `06` terminator. | RESOLVED | 2026-08-25 | Resolved 2026-08-25 | | ~~**Histogram codec drops trailing intervals (series-3)**~~ - **RESOLVED 2026-08-25.** Two errors, both in the block model. (1) The block is **uniformly big-endian**: peaks and half-periods are uint16 BE (`T_peak` [5:7], `T_halfperiod` [7:9], `V_peak` [9:11], ...); only `block_ctr` [2:4] is LE. The old uint8-peak + "annotation"-byte model silently clipped any peak above 1.275 in/s, and the "annotation" byte was really the half-period high byte - non-zero exactly on the sub-Hz intervals BW renders `<1.0`. The marker is `block[4]` alone; testing [4:6] as a uint16 LE marker forced `block[5] == 0`, which is what capped the peak at one byte. (2) The **final block of the stream carries tail `9c 06 00 42`** instead of `1e 0a 00 00`, with arbitrary bytes at [21:23]; rejecting it dropped the last interval of nearly every histogram - often the one holding the event peak. Verified on 1211 production histograms vs their BW ASCII exports: **1211/1211 exact** (interval count + every per-interval peak) and 842,442 frequency comparisons with zero mismatches; was 1/1196. | RESOLVED | 2026-08-25 | Resolved 2026-08-25 | -| ~~**Unmapped histogram block variant (415 files, 2 units)**~~ - **RESOLVED 2026-08-26.** When the histogram interval is SHORTER than one minute the device packs several intervals into a single block so each block still covers exactly one minute: 1 min -> 1 interval (the standard 32-byte block), 15 s -> 4 (stride 92), 2 s -> 30 (stride 612). `stride = 12 + n * 20`. Block is `[00][segment][ctr uint16 LE][0a][00]` then n x 20-byte records of 8 x uint16 **LITTLE**-endian `T_peak,T_halfp,V_peak,V_halfp,L_peak,L_halfp,M_peak,M_halfp` plus a 2-word tail whose first word is `0000` on every real interval (a session ending mid-block leaves buffer garbage in the remaining slots), then a 6-byte block trailer. **Note the endianness flip** - the standard 32-byte block is big-endian. Ground truth `BE9440/K440L3AQ.T70H` (5,710 intervals at 15 s) decodes with 17,130/17,130 geo peaks, 22,840/22,840 frequencies and 5,710/5,710 mic dB(L) matching its Blastware ASCII export exactly; across all 455 affected files 1,354/1,365 channel peaks (99.2%) match the device-reported PPV. | RESOLVED | 2026-08-25 | Resolved 2026-08-26 | +| ~~**Unmapped histogram block variant (415 files, 2 units)**~~ - **RESOLVED 2026-08-26.** ⚠ *Corrected 2026-11-02: the records are big-endian from byte 5, not little-endian (v0.32.0, #47/#49), and the "2-word tail" is the interval's PVS². See D.6.5.* When the histogram interval is SHORTER than one minute the device packs several intervals into a single block so each block still covers exactly one minute: 1 min -> 1 interval (the standard 32-byte block), 15 s -> 4 (stride 92), 2 s -> 30 (stride 612). `stride = 12 + n * 20`. Block is `[00][segment][ctr uint16 LE][0a][00]` then n x 20-byte records of 8 x uint16 **LITTLE**-endian `T_peak,T_halfp,V_peak,V_halfp,L_peak,L_halfp,M_peak,M_halfp` plus a 2-word tail whose first word is `0000` on every real interval (a session ending mid-block leaves buffer garbage in the remaining slots), then a 6-byte block trailer. **Note the endianness flip** - the standard 32-byte block is big-endian. Ground truth `BE9440/K440L3AQ.T70H` (5,710 intervals at 15 s) decodes with 17,130/17,130 geo peaks, 22,840/22,840 frequencies and 5,710/5,710 mic dB(L) matching its Blastware ASCII export exactly; across all 455 affected files 1,354/1,365 channel peaks (99.2%) match the device-reported PPV. | RESOLVED | 2026-08-25 | Resolved 2026-08-26 | | **Micromate (UM-series) IDF decode is ~1000x low** — e.g. `UM11402_20260406130113.IDFW` decodes a Tran peak of 0.0009 in/s against a device-reported 1.1168. Distinct from the Thor IDF path, which decodes sanely. Suspect a different per-count LSB or a body offset that does not hold for UM-series files. | MEDIUM | 2026-08-25 | Still open | | **Thor IDF per-count LSB** — after the 32000 geo full-scale correction, series-4 Thor peaks sit at a median 0.983 of the device-reported peak (was 0.960 under 32768). Closer, but the residual ~1.7% suggests Thor uses its own per-count LSB rather than the BW 16-count/0.005 in/s convention. A code comment in `sfm/waveform_store.py` claims Thor's LSB is 0.0003 in/s, which would predict Thor reading *high* — the measurement shows the opposite, so that comment is unverified. | LOW | 2026-08-25 | Still open | @@ -3397,8 +3398,16 @@ The STRT record immediately follows the 22-byte header. | 4 | 2 | `ff fe` | Fixed | | 6 | 4 | event key (key4) | 4-byte waveform key | | 10 | 4 | device-specific | NOT a repeat of key4 — device-internal field | -| 14 | 6 | device-specific | NOT zero-padded — device-internal fields | -| 20 | 1 | rectime | uint8 seconds | +| 14 | 4 | device-specific | not identified (see the retraction below) | +| 18 | 1 | **record type** ✅ | `0x46` waveform, `0x0A` histogram: 6,541 / 6,541 `…W` and 63,500 / 63,500 `…H` DL2 files (2026-11-02). See D.6.1 | +| 19 | 2 | `00 00` | zero on 70,041 / 70,041 DL2 files | + +> ⚠ **RETRACTED 2026-11-02.** This table used to end `| 14 | 6 | device-specific |` and +> `| 20 | 1 | rectime | uint8 seconds |`. `STRT[20]` is `0x00` on every DL2 file, so it is not +> the record time. Until v0.33.0, SFM read a record time from `STRT[18]`, the record-type byte, +> which is why every waveform reported "70 s" (`0x46`). It also read pre-trigger and sample count +> from `[16:18]`; both were wrong (#45). The record time and pre-trigger live in the +> recording-setup block (D.6.2). **Critical:** The STRT record must be copied verbatim from A5[0].data[7+strt_pos:] — bytes [10:20] contain device-specific values that cannot be reconstructed from protocol-level Event fields alone. @@ -3576,6 +3585,10 @@ observed) and does NOT follow the AB0T formula. **DLE-shift offset note for reading recording_mode from N00/9T0 body:** +> ⚠ **2026-11-02:** this note finds the block by the 6-byte anchor. In an event file that anchor +> exists only when the pre-trigger is exactly −0.25 s: 3,886 / 6,541 DL2 waveforms, and no +> histogram. Find the block by its setup name instead (D.6.2). + The compliance block in the file body has been through `_strip_inner_frame_dles`. The 0x10 constant at logical `anchor−7` (between recording_mode and sample_rate_HI) gets stripped when sample_rate_HI = `0x04` (1024 sps), because `0x10` precedes `0x04 ∈ {0x02,0x03,0x04}`. After stripping, the anchor shifts left by 1, so: | 1024 sps (strip occurs) | 2048 or 4096 sps (no strip) | @@ -3594,6 +3607,141 @@ file[anc−4]: histogram_interval_HI file[anc−3]: histogram_interval_LO ``` +### D.6 Event fields read from the file alone ✅ 2026-10-29 → 2026-11-02 + +Since v0.33.0, SFM decodes the fields below from an event file's bytes alone: no filename, no +Blastware report. The code is in `minimateplus/event_file_io.py`, `histogram_codec.py` and +`waveform_codec.py`. + +Each field was proven by the decode checker, `scratch/check_s3_decode.py`. It compares SFM's +decode with Blastware's `_XML.XML` report for every DL2 event: 70,042 events, 2016–2026, local +copy in `~/dl2-archive`. Counts below are from that archive unless stated otherwise. + +#### D.6.1 Record type — `STRT[18]` ✅ + +| `STRT[18]` | Type | DL2 | +|---|---|---| +| `0x46` | Waveform | 6,541 / 6,541 `…W` files | +| `0x0A` | Histogram | 63,500 / 63,500 `…H` files | + +- The 5A stream shows the same byte after the STRT keys (§7.8.5, `data[35]`). +- The filename's `W` / `H` is only a cross-check. On a disagreement SFM logs it and keeps the + byte (#41). +- Checker, event type: 70,042 / 70,042. + +#### D.6.2 Recording-setup block — sample rate, pre-trigger, record time ✅ + +**Find the block by structure:** `1c 08`, then the setup name (1–40 printable ASCII), then `00`. +That pattern occurs exactly once in every DL2 file. Do not search for the name "Standard +Recording Setup": 37% of DL2 files use another name. + +Offsets are from `k`, the first byte of the setup name: + +| Offset | Type | Field | Notes | +|---|---|---|---| +| `k − 42` | uint16 BE | sample rate | 1024 / 2048 / 4096 | +| `k − 36` | float32 BE | pre-trigger | seconds, ≤ 0: `−0.25` is a quarter second before the trigger | +| `k − 32` | 2 bytes | — | `00 00` on 70,041 / 70,041 files | +| `k − 30` | float32 BE | record time | seconds | + +- Pre-trigger samples = `round(−pre-trigger × sample rate)`. +- A histogram carries the block too, with pre-trigger `0.0` (63,500 / 63,500). Blastware reports + no record time or pre-trigger for a histogram, and SFM reports none. +- Sample rate, record time and pre-trigger match Blastware on every DL2 event that reports them + (#44, #45). + +⚠ **The 1A "stable anchor" sits on the pre-trigger (measured on files, 2026-11-02).** +- This is the 1A compliance layout: sample rate at anchor − 6 and record time at anchor + 6 + (§7.6.1) put the anchor at `k − 36`. +- The 6-byte `be 80 00 00 00 00` is the pre-trigger −0.25 s (`be 80 00 00`) followed by the + `00 00` at `k − 32`. +- It occurs in a file only when the pre-trigger is exactly −0.25 s: 3,886 / 6,541 waveforms. + The other 2,655 waveforms (−0.249, −0.248, −0.2471, 0.0 and others) and all 63,500 + histograms contain it nowhere. +- 🔶 **The live 1A read is not measured.** This supports #48 but does not prove it. Live 1A + captures in Histogram mode did show the anchor, while histogram files store 0.0, so the file + and the 1A differ in at least this field. + +#### D.6.3 Notes — four label/value pairs after the name ✅ + +- After the name's `00`, NUL-terminated `label`, `value` pairs fill four slots, in order: + project, client, operator ("User Name") and sensor location ("Seis Loc"). +- **Read them by position, never by label.** Blastware lets the operator relabel the slots + ("Seis. Loc:", "Location:", "Project: "). +- An empty value means none. +- They match Blastware on every DL2 event. +- Not read yet: extended notes, job number. + +#### D.6.4 Geophone range — the setup's channel blocks ✅ 2026-11-01 + +The channel blocks follow the notes, within 2,000 bytes of the name: `00 00 01` then `Tran` / +`Vert` / `Long`. The range is the byte at label + 29, where label is the first byte of +`Tran` / `Vert` / `Long`: + +| label + 29 | Range | Full scale | +|---|---|---| +| `0x00` | Normal | 10.000 in/s | +| `0x01` | Sensitive | 1.250 in/s | + +- It matches the report's `GeoRange` on 70,042 / 70,042 events. The three channels agree on + every event, and 35 are Sensitive. +- The live 1A carries the same byte at label + 33 (§7.6, confirmed 2026-04-20). +- Full scale is 32,000 counts at either range, so a Sensitive count is 8× smaller. +- Until `dev` `057df47` (2026-11-02), SFM assumed Normal and read every Sensitive event 8× high. +- If the channels disagree, a value is unknown or a block is missing, SFM reports no range, logs + a decode problem and assumes Normal. + +#### D.6.5 Histogram interval peak vector sum ✅ 2026-10-30 + +Each interval stores its peak vector sum **squared**: + +| Block | Where | Type | +|---|---|---| +| Standard 32-byte block (intervals of a minute or more) | `[21:25]` | uint32 BE | +| Sub-minute record | the record's last 4 bytes | uint32 BE | + +- `PVS = √value × unit`. The unit is 16 counts: 0.005 in/s at Normal, 0.000625 in/s at + Sensitive. +- **The event's PVS is the largest interval's.** Combining the three channel peaks instead read + high on 86% of DL2 histograms, because the peaks can come from different moments. +- **Verified:** √value matches Blastware's "Geo PVS" on 34.5 M DL2 sub-minute intervals, and the + event PVS matches on 69,952 / 70,042 events. The rest are the open histogram cases in D.6.7. +- 🔶 On the stream's last block, the "arbitrary bytes at [21:23]" in the 2026-08-25 note are + probably the high half of this field (inferred from the layout, not measured). + +**Sub-minute records (corrected in v0.32.0, #47/#49):** +- They are **big-endian, starting at byte 5** of the block. +- Each holds, per channel, a uint16 peak and a uint16 half-period (Tran, Vert, Long, and MicL + when the mic is on), then the uint32 PVS². +- Record = 4 × channels + 4 bytes: 20 with the mic, 16 without. `stride = 12 + n × record`. + +> ⚠ **RETRACTED:** the 2026-08-26 notes (Changelog, §15) read these records as 8 × uint16 +> little-endian after a 6-byte header. That was the same big-endian words shifted by one byte. +> Their "2-word tail whose first word is 0000" is the PVS², whose high word reads `0000`. + +#### D.6.6 Mic ✅ v0.33.0 + +- One count = **0.25 Pa**, so psi = count × 0.25 / 6894.757. +- dB(L) = **81.9384** + 20·log10(|count|). + - The exact value, 20·log10(0.25 Pa / 20 µPa), is 81.9382. Blastware's printed values pin the + offset in [81.9383, 81.9385] instead. + - With the exact value, 280 events mismatched, all at count 129. + - float32 rounding does not explain the difference. +- **Verified:** interval psi mismatches fell from 42,783 to 26, and mic peak mismatches from 345 + to 40. + +#### D.6.7 Not read from the file yet + +- **Fields:** job number, extended notes, ZC frequency, acceleration, displacement, time of + peak, sensor check results, battery, calibration, units, monitor log. +- **Open cases:** + - histogram start times are 1 s early (#51) + - 35 sub-minute histograms and 2 one-minute mic-off histograms decode wrongly + - 26 histogram start dates are a day off + - the per-interval PVS is not stored + - Blastware prints `OORANGE` when the vector sum alone exceeds the range (a carve-out still to + prove) + --- *All findings reverse-engineered from live RS-232 bridge captures.* From 55d74c0a7ba3e62baf7f89ab592aeb3cb9de294c Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 14:04:10 -0500 Subject: [PATCH 02/13] docs(changelog): Unreleased -- the event-file fields in the protocol reference Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab3ba31..3ee75a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,27 @@ All notable changes to seismo-relay are documented here. (`backfill_sidecars.py` then `backfill_event_shape.py`) rewrites stored Sensitive events' peaks and `.h5` files. No schema change. +### Protocol / Documentation +- **`docs/instantel_protocol_reference.md` gains Appendix D.6:** the bytes + and DL2 verification for every field SFM reads from a Blastware event file. + - the record type, `STRT[18]` + - the recording-setup block: sample rate, pre-trigger, record time and the + four notes + - the geophone range + - each histogram interval's PVS² + - the mic scale +- **Retracted in place:** + - `STRT[20]` as the record time: it is `00` on every DL2 file. + - The 2026-08-26 reading of sub-minute histogram records as little-endian: + they are big-endian from byte 5 (#47/#49), and the "2-word tail" is the + PVS². This is corrected in CLAUDE.md too. +- **Measured for #48, on files only:** the 1A "stable anchor" + `be 80 00 00 00 00` is the setup's pre-trigger −0.25 s followed by `00 00`. + It appears only on the 3,886 / 6,541 DL2 waveforms recorded at exactly + −0.25 s, and on no histogram. The live 1A read is still unmeasured. +- **CLAUDE.md "Where things stand"** now reflects the range fix. +- Docs only: no code change, no migration. + ## v0.33.0 — 2026-11-01 **SFM reads Series-3 events from the file alone, and proves it against From 5bed7d6c6f4b74b20fdbc9483405dc028ce40da9 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 14:23:32 -0500 Subject: [PATCH 03/13] docs: the file's pre-trigger is the event's, not the setting -- corrects today's #48 note The pre-trigger float in an event file's setup block varies from event to event on the same unit, often on the same day (BE18193: -0.25 and -0.248 on 2026-08-21; 253-256 samples at 1024 sps, -0.002 to -0.249 s at 4096 sps), and Blastware reports the same per-event value as Pre-triggerLength. So it is the event's own pre-trigger, and the note written earlier today overstated what the files say about #48: the live 1A holds the setting, so a missing anchor in a file says little about whether the live read loses its anchor. #48 stays open. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CLAUDE.md | 11 +++---- docs/instantel_protocol_reference.md | 44 ++++++++++++++++++---------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 83fd210..1552b7a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,11 +47,12 @@ Read this first when picking the project back up. (a carve-out to prove) - ⬜ **Not read yet:** job number, ZC frequency, acceleration, displacement, time of peak, sensor check, battery, calibration, units, monitor log. - - 🔶 **#48, measured on files only:** the 1A "stable anchor" - `be 80 00 00 00 00` is the setup's pre-trigger −0.25 s followed by - `00 00`. It appears only on the 3,886 / 6,541 DL2 waveforms recorded at - exactly −0.25 s, and on no histogram. Whether the live 1A read breaks the - same way is still unmeasured (reference D.6.2). + - 🔶 **#48 is still open.** The event file's setup block puts the pre-trigger + where the 1A "stable anchor" `be 80 00 00 00 00` sits. In the file, though, + it is **each event's own pre-trigger**, not the setting: 253–256 samples at + 1024 sps, alternating on the same unit on the same day, and reported that + way by Blastware. So the files say little about whether the live 1A read + loses its anchor (reference D.6.2). - **The Series-4 LIVE wire protocol is reverse-engineered end to end (2026-09-25).** `docs/micromate_protocol_reference.md` is the Series-4 Rosetta Stone, sibling to `instantel_protocol_reference.md`. **A Micromate diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index a59d4b7..d3a3b16 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -11,7 +11,7 @@ | Date | Section | Change | |---|---|---| -| 2026-11-02 | Appendix D.3.1, D.6 (NEW), §15 | ✅ **Event fields SFM reads from the file alone (v0.33.0, plus the range on `dev`).** New D.6 records the bytes and the DL2 verification for each field: the record type `STRT[18]`, the recording-setup block (sample rate, pre-trigger, record time, the four notes), the geophone range (label + 29 in the setup's channel blocks), each histogram interval's PVS², and the mic scale (one count = 0.25 Pa). **Retracted in place:** D.3.1's `STRT[20]` = record time (it is `00` on every DL2 file; the "70 s" SFM used to report was `STRT[18]`, the record-type byte), and the 2026-08-26 reading of sub-minute histogram records as little-endian (big-endian from byte 5 since v0.32.0, #47/#49). 🔶 **For #48 (measured on files only):** the 1A "stable anchor" `be 80 00 00 00 00` is the file's pre-trigger −0.25 s followed by `00 00`. It appears only on the 3,886 / 6,541 DL2 waveforms recorded at exactly −0.25 s, and on no histogram. | +| 2026-11-02 | Appendix D.3.1, D.6 (NEW), §15 | ✅ **Event fields SFM reads from the file alone (v0.33.0, plus the range on `dev`).** New D.6 records the bytes and the DL2 verification for each field: the record type `STRT[18]`, the recording-setup block (sample rate, pre-trigger, record time, the four notes), the geophone range (label + 29 in the setup's channel blocks), each histogram interval's PVS², and the mic scale (one count = 0.25 Pa). **Retracted in place:** D.3.1's `STRT[20]` = record time (it is `00` on every DL2 file; the "70 s" SFM used to report was `STRT[18]`, the record-type byte), and the 2026-08-26 reading of sub-minute histogram records as little-endian (big-endian from byte 5 since v0.32.0, #47/#49). **For #48:** the file's copy of the block puts the pre-trigger where the 1A "stable anchor" `be 80 00 00 00 00` sits. In the file, though, it is each event's own pre-trigger, which varies on the same unit on the same day (253–256 samples at 1024 sps), and Blastware reports it per event. So the file says little about whether the live 1A loses its anchor, and #48 stays open. | | 2026-10-26 (5) | §7.8.9 | ✅ **The embedded event record: the instrument's trigger time, inside the 5A stream.** Every Blastware waveform file carries `00 28 05 00 ?? ?? fe 80 [trigger 8 B][stop 8 B]`, times as `dd mm yyyy(BE) 00 hh mm ss`. The trigger equals Blastware's report 1,320/1,320, the filename 7,935/7,935 and the unit's 0C record 10/10. It occurs once in the unit's own A5 payloads (8/8 events) and in SFM-only downloads (2/2): instrument data, not Blastware's. The footer's `ts2 - record time` is only an estimate, a second off on ~19%. Decoder rule, validation and an open case (3 waveform-named files the codec does not recognise) in §7.8.9. 🔶 The §7.5 `0C` "sub_code" timestamp variants look like the same 8-byte form read with its escapes. | | 2026-10-17 | §7.6.1 | 🔶 **OPEN — the 6-byte "stable anchor" may be two settings at their defaults, not a constant.** Series IV's `0x1A` has the same field order as the S3 compliance block, and a keypad diff pass on a Micromate (UM20147) measured the bytes in the anchor's position: `[f32 BE pre-trigger, negative seconds][record stop mode, 00 00 = Fixed]`. `be 80 00 00` is exactly −0.25 s. If S3 matches — **inferred, not measured on S3** — then any S3 unit set to Record Stop Mode = Auto (a basic Blastware Compliance Setup option) or a non-default pre-trigger loses the anchor, and `client.py` silently decodes no recording mode / sample rate / interval / record time and skips them on write. No S3 capture has ever been taken in Auto stop mode (see the 2026-03-09 Auto Window rows), which would explain why the anchor never broke. To settle: one BW capture with Record Stop Mode = Auto. See `docs/micromate_protocol_reference.md` → *The `0x1A` field map from a keypad pass*. | | 2026-08-26 | S7.6.2, S15 | **MULTI-INTERVAL HISTOGRAM BLOCKS - sub-minute intervals pack several per block.** ⚠ *Corrected 2026-11-02: the records are big-endian from byte 5, not little-endian (v0.32.0, #47/#49), and the "2-word tail" is the interval's PVS². See D.6.5.* The device always writes one minute of data per block, so a shorter histogram interval means more intervals packed into a longer block: 1 min -> 1 (the standard 32-byte block), 15 s -> 4 (stride 92), 2 s -> 30 (stride 612), with `stride = 12 + n * 20`. Each 20-byte record holds 8 x uint16 **little**-endian values (peak/half-period per channel) plus a 2-word tail whose first word is `0000` on every real interval. The standard block is big-endian - the variant is not. This recovers **415 files** (216 on BE18193 at 2 s, 199 on BE9440 at 15 s) that previously decoded to nothing, and before that were being accepted by the WAVEFORM codec and returning garbage up to 400x the device-reported PPV. | @@ -3586,8 +3586,8 @@ observed) and does NOT follow the AB0T formula. **DLE-shift offset note for reading recording_mode from N00/9T0 body:** > ⚠ **2026-11-02:** this note finds the block by the 6-byte anchor. In an event file that anchor -> exists only when the pre-trigger is exactly −0.25 s: 3,886 / 6,541 DL2 waveforms, and no -> histogram. Find the block by its setup name instead (D.6.2). +> exists only when the event's own pre-trigger is exactly −0.25 s: 3,886 / 6,541 DL2 waveforms, +> and no histogram. Find the block by its setup name instead (D.6.2). The compliance block in the file body has been through `_strip_inner_frame_dles`. The 0x10 constant at logical `anchor−7` (between recording_mode and sample_rate_HI) gets stripped when sample_rate_HI = `0x04` (1024 sps), because `0x10` precedes `0x04 ∈ {0x02,0x03,0x04}`. After stripping, the anchor shifts left by 1, so: @@ -3640,7 +3640,7 @@ Offsets are from `k`, the first byte of the setup name: | Offset | Type | Field | Notes | |---|---|---|---| | `k − 42` | uint16 BE | sample rate | 1024 / 2048 / 4096 | -| `k − 36` | float32 BE | pre-trigger | seconds, ≤ 0: `−0.25` is a quarter second before the trigger | +| `k − 36` | float32 BE | pre-trigger | seconds, ≤ 0: `−0.25` is a quarter second before the trigger. **This event's own length, not the unit's setting** (below) | | `k − 32` | 2 bytes | — | `00 00` on 70,041 / 70,041 files | | `k − 30` | float32 BE | record time | seconds | @@ -3650,17 +3650,31 @@ Offsets are from `k`, the first byte of the setup name: - Sample rate, record time and pre-trigger match Blastware on every DL2 event that reports them (#44, #45). -⚠ **The 1A "stable anchor" sits on the pre-trigger (measured on files, 2026-11-02).** -- This is the 1A compliance layout: sample rate at anchor − 6 and record time at anchor + 6 - (§7.6.1) put the anchor at `k − 36`. -- The 6-byte `be 80 00 00 00 00` is the pre-trigger −0.25 s (`be 80 00 00`) followed by the - `00 00` at `k − 32`. -- It occurs in a file only when the pre-trigger is exactly −0.25 s: 3,886 / 6,541 waveforms. - The other 2,655 waveforms (−0.249, −0.248, −0.2471, 0.0 and others) and all 63,500 - histograms contain it nowhere. -- 🔶 **The live 1A read is not measured.** This supports #48 but does not prove it. Live 1A - captures in Histogram mode did show the anchor, while histogram files store 0.0, so the file - and the 1A differ in at least this field. +⚠ **The file's pre-trigger is the event's, not the setting (measured 2026-11-02).** +- **It varies from event to event on the same unit, often on the same day.** BE18193 has both + −0.25 and −0.248 on 2026-08-21. + - At 1024 sps the common values −0.25, −0.249, −0.248 and −0.2471 are 256, 255, 254 and 253 + samples. + - At 4096 sps, BE18193's events range from −0.002 to −0.249 s. +- **Blastware reports the same per-event value** as `Pre-triggerLength`, for example + `-0.094 sec` for `T193KMX5.4Z0W`. +- 🔶 Inferred: the unit's setting stays fixed while the captured length falls short of it. Why it + falls short is unknown. + +**What this means for #48 (the 1A "stable anchor"):** +- This is the 1A compliance layout. Sample rate at anchor − 6 and record time at anchor + 6 + (§7.6.1) put the anchor at `k − 36`, so the 6-byte `be 80 00 00 00 00` is a pre-trigger of + −0.25 s followed by the `00 00` at `k − 32`. +- **In a file**, the anchor bytes appear only when that event's pre-trigger is exactly −0.25 s: + 3,886 / 6,541 waveforms, and no histogram (histogram files store 0.0). A file parser that + searches for the anchor breaks on the rest. SFM's file decoder finds the block by its setup + name instead. +- **The live 1A read holds the setting, not an event's length.** So these files say little about + whether the live read loses its anchor; #48 is still unsettled. +- `k − 32 : k − 30` is `00 00` on all 70,041 files. 🔶 If `[17]` is the stop mode, as on + Series IV, no DL2 event was recorded in Auto stop mode, so the archive cannot test that case. +- The two blocks differ in at least one field. A live 1A in Histogram mode showed the anchor + (−0.25 s), but histogram files store 0.0. #### D.6.3 Notes — four label/value pairs after the name ✅ From 15a27d592126eb4f1da9f56bb0c4ff17bb4cdbb9 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 14:23:49 -0500 Subject: [PATCH 04/13] docs(changelog): Unreleased -- the file's pre-trigger is the event's Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee75a3..15a9c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,10 +49,12 @@ All notable changes to seismo-relay are documented here. - The 2026-08-26 reading of sub-minute histogram records as little-endian: they are big-endian from byte 5 (#47/#49), and the "2-word tail" is the PVS². This is corrected in CLAUDE.md too. -- **Measured for #48, on files only:** the 1A "stable anchor" - `be 80 00 00 00 00` is the setup's pre-trigger −0.25 s followed by `00 00`. - It appears only on the 3,886 / 6,541 DL2 waveforms recorded at exactly - −0.25 s, and on no histogram. The live 1A read is still unmeasured. +- **#48 is still open.** The event file's setup block puts the pre-trigger where + the 1A "stable anchor" `be 80 00 00 00 00` sits. In the file, though, it is + **each event's own pre-trigger**, not the unit's setting: it varies on the + same unit on the same day, and Blastware reports it per event. So the files + say little about whether the live 1A read loses its anchor. (Corrected the + same day; the first version read the file's value as the setting.) - **CLAUDE.md "Where things stand"** now reflects the range fix. - Docs only: no code change, no migration. From 7a58bad28dd248a6763fd8e585d572397d93dd14 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 14:31:23 -0500 Subject: [PATCH 05/13] feat(decode): a Blastware file's job number, and whether Blastware shows it The setup block has Series IV's 0x1A layout here too: report flags at k - 9 (bit 0x02 = job number shown) and the number, uint16 BE, at k - 8, kept while switched off. The flag matches Blastware's JobNumber on 2,997 / 2,997 DL2 events that print one and 66,986 / 66,986 that don't. Every printed value is 1 and matches; hidden ones hold real numbers (802, 1012, 1013, 622), so the value is only proven for 1. - ProjectInfo.job_number_enabled / job_number, named as in micromate.setup_block. - write_event_hdf5 stores both as .h5 attrs when read (additive). - The checker reports the number only when shown, and scores a number only SFM shows as a mismatch. The old test that pinned JobNumber as sfm_blank now checks only the ZC cases it also covered. Not carried into the DB, the API or the PDF report yet (needs a column). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- minimateplus/decode_check.py | 7 +- minimateplus/event_file_io.py | 23 +++- minimateplus/models.py | 2 + sfm/event_hdf5.py | 5 + .../job-number-11-02-26/K557I55Y.I20H | Bin 0 -> 1858 bytes .../job-number-11-02-26/K557I55Y_I20H_XML.XML | 116 +++++++++++++++++ .../job-number-11-02-26/T438I4V5.DJ0H | Bin 0 -> 1544 bytes .../job-number-11-02-26/T438I4V5_DJ0H_XML.XML | 117 ++++++++++++++++++ tests/test_bw_file_fields.py | 27 ++++ tests/test_decode_check.py | 21 +++- 10 files changed, 312 insertions(+), 6 deletions(-) create mode 100755 tests/fixtures/job-number-11-02-26/K557I55Y.I20H create mode 100755 tests/fixtures/job-number-11-02-26/K557I55Y_I20H_XML.XML create mode 100755 tests/fixtures/job-number-11-02-26/T438I4V5.DJ0H create mode 100755 tests/fixtures/job-number-11-02-26/T438I4V5_DJ0H_XML.XML diff --git a/minimateplus/decode_check.py b/minimateplus/decode_check.py index 6133d77..0c19fdd 100644 --- a/minimateplus/decode_check.py +++ b/minimateplus/decode_check.py @@ -36,7 +36,7 @@ class SfmSide: event: Event values: dict[str, object] # reference tag -> SFM's value; absent or None = blank notes: list[str] # non-empty user-note slots, in order - job_number: Optional[str] # None until the decoder reads it + job_number: Optional[str] # only when the file says Blastware shows it channels: list[str] # channels with decoded data, in Tran/Vert/Long/MicL order counts: dict[str, list[int]] # waveform samples or histogram interval peaks geo_ips_per_count: float = GEO_IPS_PER_COUNT # at the event's range, as SFM read it @@ -78,7 +78,7 @@ def sfm_side(raw: bytes) -> SfmSide: values=values, notes=[v for v in (pi.project, pi.client, pi.operator, pi.sensor_location) if v] if pi is not None else [], - job_number=None, + job_number=str(pi.job_number) if pi is not None and pi.job_number_enabled else None, channels=[ch for ch in _CHANNELS if counts[ch]], counts=counts, geo_ips_per_count=_GEO_FS_BY_RANGE.get(ev.geo_range, _GEO_NORMAL_FS_INS) / _GEO_INT16_FS, @@ -289,6 +289,9 @@ def compare(sfm: SfmSide, ref: XmlReport, carveouts: Sequence["Carveout"] = ()) if sfm.job_number is None else FieldResult("JobNumber", "match" if _same_text(sfm.job_number, ref.job_number) else "mismatch", ref.job_number, sfm.job_number)) + elif sfm.job_number is not None: + # SFM says the job number is shown; Blastware printed none. + out.append(FieldResult("JobNumber", "mismatch", None, sfm.job_number)) out.append(FieldResult("Channels", "match" if ref.channels == sfm.channels else "mismatch", " ".join(ref.channels), " ".join(sfm.channels))) if ref.sample_rows is not None: diff --git a/minimateplus/event_file_io.py b/minimateplus/event_file_io.py index 7907e29..dd486b3 100644 --- a/minimateplus/event_file_io.py +++ b/minimateplus/event_file_io.py @@ -996,8 +996,29 @@ def _setup_notes(raw: bytes) -> ProjectInfo: text = [p.decode("ascii", errors="replace").strip() or None for p in parts] text += [None] * (2 + 2 * _NOTE_SLOTS - len(text)) project, client, operator, location = text[2:2 + 2 * _NOTE_SLOTS:2] + enabled, number = _setup_job_number(raw, k) return ProjectInfo(setup_name=text[0], project=project, client=client, - operator=operator, sensor_location=location) + operator=operator, sensor_location=location, + job_number_enabled=enabled, job_number=number) + + +# The job number, in Series IV's 0x1A layout ([39] report flags, [40:42] the +# number): flags at k - 9, bit 0x02 = shown; the number, uint16 BE, at k - 8, +# kept while switched off. The flag matches Blastware's JobNumber on 2,997 / +# 2,997 DL2 events that print one and 66,986 / 66,986 that don't, and every +# printed value matches (all are 1; measured 2026-11-02). +_REPORT_FLAGS_BEFORE_NAME = 9 +_JOB_NUMBER_BEFORE_NAME = 8 +_JOB_NUMBER_ON = 0x02 + + +def _setup_job_number(raw: bytes, k: int) -> tuple[Optional[bool], Optional[int]]: + """(shown, number) from the setup block whose name starts at k.""" + if k < _REPORT_FLAGS_BEFORE_NAME: + return None, None + flags = raw[k - _REPORT_FLAGS_BEFORE_NAME] + j = k - _JOB_NUMBER_BEFORE_NAME + return bool(flags & _JOB_NUMBER_ON), int.from_bytes(raw[j:j + 2], "big") # The geophone range sits in the setup's channel blocks, which follow the diff --git a/minimateplus/models.py b/minimateplus/models.py index 81eb9ea..6096342 100644 --- a/minimateplus/models.py +++ b/minimateplus/models.py @@ -379,6 +379,8 @@ class ProjectInfo: operator: Optional[str] = None # operator / user name sensor_location: Optional[str] = None # sensor location string notes: Optional[str] = None # extended notes + job_number_enabled: Optional[bool] = None # Blastware prints the job number + job_number: Optional[int] = None # kept while switched off # ── Compliance Config ────────────────────────────────────────────────────────── diff --git a/sfm/event_hdf5.py b/sfm/event_hdf5.py index bde0e28..f8c3a4e 100644 --- a/sfm/event_hdf5.py +++ b/sfm/event_hdf5.py @@ -32,6 +32,8 @@ Layout written to `.h5`: client str operator str sensor_location str + job_number int (only when read; kept while not shown) + job_number_enabled bool (Blastware prints the job number) peak_tran_ips float (from 0C; authoritative) peak_vert_ips float peak_long_ips float @@ -257,6 +259,9 @@ def write_event_hdf5( attrs["client"] = (pi.client if pi else "") or "" attrs["operator"] = (pi.operator if pi else "") or "" attrs["sensor_location"] = (pi.sensor_location if pi else "") or "" + if pi is not None and getattr(pi, "job_number", None) is not None: + attrs["job_number"] = int(pi.job_number) + attrs["job_number_enabled"] = bool(pi.job_number_enabled) attrs["peak_tran_ips"] = float(pv.tran if pv and pv.tran is not None else 0.0) attrs["peak_vert_ips"] = float(pv.vert if pv and pv.vert is not None else 0.0) attrs["peak_long_ips"] = float(pv.long if pv and pv.long is not None else 0.0) diff --git a/tests/fixtures/job-number-11-02-26/K557I55Y.I20H b/tests/fixtures/job-number-11-02-26/K557I55Y.I20H new file mode 100755 index 0000000000000000000000000000000000000000..f56537a732086860cd297898c3d9094727d56d17 GIT binary patch literal 1858 zcma)+ZERCz6vxl)I(oUc?R{?P_JQDdIw5WdrRzF2aRc@iMLS&Fi$R5O?XFv4+>*8! zB_Sa(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ap z!D!RSVdSQB%k@-bht@%zChEko${S0Q&%|o6dBgEfh_U^JDa?_|P0yc>@pvJJF*lv7 iIj9>i_g3G*N>eEQqZyXl`GwyUZt=Ipg@Xg-tN#H;Cl|;7 literal 0 HcmV?d00001 diff --git a/tests/fixtures/job-number-11-02-26/K557I55Y_I20H_XML.XML b/tests/fixtures/job-number-11-02-26/K557I55Y_I20H_XML.XML new file mode 100755 index 0000000..9d649bd --- /dev/null +++ b/tests/fixtures/job-number-11-02-26/K557I55Y_I20H_XML.XML @@ -0,0 +1,116 @@ + + +8.0 +Full Histogram +BE9557 +V 10.72-8.17 MiniMate Plus +K557I55Y.I20H +12:54:02 +2019-10-07 +12:54:28 +2019-10-07 + +Tran +Vert +Long +MicL + +1.00 +1 minute +1024 sps +6.4 Volts +January 18, 2019 by Instantel +in/s and dB(L) +Landmark - The Standard - Atherton Hotel +Landmark Constructors +Terra-Mechanics, Inc. - D. Bartholomae +Loc 2- Atherton Hotel - 125 S. Atherton + +10.000 +in/s + + +0.425 +in/s + + +0.010 +in/s + + +0.485 +in/s + + +>100 +Hz + + +>100 +Hz + + +>100 +Hz + +12:54:28 +2019-10-07 +12:54:28 +2019-10-07 +12:54:28 +2019-10-07 + +0.645 +in/s + +12:54:28 +2019-10-07 +Linear Weighting + +91.5 +dB(L) + +12:54:28 +2019-10-07 + +>100 +Hz + +7.9 Hz. +3.4 +Passed +7.4 Hz. +3.7 +Passed +7.7 Hz. +3.9 +Passed +20.1 Hz. +585 mv +Passed + + +2019-10-07 12:54:01 - 2019-10-07 12:54:28 "Event Recorded Modem Exit" + + + Tran Peak in/s + Tran Freq Hz + Vert Peak in/s + Vert Freq Hz + Long Peak in/s + Long Freq Hz + Geo PVS in/s + MicL Peak psi(L) + MicL Peak dB(L) + MicL Freq Hz + + + + +0.425>1000.010>1000.485>1000.6450.00091.48>100 + + + + + + diff --git a/tests/fixtures/job-number-11-02-26/T438I4V5.DJ0H b/tests/fixtures/job-number-11-02-26/T438I4V5.DJ0H new file mode 100755 index 0000000000000000000000000000000000000000..9b25a4070ebe04466ed1aa005939bd1b8e58ccf5 GIT binary patch literal 1544 zcma)+QA}G^7{~t?Zr9ru=xxi8Ory6DxYY_~Mhtvw=FqIhxkXXQ@R%pgpAyaRo*B)x^ zu!7l_%AUmMJMf&ptIyZnhm-?M%~>rNuzzu226&b}wDEqeKiJ*f=jrMNx;j0*UesF5 zi~p~N67Of+{UgRCSsDu~q7aBpC%5y4y=Z3vmfAqosjURHuoI7YFztVH@SDl2FoPMN z!lg&JAnipooQMkJVkDl3O7bxwC@Rw@5J<#d6C+ALCS)lk#E%LANl}CjAs7iuM@3;I z9E){K1jdHQH5!iyUJS(~QKtBS@VszHiX7i79F`*_9G-F65)<9G4g6y zmLf?bfbtJ{s9Yi;CF3%JqLlP#74?Y~VYgSCQwb|lTsA(8+5B%Pq8t^Y!jZTlCP^DI z^%Q(Lt_ulxlb|R_Hwmr6tCNI4XZGV~I#_ht@dDbITN(o6XZ$?N z16(Hy6*zxNXg>YHcQ*?c7mCH=?|&{`zp++Y-zfjHdFKw#mUat1lgZ3kthTzkh6cNx zcaS-^&Ea%7c%HZ0?F|j}^>sFz&1$u99LI-JqTlCjaX?j9SMs@BCY#BoGnu)$xokF@ zpU>x43#%1XRZAs0|NH>Y=!La%#zV6(T4kPRX#FhDqI9rEqw8JAg~2M*6EzR(OvB7D z>I|Om-xiwRdGFih-25;3LZSG_wWaGfS4+1y%9~qvd3Mbu_}Cq0&T6yO8#GRrv(eSK zv$2tSt+`wTM^JWNBO)XMvRL?!U!R`vdEE}XT3N~Ea&zg-x%BL8dNxf^*=#PKFRZMt zt?4|B#=dr_x2zwILuLC9nq3&}H--&@k#r zDE*F;WM()8&SI);mT%uG^V|=q7l%4o4vd9jmW;fuR_tov?%k4}?c3s}{~|(D{{avA Bf)@Y) literal 0 HcmV?d00001 diff --git a/tests/fixtures/job-number-11-02-26/T438I4V5_DJ0H_XML.XML b/tests/fixtures/job-number-11-02-26/T438I4V5_DJ0H_XML.XML new file mode 100755 index 0000000..03c6b02 --- /dev/null +++ b/tests/fixtures/job-number-11-02-26/T438I4V5_DJ0H_XML.XML @@ -0,0 +1,117 @@ + + +8.0 +Full Histogram +BE18438 +V 10.72-8.17 MiniMate Plus +T438I4V5.DJ0H +16:48:55 +2019-10-01 +16:48:57 +2019-10-01 + +Tran +Vert +Long +MicL + +1.00 +1 minute +1024 sps +6.8 Volts +September 3, 2019 by Instantel +in/s and dB(L) +1 +Univ of Pitt - Scaife Hall-UPMC - Loc 2 +P J Dick, Inc. +Terra-Mechanics, Inc. - D. Harrison +Unit #2 - Station #2 - Loc 2 + +10.000 +in/s + + +0.550 +in/s + + +1.335 +in/s + + +0.270 +in/s + + +N/A +Hz + + +N/A +Hz + + +N/A +Hz + +16:48:57 +2019-10-01 +16:48:57 +2019-10-01 +16:48:57 +2019-10-01 + +1.394 +in/s + +16:48:57 +2019-10-01 +Linear Weighting + +114.4 +dB(L) + +16:48:57 +2019-10-01 + +51 +Hz + +7.5 Hz. +4.0 +Passed +7.5 Hz. +3.9 +Passed +7.6 Hz. +3.7 +Passed +0.0 Hz. +0 mv +Check + + +2019-10-01 16:48:54 - 2019-10-01 16:48:57 "Event Recorded Modem Exit" + + + Tran Peak in/s + Tran Freq Hz + Vert Peak in/s + Vert Freq Hz + Long Peak in/s + Long Freq Hz + Geo PVS in/s + MicL Peak psi(L) + MicL Peak dB(L) + MicL Freq Hz + + + + +0.550N/A1.335N/A0.270N/A1.3940.002114.451 + + + + + + diff --git a/tests/test_bw_file_fields.py b/tests/test_bw_file_fields.py index fc57beb..1dc7b6a 100644 --- a/tests/test_bw_file_fields.py +++ b/tests/test_bw_file_fields.py @@ -276,3 +276,30 @@ def test_an_imported_file_and_the_backfill_store_its_range(tmp_path): "--db-path", str(tmp_path / "seismo_relay.db"), "--force"]) == 0 with h5py.File(h5, "r") as f: assert f.attrs["geo_range"] == "sensitive" + + +# ── The job number ────────────────────────────────────────────────────────── +# Series IV's 0x1A layout again: report flags at k - 9 (bit 0x02 = job number +# shown) and the number, uint16 BE, at k - 8, kept while switched off. The flag +# matches Blastware's JobNumber on 2,997 / 2,997 DL2 events that print one and +# 66,986 / 66,986 that don't (measured 2026-11-02). Every printed value is 1; +# hidden ones hold real numbers (802, 1012, 1013, 622). + +@pytest.mark.parametrize("rel,enabled,number", [ + ("decode-checker-10-29-26/T1905KDW.5F0W", True, 1), # XML JobNumber 1 + ("job-number-11-02-26/T438I4V5.DJ0H", True, 1), # histogram, XML JobNumber 1 + ("job-number-11-02-26/K557I55Y.I20H", False, 802), # no JobNumber in the XML + ("decode-checker-10-29-26/R352HFZ7.530H", False, 1), +]) +def test_job_number_comes_from_the_file(rel, enabled, number): + pi = read_blastware_file(_FIX / rel).project_info + assert (pi.job_number_enabled, pi.job_number) == (enabled, number) + + +def test_the_h5_carries_the_job_number(tmp_path): + import h5py + from sfm import event_hdf5 + ev = read_blastware_file(_FIX / "job-number-11-02-26/K557I55Y.I20H") + event_hdf5.write_event_hdf5(tmp_path / "e.h5", ev, serial="BE9557") + with h5py.File(tmp_path / "e.h5", "r") as f: + assert (bool(f.attrs["job_number_enabled"]), int(f.attrs["job_number"])) == (False, 802) diff --git a/tests/test_decode_check.py b/tests/test_decode_check.py index d030611..b9848de 100644 --- a/tests/test_decode_check.py +++ b/tests/test_decode_check.py @@ -86,9 +86,8 @@ def test_an_extra_reference_row_is_a_mismatch_with_detail(): assert "row_length_disagreements=1" in res["samples.Tran"].detail -def test_job_number_na_and_above_range(): - res = _results("T1905KDW.5F0W") - assert res["JobNumber"].verdict == "sfm_blank" +def test_zc_frequency_na_and_above_range(): + res = _results("T1905KDW.5F0W") # its JobNumber: test_the_job_number_matches_blastware assert res["TranZCFreq"].verdict == "no_reference" # N/A assert res["VertZCFreq"].verdict == "sfm_blank" # >100, SFM has no flag yet @@ -172,3 +171,19 @@ def test_a_sensitive_range_event_now_matches(): for f in ("GeoRange", "TranPPV", "VertPPV", "LongPPV", "PeakVectorSum", "samples.Tran", "samples.Vert", "samples.Long"): assert res[f].verdict == "match", (f, res[f]) + + +def test_the_job_number_matches_blastware(): + assert _results("T1905KDW.5F0W", CARVEOUTS)["JobNumber"].verdict == "match" + + +def test_a_hidden_job_number_is_not_reported(): + # Flag off: Blastware prints no JobNumber, and SFM's side reports none either. + assert sfm_side((FIX / "R352HFZ7.530H").read_bytes()).job_number is None + + +def test_a_job_number_only_sfm_shows_is_a_mismatch(): + side = sfm_side((FIX / "R352HFZ7.530H").read_bytes()) + side.job_number = "1" + res = {r.field: r for r in compare(side, parse_xml_report_file(FIX / "R352HFZ7_530H_XML.XML"))} + assert res["JobNumber"].verdict == "mismatch" From 99b6b315d62783204cb1aa6f01cfd6ad3118b9da Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 16:09:48 -0500 Subject: [PATCH 06/13] docs(changelog): Unreleased -- the job number from the file Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15a9c68..855362f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,28 @@ All notable changes to seismo-relay are documented here. (`backfill_sidecars.py` then `backfill_event_shape.py`) rewrites stored Sensitive events' peaks and `.h5` files. No schema change. +### Added +- **A Blastware file's job number, and whether Blastware shows it.** + - **Where it is:** the setup block has Series IV's `0x1A` layout here too. + The report flags sit at 9 bytes before the setup name, with bit `0x02` + meaning the job number is shown. The number is a uint16 BE at 8 bytes + before the name, and it is kept while switched off. + - **Measured:** the flag matches Blastware's JobNumber on 2,997 / 2,997 DL2 + events that print one, and 66,986 / 66,986 that don't. + - Every printed value is 1, so the value is only proven for 1. + - Hidden ones hold real numbers (802, 1012, 1013, 622). + - **`ProjectInfo.job_number_enabled` / `job_number`**, named as in + `micromate.setup_block`. + - **`write_event_hdf5`** stores both as `.h5` attributes when they were read. + - **Decode checker:** JobNumber 2,997 / 2,997, and 11 of 88 fields fully + match (was 10). 0 regressions. A job number only SFM shows now counts as a + mismatch. + - **Not in the database, the API or the PDF report yet.** That needs a + column. + - ⚠ **Codec change:** it rides the next release's `TOOL_VERSION` bump and + backfill (`backfill_sidecars.py` then `backfill_event_shape.py`). The new + `.h5` attributes are additive. No schema change, no migration. + ### Protocol / Documentation - **`docs/instantel_protocol_reference.md` gains Appendix D.6:** the bytes and DL2 verification for every field SFM reads from a Blastware event file. From aec4a38473f873e12ce6db52eb4d5dd622b1a442 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 2 Nov 2026 16:20:32 -0500 Subject: [PATCH 07/13] fix(decode): histograms go to the histogram codec, and a loud interval no longer hides a short one Three causes behind the histograms the checker found decoding wrongly: 1. The file decoder tried the waveform codec first, whatever the record type. It accepted BE9440 / BE9557 / BE17354's 2018 5 s histograms and returned ~5x too many 'samples' (K440HDXX.XH0H: SFM 44,504, Blastware 6,976). The codec now follows STRT[18] (0x46 / 0x0A on 70,041 / 70,041 DL2 files); only an unknown type falls back to trial order, and a chosen codec that fails is a decode problem rather than a silent switch. 2. The sub-minute layout check required each record's 'zero word' to be 0000. It is the high word of the interval's PVS squared, non-zero above 1.28 in/s, so a one-block histogram with a loud interval was not recognised (T193KR5M.X90H, K440HA3C.JM0H, R352HFZ7.530H decoded to nothing). The check is now the measured relation peak <= PVS <= sqrt(3) * peak, which holds on 34,502,955 / 34,502,955 DL2 sub-minute intervals. The no-terminal-tail trim uses the same test. Two test builders wrote PVS bytes no real record has (one still in the retracted little-endian layout); they now write peak^2 in the measured layout, and the retraction test keeps a legacy builder of its own. 3. Checker carve-out interval-count-is-duration: Blastware's Number of Intervals is (stop - start) / interval from the footer times, and its own interval table lists one block fewer when the unit never wrote the last minute. SFM matches the table (T193KSWP.FF0H: 2,880 vs 2,850). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- minimateplus/decode_check_carveouts.py | 22 ++- minimateplus/event_file_io.py | 40 +++-- minimateplus/histogram_codec.py | 28 +++- .../histogram-decode-11-02-26/K440HA3C.JM0H | Bin 0 -> 1984 bytes .../K440HA3C_JM0H_XML.XML | 137 +++++++++++++++++ .../histogram-decode-11-02-26/K440HDXX.XH0H | Bin 0 -> 148306 bytes .../histogram-decode-11-02-26/T193KR5M.X90H | Bin 0 -> 1686 bytes .../T193KR5M_X90H_XML.XML | 140 ++++++++++++++++++ tests/test_bw_file_fields.py | 32 ++++ tests/test_decode_check.py | 34 +++++ tests/test_histogram_codec.py | 28 ++-- tests/test_histogram_multi_interval.py | 2 +- 12 files changed, 434 insertions(+), 29 deletions(-) create mode 100755 tests/fixtures/histogram-decode-11-02-26/K440HA3C.JM0H create mode 100755 tests/fixtures/histogram-decode-11-02-26/K440HA3C_JM0H_XML.XML create mode 100755 tests/fixtures/histogram-decode-11-02-26/K440HDXX.XH0H create mode 100755 tests/fixtures/histogram-decode-11-02-26/T193KR5M.X90H create mode 100755 tests/fixtures/histogram-decode-11-02-26/T193KR5M_X90H_XML.XML diff --git a/minimateplus/decode_check_carveouts.py b/minimateplus/decode_check_carveouts.py index 7122f57..244edd2 100644 --- a/minimateplus/decode_check_carveouts.py +++ b/minimateplus/decode_check_carveouts.py @@ -86,4 +86,24 @@ SATURATION = Carveout( applies=_saturation, ) -CARVEOUTS: tuple[Carveout, ...] = (SATURATION,) +def _interval_count_is_duration(sfm: SfmSide, ref: XmlReport, res: FieldResult) -> bool: + """Blastware's count exceeds the intervals in its own table, and SFM decoded + exactly the table's.""" + p = _printed_number(res.bw or "") + n = sfm.values.get("NumberofIntervals") + rows = len(ref.intervals or []) + return p is not None and n is not None and rows == n and p[0] > n + + +INTERVAL_COUNT_IS_DURATION = Carveout( + id="interval-count-is-duration", + fields=("NumberofIntervals",), + evidence=("Blastware's Number of Intervals is (stop - start) / interval from the file's " + "footer times -- exact on T193KSWP.FF0H (2,880), M462KSWR.1R0H (1,650) and " + "T193KY0A.740H (6,390). Its own interval table lists the intervals the file " + "holds: one block (30 at 2 s) fewer when the unit never wrote the last minute. " + "2026-11-02."), + applies=_interval_count_is_duration, +) + +CARVEOUTS: tuple[Carveout, ...] = (SATURATION, INTERVAL_COUNT_IS_DURATION) diff --git a/minimateplus/event_file_io.py b/minimateplus/event_file_io.py index dd486b3..f2a6dfa 100644 --- a/minimateplus/event_file_io.py +++ b/minimateplus/event_file_io.py @@ -1170,18 +1170,37 @@ def decode_blastware_bytes(raw: bytes, *, name: Optional[str] = None) -> Event: # mode, synthetic test input), fall back to empty channels — the # rest of the event (timestamp, waveform_key, project strings) is # still recoverable and useful. - decoded = decode_waveform_v2(body) - # Discriminator for the timestamp logic below: a waveform (trigger) event - # vs a histogram window. Keyed on the codec, not the filename — the - # save_imported_bw path passes a tmp ".bw" name whose extension lies. - is_waveform_body = decoded is not None - if decoded is None: + # + # The record type comes from the bytes: STRT[18] (#41), 0x46 / 0x0A on + # 70,041 / 70,041 DL2 files. It picks the codec. Trying the waveform codec + # first handed it BE9440 / BE9557 / BE17354's 2018 5 s histograms, which it + # accepted and returned ~5x too many "samples" for. Only an unknown type + # falls back to the old trial order. The filename's last letter is only a + # cross-check -- SFM's own downloads have no name, and a manual download's + # (".QZ0") carries no type at all. + type_byte = strt_raw[18] + record_type = _RECORD_TYPE_BY_STRT.get(type_byte) + problems = [] + if record_type is None: + problems.append(f"unknown record type byte 0x{type_byte:02x} at STRT[18]") + if record_type == "Histogram": decoded = decode_histogram_body(body) + is_waveform_body = False + elif record_type == "Waveform": + decoded = decode_waveform_v2(body) + is_waveform_body = True + else: + decoded = decode_waveform_v2(body) + is_waveform_body = decoded is not None + if decoded is None: + decoded = decode_histogram_body(body) if decoded is None: log.warning( "%s: body codec failed to decode (body starts %s) — " "raw_samples will be empty", label, body[:8].hex(" "), ) + if record_type is not None: + problems.append(f"the {record_type.lower()} codec could not decode the body") samples = {"Tran": [], "Vert": [], "Long": [], "MicL": []} else: samples = decoded_to_adc_counts(decoded) @@ -1190,13 +1209,8 @@ def decode_blastware_bytes(raw: bytes, *, name: Optional[str] = None) -> Event: ev = Event(index=-1) if strt_fields.get("waveform_key"): ev._waveform_key = bytes.fromhex(strt_fields["waveform_key"]) - # The record type comes from the bytes: STRT[18] (#41). The filename's - # last letter is only a cross-check -- SFM's own downloads have no name, - # and a manual download's (".QZ0") carries no type at all. - type_byte = strt_raw[18] - ev.record_type = _RECORD_TYPE_BY_STRT.get(type_byte) - if ev.record_type is None: - ev.decode_problems.append(f"unknown record type byte 0x{type_byte:02x} at STRT[18]") + ev.record_type = record_type + ev.decode_problems.extend(problems) named_type = derive_record_type_from_filename(name, default=None) if name else None if named_type is not None and ev.record_type is not None and named_type != ev.record_type: log.warning("%s: record type %s from the file disagrees with the filename's %s; " diff --git a/minimateplus/histogram_codec.py b/minimateplus/histogram_codec.py index 6978806..3a4f7e6 100644 --- a/minimateplus/histogram_codec.py +++ b/minimateplus/histogram_codec.py @@ -439,16 +439,34 @@ def _stride(rec: int, n: int) -> int: def _records_plausible(body: bytes, off: int, rec: int, m: int) -> bool: - """Every record's zero word is 0000 -- what tells a 16-byte layout from a - 20-byte one when both strides happen to fit (492 = 12 + 16x30 = 12 + 20x24).""" + """Every record's last 4 bytes are its vector sum squared, consistent with + its channel peaks: at least the largest peak, at most sqrt(3) times it (one + unit of rounding either way). That is what tells a 16-byte layout from a + 20-byte one when both strides happen to fit (492 = 12 + 16x30 = 12 + 20x24); + misread, those bytes are other fields. Holds on 34,502,955 / 34,502,955 DL2 + sub-minute intervals (2026-11-02). + + ⚠ RETRACTED 2026-11-02: "every record's zero word is 0000". It is the high + word of the PVS², non-zero on any interval above 1.28 in/s, so a short + histogram with one loud interval was not recognised at all (T193KR5M.X90H, + K440HA3C.JM0H decoded to nothing).""" z = rec - 4 for k in range(m): q = off + _MULTI_HEADER_LEN + rec * k - if q + rec > len(body) or body[q + z] or body[q + z + 1]: + if q + rec > len(body): + return False + peak = max((body[q + i] << 8) | body[q + i + 1] for i in (0, 4, 8)) + if not _pvs_consistent(peak, int.from_bytes(body[q + z:q + z + 4], "big")): return False return True +def _pvs_consistent(peak: int, pvs_sq: int) -> bool: + """A record's vector sum squared against its largest geo peak, one unit of + rounding either way: peak <= PVS <= sqrt(3) * peak.""" + return max(peak - 1, 0) ** 2 <= pvs_sq <= 3 * (peak + 1) ** 2 + + def detect_multi_interval_layout(body: bytes) -> Optional[Tuple[int, int]]: """``(record_len, per_block)`` of a multi-interval body, or None. @@ -543,8 +561,8 @@ def walk_multi_interval_blocks(body: bytes, recs = [_decode_record(body, off + _MULTI_HEADER_LEN + rec * k, rec, off) for k in range(max(m, 0))] for k, r in enumerate(recs): - if (r["meta_var"][:2] != b"\x00\x00" - or max(r["t_peak"], r["v_peak"], r["l_peak"]) > _GEO_MAX_COUNTS): + peak = max(r["t_peak"], r["v_peak"], r["l_peak"]) + if not _pvs_consistent(peak, r["pvs_sq"]) or peak > _GEO_MAX_COUNTS: del recs[k:] break out.extend(recs) diff --git a/tests/fixtures/histogram-decode-11-02-26/K440HA3C.JM0H b/tests/fixtures/histogram-decode-11-02-26/K440HA3C.JM0H new file mode 100755 index 0000000000000000000000000000000000000000..bd9bfbcc9974acb7290a6f568d31b773d2a57aeb GIT binary patch literal 1984 zcma)6eQZ-z6hHU1TVFrleO+0MA>j_DY>dsZl`xhK7>o$I&FRWw)R;8ggH^{XX*)C| zCd7Xf{~*zb#%zihzaokWF^XB$7^4u|8D}&aZOef1HQ8&|76H*c&wURjM*iU3_j>QU zJ?D4N@BGet6v%FX&1x(jRO8AJ*p`FW0)2r80{R@0ZHI^qF!(*Z=KyZR0c3svSU|!} z%lr=iPXytAd&0FnK3nkS;~iW9+=xd&0oQyi_vCnHY#H=GxgdiLD$vKuN6!oYIoI?P zmM(zNa#+7{wcpai!PS?gr?<2R`5IZtZJsZfRJt3SdQJ!>T5565Gjt zD}#YIGx6pg-C;G{9gHiicW5{^AGhcOSY`#V;$3!qlV^lnC9JKjeQe{d_D}myaAs@I z!?z1XWU_MQs)m>nhu&!9F(njlh5qo+P*9ER46?p>a3DOqozL-bL}m4?PYK5wSXU&( zmNdbJp|GN2K6a4e$2Jg{+6D+A*U)`VX74ae6XXy5eq}xyDeHx zS1oKAhMF>L#<`0Q!FCdy%UaF3Zn4py0Og2fSmYp7Hi3Q^_#x$dUqEV5Yd-{)%`kTY zdzNA&7PU~A$|P#iK#PZr!Q#vLg|l7SFTd=yIFrf^V{rp zr_<&3cqB??S@v?PFfOm`m1Rn)BuO5(+wF2W9S(O8AKOhf_re{5 z?>ZZ5#Sf0bh%MAX8{M<-we-})#IM=Rj`0zsGb47*8NunMPQgS(w5fT#1kx_qVbCXQ+Ic+ABN+*+J2gmp|HkM2zQfXvl zP(nhSkx9twm8+`o2&@?=h7<`kDDiBG$!c%|q}G_M?txma8){TX>OkZ^sF1FWJhyLu zb_x~B9-o{#eQtV2%NI+RF8_&)a$e@QA|uh^bh_O)C{%$G@nIZoNaS&QP$8GYX?KWr z8hBz@32a#6rHiDTmd%Wh8~P;Bl3b!pCY#N2g>*xqb%0Xv^pOYG+!TqTMg*}5? + +8.0 +Full Histogram +BE9440 +V 10.72-8.17 MiniMate Plus +K440HA3C.JM0H +11:42:58 +2018-02-10 +11:43:34 +2018-02-10 + +Tran +Vert +Long +MicL + +8.00 +5 seconds +1024 sps +6.8 Volts +January 11, 2018 by Instantel +in/s and dB(L) +Villanova Stadium Station - Seis. Loc #2 +D'Angleo Brothers, Inc +Terra-Mechanics, Inc - D Harrison +Loc # 2 - OutBound Track + +10.000 +in/s + + +0.390 +in/s + + +2.645 +in/s + + +0.095 +in/s + + +85 +Hz + + +73 +Hz + + +43 +Hz + +11:43:33 +2018-02-10 +11:43:33 +2018-02-10 +11:43:33 +2018-02-10 + +2.656 +in/s + +11:43:33 +2018-02-10 +Linear Weighting + +126.4 +dB(L) + +11:43:18 +2018-02-10 + +>100 +Hz + +7.2 Hz. +4.3 +Passed +7.5 Hz. +3.7 +Passed +7.4 Hz. +4.1 +Passed +19.7 Hz. +634 mv +Passed + + +2018-02-10 11:42:57 - 2018-02-10 11:43:34 "Event Recorded Modem Exit" + + + Tran Peak in/s + Tran Freq Hz + Vert Peak in/s + Vert Freq Hz + Long Peak in/s + Long Freq Hz + Geo PVS in/s + MicL Peak psi(L) + MicL Peak dB(L) + MicL Freq Hz + + + + +0.005>1000.005>1000.005N/A0.0090.00091.4834 + + +0.005>1000.005>1000.005>1000.0090.000100.0>100 + + +0.005>1000.005>1000.005>1000.0090.00087.96>100 + + +0.010>1000.015>1000.010>1000.0160.006126.4>100 + + +0.005>1000.005>1000.005>1000.0090.004122.043 + + +0.005>1000.010>1000.005>1000.0110.00087.96>100 + + +0.390852.645730.095432.6560.00093.98>100 + + +0.005>1000.005>1000.005>1000.0070.00087.96>100 + + + + + + diff --git a/tests/fixtures/histogram-decode-11-02-26/K440HDXX.XH0H b/tests/fixtures/histogram-decode-11-02-26/K440HDXX.XH0H new file mode 100755 index 0000000000000000000000000000000000000000..f50105aac1752ded8d90d4e0f7dc38c92881e0f5 GIT binary patch literal 148306 zcmc${2i&DqaX)_Ed++ny`e&s+lxSk1OeH-n{~CHvKr$h9>Wd^vpnO(?x+cNq-Y)qqHK>X48iQZItc< zXonK*311fMGYyf$J`!kcIwj<7(f96f(Sz%$7;rYp9({yTzwTXbU zTt`ssvw2BRUdM#f%AD(^|1zDv*|tXIZ?z7xEnD6&ZALgg{%OJ9IP6W@ zBh)uaTTq@w-l_aiX$O|CVX=9ePH`$v^v!K(xX3@#h*#@RM``m=FKX{B4_hzOEPs;j zQ(Fo4)?r8Oi6l$dDX(H+JM%hT6ZprxM!V&DYxz`<)~j_gjcnPc<950-`^JSV|FyZV zIw+?~gZJlNVR>4eX;=N5yGr%1c)dO=)Z1z8Ct+`^TLG`y^wZO)IlxmS?H0%73VDczL$yWra4$ zQd=nP^J*s#mNn_C%8lev|J}vZ<(2hm(;*+LIJNw4d6pLSfNiFvd)hgIeb(7L>XW3M z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oDYO)rG&kUyIQI literal 0 HcmV?d00001 diff --git a/tests/fixtures/histogram-decode-11-02-26/T193KR5M.X90H b/tests/fixtures/histogram-decode-11-02-26/T193KR5M.X90H new file mode 100755 index 0000000000000000000000000000000000000000..435b225669694465ac8180aa26d7fbbf7b01eda3 GIT binary patch literal 1686 zcmb`HT}%{L6vzKF4D1)|%q$B{T2t>r+aPu+u&Yuk0wSiyMF~(}o5}8oQ*oBeF17TD zn5Jp%gFZB=8XuY_O^hTaCjA8Llc83iHBI^vVTF~61XsCzktqzsN9pgErf#E+YYfL7{Q?c+*gcPP|QQ?~=CtF75l54Xdy`0r`az{i>M z@ev)Gu5~C$m38(FBsRv4rco^b0u}xrXRAbS1w`hCqiMAL?WV5}{bmtuJ%b-NIlD=# zm}10Oml};5F-`Af-D+~6ADu@04KT@A8ULseKk#s6o;_P3I%9#dnqwWOMWom53D z2v<>R^%#my)Eqh?q6%ev0VmKIpk@4{bzs-ov*$Fu#@6U1I=q|jBD{s752;4-$wx)r zN4T0sMdEtzlaJc}Il@~hyhDpdsNr!9ln8M1KXKEP{b*`9ME79lhuaVKCp7H5(2%Z* zY(dWgstPF;v-cft$0FqNvV8l3ou`16*S4*_hw^%4w{uofI8XyT^98+Keb|8V5Y{di z{A&9}pg%~qC05Kbo%(=p0@e`mm!XsY2p|e9vKiATb;47$(fl{>Q*|PHO)-MQb!^rnwp4+i8P`)IZGhY zMj|Rp8PiN$L2a{zVP&3ut9h7@%yrsTsM33VYI9|+Kynq)*F|dtP<|Lsd!6|k;orC! L0s0rjrBD9`5J7_t literal 0 HcmV?d00001 diff --git a/tests/fixtures/histogram-decode-11-02-26/T193KR5M_X90H_XML.XML b/tests/fixtures/histogram-decode-11-02-26/T193KR5M_X90H_XML.XML new file mode 100755 index 0000000..ba2492c --- /dev/null +++ b/tests/fixtures/histogram-decode-11-02-26/T193KR5M_X90H_XML.XML @@ -0,0 +1,140 @@ + + +8.0 +Full Histogram +BE18193 +V 10.72-8.17 MiniMate Plus +T193KR5M.X90H +17:22:21 +2024-10-07 +17:22:38 +2024-10-07 + +Tran +Vert +Long +MicL + +9.00 +2 seconds +1024 sps +6.3 Volts +July 10, 2024 by Instantel +in/s and dB(L) +I-80- North Fork Bridges-543 Plank Rd +Fay Company +Terra-Mechanics Inc - Harrison +Loc #1 -Main Line- Area 2 - 543 Plank Rd + +10.000 +in/s + + +2.290 +in/s + + +5.515 +in/s + + +1.520 +in/s + + +11 +Hz + + +34 +Hz + + +18 +Hz + +17:22:37 +2024-10-07 +17:22:37 +2024-10-07 +17:22:37 +2024-10-07 + +5.818 +in/s + +17:22:37 +2024-10-07 +Linear Weighting + +108.0 +dB(L) + +17:22:37 +2024-10-07 + +57 +Hz + +7.6 Hz. +3.7 +Passed +7.7 Hz. +3.5 +Passed +7.5 Hz. +3.6 +Passed +0.0 Hz. +0 mv +Check + + +2024-10-07 17:22:20 - 2024-10-07 17:22:38 "Event Recorded Modem Exit" + + + Tran Peak in/s + Tran Freq Hz + Vert Peak in/s + Vert Freq Hz + Long Peak in/s + Long Freq Hz + Geo PVS in/s + MicL Peak psi(L) + MicL Peak dB(L) + MicL Freq Hz + + + + +0.005>1000.005>1000.010>1000.0110.000104.264 + + +0.005>1000.005>1000.005>1000.0090.000104.264 + + +0.005>1000.005>1000.005>1000.0090.000104.264 + + +0.005>1000.005>1000.005>1000.0090.000104.264 + + +0.005>1000.005>1000.005>1000.0090.000104.264 + + +0.005>1000.005>1000.005>1000.0090.000104.273 + + +0.005>1000.010>1000.005>1000.0110.000104.264 + + +2.290115.515341.520185.8180.001108.057 + + +0.010>1000.0202.90.005>1000.0220.001104.964 + + + + + + diff --git a/tests/test_bw_file_fields.py b/tests/test_bw_file_fields.py index 1dc7b6a..eb9f843 100644 --- a/tests/test_bw_file_fields.py +++ b/tests/test_bw_file_fields.py @@ -303,3 +303,35 @@ def test_the_h5_carries_the_job_number(tmp_path): event_hdf5.write_event_hdf5(tmp_path / "e.h5", ev, serial="BE9557") with h5py.File(tmp_path / "e.h5", "r") as f: assert (bool(f.attrs["job_number_enabled"]), int(f.attrs["job_number"])) == (False, 802) + + +# ── Histograms: the codec follows the record type, and loud short blocks ───── +_HD = "histogram-decode-11-02-26" + + +def test_a_histogram_body_goes_to_the_histogram_codec(): + # BE9440, 2018, 5 s intervals. The waveform codec accepted this body when + # it was tried first, and returned ~5x too many "samples". Blastware's + # report: 6,976 intervals, PPV 0.180 / 0.195 / 0.215, PVS 0.270, start + # 2018-04-26 07:53:41. + ev = read_blastware_file(_FIX / _HD / "K440HDXX.XH0H") + assert ev.record_type == "Histogram" + assert len(ev.raw_samples["Tran"]) == 6976 + pv = ev.peak_values + for got, want in zip((pv.tran, pv.vert, pv.long, pv.peak_vector_sum), + (0.180, 0.195, 0.215, 0.270)): + assert abs(got - want) <= 0.0005 + 1e-9, (got, want) + ts = ev.timestamp + assert (ts.year, ts.month, ts.day) == (2018, 4, 26) + + +@pytest.mark.parametrize("name,n", [ + ("T193KR5M.X90H", 9), # 2 s; its 8th interval is 5.8 in/s of vector sum + ("K440HA3C.JM0H", 8), # 5 s +]) +def test_a_loud_interval_does_not_hide_a_short_histogram(name, n): + # A short (one-block) sub-minute histogram is found by its record layout. + # An interval louder than 1.28 in/s has a vector sum squared above 65,535, + # which the old "first word is 0000" test rejected. + ev = read_blastware_file(_FIX / _HD / name) + assert len(ev.raw_samples["Tran"]) == n diff --git a/tests/test_decode_check.py b/tests/test_decode_check.py index b9848de..a37dca5 100644 --- a/tests/test_decode_check.py +++ b/tests/test_decode_check.py @@ -187,3 +187,37 @@ def test_a_job_number_only_sfm_shows_is_a_mismatch(): side.job_number = "1" res = {r.field: r for r in compare(side, parse_xml_report_file(FIX / "R352HFZ7_530H_XML.XML"))} assert res["JobNumber"].verdict == "mismatch" + + +@pytest.mark.parametrize("stem", ["T193KR5M.X90H", "K440HA3C.JM0H"]) +def test_a_loud_short_histogram_matches_blastware(stem): + hd = FIX.parent / "histogram-decode-11-02-26" + res = {r.field: r for r in compare(sfm_side((hd / stem).read_bytes()), + parse_xml_report_file(hd / (stem.replace(".", "_", 1) + "_XML.XML")), + CARVEOUTS)} + for f in ("NumberofIntervals", "intervals.Tran Peak in/s", "intervals.Vert Peak in/s", + "intervals.Long Peak in/s"): + assert res[f].verdict == "match", (f, res[f]) + + +def _count_case(extra, drop_rows=0): + jf = FIX.parent / "job-number-11-02-26" + ref = parse_xml_report_file(jf / "T438I4V5_DJ0H_XML.XML") + rows = len(ref.intervals) + ref.scalars["NumberofIntervals"] = f"{rows + extra}.00" + if drop_rows: + ref.intervals = ref.intervals[:-drop_rows] + side = sfm_side((jf / "T438I4V5.DJ0H").read_bytes()) + return {r.field: r for r in compare(side, ref, CARVEOUTS)}["NumberofIntervals"] + + +def test_blastware_counting_the_monitoring_time_is_accepted(): + # Blastware's Number of Intervals is (stop - start) / interval. When the + # unit never wrote the last minute, Blastware's own table lists one block + # fewer, and SFM matches the table (T193KSWP.FF0H: 2,880 against 2,850 rows). + r = _count_case(30) + assert (r.verdict, r.carveout) == ("accepted", "interval-count-is-duration") + + +def test_the_count_carveout_needs_blastwares_own_table_to_agree_with_sfm(): + assert _count_case(30, drop_rows=1).verdict == "mismatch" diff --git a/tests/test_histogram_codec.py b/tests/test_histogram_codec.py index 74ed89c..9b6522a 100644 --- a/tests/test_histogram_codec.py +++ b/tests/test_histogram_codec.py @@ -525,18 +525,28 @@ from minimateplus.histogram_codec import ( # noqa: E402 def _mk_multi_block(intervals, seg=0, ctr=256): - """Build one multi-interval block from a list of 8-tuples.""" - b = bytearray() - b += bytes([0x00, seg]) - b += int(ctr).to_bytes(2, "little") - b += bytes([0x0A, 0x00]) + """Build one multi-interval block from a list of 8-tuples (T, Tf, V, Vf, L, + Lf, M, Mf) in the measured layout: big-endian from byte 5, each record ending + in its PVS squared -- here the largest geo peak squared, which every real + record is consistent with (34,502,955 / 34,502,955 DL2 intervals).""" + b = bytearray([0x00, seg]) + int(ctr).to_bytes(2, "little") + bytes([0x0A]) + for iv in intervals: + for v in iv: + b += int(v).to_bytes(2, "big") + b += (max(iv[0], iv[2], iv[4]) ** 2).to_bytes(4, "big") + b += bytes(7) + assert len(b) == 12 + 20 * len(intervals) + return bytes(b) + + +def _mk_legacy_le_block(intervals, seg=0, ctr=256): + """The retracted model's bytes: 8 x uint16 LITTLE-endian from byte 6.""" + b = bytearray([0x00, seg]) + int(ctr).to_bytes(2, "little") + bytes([0x0A, 0x00]) for iv in intervals: for v in iv: b += int(v).to_bytes(2, "little") - b += (0).to_bytes(2, "little") - b += (5).to_bytes(2, "little") + b += (0).to_bytes(2, "little") + (5).to_bytes(2, "little") b += bytes(6) - assert len(b) == 12 + 20 * len(intervals) return bytes(b) @@ -569,7 +579,7 @@ def test_multi_interval_values_are_not_little_endian_from_byte_6(): tests/test_histogram_multi_interval.py for the measured cases. """ ivs = [(0x0100, 1, 1, 1, 1, 1, 1, 1), (1, 1, 1, 1, 1, 1, 1, 1)] - body = _mk_multi_block(ivs) + _mk_multi_block(ivs, ctr=257) + body = _mk_legacy_le_block(ivs) + _mk_legacy_le_block(ivs, ctr=257) assert walk_multi_interval_blocks(body)[0]["t_peak"] != 0x0100 diff --git a/tests/test_histogram_multi_interval.py b/tests/test_histogram_multi_interval.py index 3a0511d..4547ac8 100644 --- a/tests/test_histogram_multi_interval.py +++ b/tests/test_histogram_multi_interval.py @@ -56,7 +56,7 @@ def _block(records, *, ctr=0x0100, seg=0, mic=True, last=False) -> bytes: assert len(r) == (8 if mic else 6) for v in r: b += int(v).to_bytes(2, "big") - b += b"\x00\x00" + b"\x00\x2d" # the zero word, then one more + b += (max(r[0], r[2], r[4]) ** 2).to_bytes(4, "big") # PVS², consistent as on real data b += b"\xfc\xf3\x00" + (TERMINAL if last else b"\x5a\x0a\x00\x00") return bytes(b) From dd9f6dde7a47f28e44c5efc9e923d059cc33e236 Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 11:32:57 -0500 Subject: [PATCH 08/13] docs(changelog): Unreleased -- histograms go to the histogram codec Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 855362f..d7d8e6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,38 @@ All notable changes to seismo-relay are documented here. - ⚠ **Codec change: bump `TOOL_VERSION` at the next release.** The backfill (`backfill_sidecars.py` then `backfill_event_shape.py`) rewrites stored Sensitive events' peaks and `.h5` files. No schema change. +- **Histograms go to the histogram codec, and a loud interval no longer hides + a short one.** These were the histograms the decode checker found decoding + wrongly. + - **The codec now follows the record type.** The file decoder used to try the + waveform codec first, whatever `STRT[18]` said. That codec accepted BE9440, + BE9557 and BE17354's 2018 5 s histograms and returned about 5× too many + "samples" (K440HDXX.XH0H: 44,504 against Blastware's 6,976). Only an + unknown type still falls back to trying both, and a chosen codec that + fails is now a decode problem rather than a silent switch. + - **A loud interval no longer breaks the sub-minute layout check.** The check + required each record's "zero word" to be `0000`. That word is the high word + of the interval's PVS², which is non-zero above 1.28 in/s, so a one-block + histogram with a loud interval decoded to nothing (T193KR5M.X90H, + K440HA3C.JM0H, R352HFZ7.530H). + - The check is now the measured relation peak ≤ PVS ≤ √3·peak. It holds + on 34,502,955 / 34,502,955 DL2 sub-minute intervals. + - The trim for a stream with no terminal tail uses the same test. + - **New decode-checker carve-out, `interval-count-is-duration`.** Blastware's + "Number of Intervals" is (stop − start) / interval. When the unit never + wrote the last minute, Blastware's own interval table lists one block + fewer, and SFM matches the table. It covers 8 events. + - **Decode checker:** 462 comparisons fixed, 0 regressions, 16 of 88 fields + fully match (was 11). + - Every DL2 histogram's Tran / Vert / Long interval peaks now match + Blastware (bar the clipped intervals the saturation carve-out covers). + - Channels 70,042 / 70,042. + - Histogram start dates a day off: 26 → 9. + - Peak vector sum mismatches: 45 → 18. + - ⚠ **Codec change:** it rides the next release's `TOOL_VERSION` bump and + backfill (`backfill_sidecars.py` then `backfill_event_shape.py`). Those + files are stored wrongly on prod today, and the backfill rewrites them. No + schema change. ### Added - **A Blastware file's job number, and whether Blastware shows it.** From 8a40eb638a37eaf6cd568288ab146c22ce5f6620 Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 12:10:44 -0500 Subject: [PATCH 09/13] fix(decode): a Blastware file's footer is its last 26 bytes -- no more day-late histograms Every DL2 file ends in a valid footer: 0e 08 and two valid times on 70,041 / 70,041. The decoder took the first '0e 08 + plausible year' instead, and 14 files also hold an earlier record, ~1.1 KB before the end, with the stop time followed by zeros: - a histogram started at its own stop -- a day late on BE9558's daily histograms (K558L9XP.FK0H: 2025-10-08 19:10:01 for Blastware's 2025-10-07 19:14:08); T003LCYV.JD0H got no time at all; - a waveform lost its stop, so the trigger was never computed and the stop was stamped instead (K440I4LG.JK0W: 11:14:12 for 11:14:08). The last 26 bytes are now taken when they are a footer; otherwise the old search stands unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- minimateplus/event_file_io.py | 44 +- tests/fixtures/footer-11-03-26/K440I4LG.JK0W | Bin 0 -> 10250 bytes tests/fixtures/footer-11-03-26/K558L9XP.FK0H | Bin 0 -> 47754 bytes tests/fixtures/footer-11-03-26/T003LCYV.JD0H | Bin 0 -> 6504 bytes .../footer-11-03-26/T003LCYV_JD0H_XML.XML | 548 ++++++++++++++++++ tests/test_bw_file_fields.py | 30 + 6 files changed, 606 insertions(+), 16 deletions(-) create mode 100755 tests/fixtures/footer-11-03-26/K440I4LG.JK0W create mode 100755 tests/fixtures/footer-11-03-26/K558L9XP.FK0H create mode 100755 tests/fixtures/footer-11-03-26/T003LCYV.JD0H create mode 100755 tests/fixtures/footer-11-03-26/T003LCYV_JD0H_XML.XML diff --git a/minimateplus/event_file_io.py b/minimateplus/event_file_io.py index f2a6dfa..0dbc16c 100644 --- a/minimateplus/event_file_io.py +++ b/minimateplus/event_file_io.py @@ -1098,22 +1098,34 @@ def decode_blastware_bytes(raw: bytes, *, name: Optional[str] = None) -> Event: # Footer: locate the 0e 08 marker, validating the year is in a sane range. body_start = _bw._WAVEFORM_HEADER_SIZE + 21 - # The 0e 08 + plausible-year footer signature can occur inside the sample - # stream. Collect every candidate and prefer the first whose body yields a - # waveform record chain terminating on the 0x06 marker; fall back to the - # first candidate otherwise. Blast radius measured 2026-08-25: changes the - # chosen footer on exactly 1 of 1,388 series-3 waveform files - # (BE17353/S353L4O5.OX0W, false positive at 3800, real footer at 8576). - footer_candidates = [] - pos = body_start - while True: - pos = raw.find(b"\x0e\x08", pos) - if pos < 0 or pos + 26 > len(raw): - break - yr = (raw[pos + 4] << 8) | raw[pos + 5] - if 2015 <= yr <= 2050: - footer_candidates.append(pos) - pos += 1 + # The footer is the file's last 26 bytes whenever they are one -- 0e 08 and + # two valid times: 70,041 / 70,041 DL2 files (measured 2026-11-03). Taking + # the first "0e 08 + plausible year" instead found, on 14 of them, an + # earlier record ~1.1 KB before the end holding the stop time and zeros: a + # histogram then started at its own stop (a day late on BE9558's daily + # histograms) and a waveform lost its stop, so its trigger time too. + # + # Otherwise the search below stands. The signature can occur inside the + # sample stream, so it prefers the first candidate whose body yields a + # waveform record chain terminating on the 0x06 marker, then the first + # candidate (2026-08-25: BE17353/S353L4O5.OX0W, false positive at 3800, + # real footer at 8576). + end = len(raw) - 26 + if (end >= body_start and raw[end:end + 2] == b"\x0e\x08" + and _bw._decode_ts_be(raw[end + 2:end + 10]) is not None + and _bw._decode_ts_be(raw[end + 10:end + 18]) is not None): + footer_candidates = [end] + else: + footer_candidates = [] + pos = body_start + while True: + pos = raw.find(b"\x0e\x08", pos) + if pos < 0 or pos + 26 > len(raw): + break + yr = (raw[pos + 4] << 8) | raw[pos + 5] + if 2015 <= yr <= 2050: + footer_candidates.append(pos) + pos += 1 footer_pos = -1 for cand in footer_candidates: diff --git a/tests/fixtures/footer-11-03-26/K440I4LG.JK0W b/tests/fixtures/footer-11-03-26/K440I4LG.JK0W new file mode 100755 index 0000000000000000000000000000000000000000..7537a4b07b175498629505c88db4b9eb888364ec GIT binary patch literal 10250 zcma)?dvG0BeaFwaT3Ofj)!nmKiYtPmyZ2rN1UR;Ir4SSHa4b0qB?%#Zz%VJrI0|uV z>@;=)1BGNt7@(z03oXe^fo4jW0nDrIP^OV$!UR%gEXN)KpaKld`A)PIKRufvp8 zi@J@YimKn*wbOLDjNo}DABKscZ!Sb|m6`r5X)a=|XvMsEUPE&kcg zlq%b{l^NH~PuHHF7#|<6*Mm5AGnJuhci%p`cgKK-)f`WJU#qvhYIUc{;@VL4nNFo6 zL1&Q%N|d2_q3oG7?rOs)br1QeGb)))0`pJP^;l&p7jNG+ zJUl=yG^c{5n)^UPtf9t`FRP`>qkv0>3p;iP7otVK*O4PfkpXAA7RiOuPc(hK5Ee<$?iLS`|9b zSCJBN+?=UR9veIIt%-WQ5tX-%?ArYy-)YOXwVLeCYB3?(<0S5WL0?F=i+|>mGhVmJ zU_&8O*2&4R872|%Ou`1FQ!bT_X(WKU8F@tkL*hoBVc5`Ufisy-kRUE0ID7ojqqb!51Psp zG7L@-yo}MXnPg9rT>X&lg){Jt@>NmDt1%UavAYrk!4#h!(9$HcJ36YB;f{_{DdUky z;M0_}_KIP1dS+tc7zrG!$SZerR7QpdtHJ_|Z@f^*I0=JbW^y8Nn>q=?05_53M`%)nyK80&`R=dBwOkeq?;&`0=2ba!mcJx(ALCFSV*x(--Aog~Zif z5-8sbNk^tLkgmN_PY`1egiVg{9EnT}_@jtZT}9?W_(VwDLyw#=1Z{;+B+E#0Rjvxl zI%dQ(WPFE-Cz?8Beh3qkaK_d*rKh%I$g1_vwUvdIUN6OVlJ$k@d3 zCr^5VgTo`kgM$M&qf)I_2TQ(5R)X5(eR8}1R$2y*&k)nJyuAd>{~42S?9K6y#Yo0;M%W5}0; z8pHRnMl&bpiL<~h#2&+}R1BGGIzg;h48zD3`6!MP`a~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FSz&@9ZZrcU<9qL1y~}l;^aewu!todvjCseonG^_t&V`V$v5&TG(~laI)F{xhGy*G;|@J<}9BPTSAiycIQ%j9~7UPwfxF zyTA7DJ-)fn&Al>yj-(zz%>}!Nu3PU}wa0{4G>PP1P0C2gSPyhe` literal 0 HcmV?d00001 diff --git a/tests/fixtures/footer-11-03-26/K558L9XP.FK0H b/tests/fixtures/footer-11-03-26/K558L9XP.FK0H new file mode 100755 index 0000000000000000000000000000000000000000..e9d1aebb725c1218d585429013cb28b89a907504 GIT binary patch literal 47754 zcma*wd7w>I-v{u0&e{8%bLV?anc|w~nGBg{GS8WBTwKG&rOYB_Rv9vjkS2wYIikpL zQ}uNGp;)|uET?diz5tLGQQ-; z@Q}x|iSk!ehlk0d)cJKC504-ZTiHc?!M*TEa>oh_ulqVYiaccH6yCTMJeu6GG6>Jv z0v_Y>Sm94r!ehxpRvzK6UWLbzJL>wJxDSu_xGX&qN-ya){$E@gY1jd88E~yz49QEacHvobcv-;LnhUtgOP<&VpwpNBQ}h!n2Xv z>i*3f2hUC(wB+@h`#d}cxnpG%pTD{UJSTaiy8rij!k;A%T5jvL0=F*1b9r1|pP}*a z+~kfrz5}}cB$9_z{cd9;J`Z`&iV>fGUDwaNTy~B@{WNQBac$`FWwI?PLB39Uwa91^uN1e5MPoU{qL|J;ibrf>iT6~1~2XL zOyc_VTL3RZ9D;loG2iZP)6oXgtc(geGX1aY=CP({UtlM`LkLMEci@T%z=gD#XA02~N zCAU@k>R13?joeY==UXqstCNS+`2FM{yau_W>i<$*KWmcPs{P&^j`&*S7+;p_{<}6g z#`jwf5MPHJ<4;N*cwLXn_SIh3uX^MmRew%RLVSIX%lzZYHFyK^pe5_~KiS|7$x%NC zW`Z~JxU4@jj=&p}JC>|J6UxG0AV+@E@DjWUInHli2;S7=GC!Ex8s5y~GQX;p4sT8# zsqXK^g76j|m;GbWo$!|AxIPbc`)x%YQvJh#e-PiAJgBbEgHPdY$Rkw!Uw$6m)^IgG zB)aX(N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0 +Full Histogram +BE18003 +V 10.72-8.17 MiniMate Plus +T003LCYV.JD0H +18:04:25 +2025-12-05 +20:30:00 +2025-12-05 + +Tran +Vert +Long +MicL + +145.00 +1 minute +1024 sps +7.0 Volts +March 14, 2025 by Instantel +in/s and dB(L) +I-80-North Fork Bridges-I80 E. Abutment +Fay Company +Terra-Mechanics, Inc - Harrison +Area 2 - Loc 3 - I-80 - East Abutment + +10.000 +in/s + + +0.035 +in/s + + +0.090 +in/s + + +0.045 +in/s + + +11 +Hz + + +43 +Hz + + +37 +Hz + +20:10:25 +2025-12-05 +19:09:25 +2025-12-05 +20:09:25 +2025-12-05 + +0.099 +in/s + +19:09:25 +2025-12-05 +Linear Weighting + +124.7 +dB(L) + +18:19:25 +2025-12-05 + +2.4 +Hz + +7.7 Hz. +3.5 +Passed +7.6 Hz. +3.1 +Passed +7.4 Hz. +3.9 +Passed +20.1 Hz. +767 mv +Passed + + +2025-12-05 18:04:24 - 2025-12-05 20:30:00 "Event Recorded Timer Stop" + + + Tran Peak in/s + Tran Freq Hz + Vert Peak in/s + Vert Freq Hz + Long Peak in/s + Long Freq Hz + Geo PVS in/s + MicL Peak psi(L) + MicL Peak dB(L) + MicL Freq Hz + + + + +0.020130.070230.030170.0750.003121.51.9 + + +0.0207.60.070470.025470.0740.003119.1>100 + + +0.020140.080340.030340.0840.002118.33.6 + + +0.0207.80.060470.025210.0640.003121.01.9 + + +0.0205.30.055470.020180.0590.004122.82.1 + + +0.030430.080430.035430.0880.003121.04.2 + + +0.025120.085430.035470.0920.003119.82.1 + + +0.0203.20.055470.025200.0610.003119.4>100 + + +0.0205.50.055730.025370.0620.002117.6>100 + + +0.025110.065430.035430.0720.004121.818 + + +0.025130.075470.030510.0810.002118.63.5 + + +0.025120.065470.030510.0720.003120.0>100 + + +0.025110.060470.025390.0650.003119.92.6 + + +0.020130.070470.030430.0770.003119.712 + + +0.025280.065430.030340.0730.005124.72.4 + + +0.025120.060470.025430.0660.003119.41.9 + + +0.0259.80.065470.025390.0700.003121.05.1 + + +0.025200.075430.030510.0790.003119.02.5 + + +0.025170.060470.020510.0630.004122.12.0 + + +0.0207.60.060470.020390.0640.003120.64.4 + + +0.0207.50.075370.030300.0820.002118.25.0 + + +0.025160.060260.025240.0640.003121.43.6 + + +0.025210.080370.030430.0840.003120.13.4 + + +0.025200.045240.020200.0480.002118.12.6 + + +0.025200.060430.025230.0650.003120.12.1 + + +0.0206.30.045220.020300.0510.002115.92.6 + + +0.030240.070390.030390.0730.004122.82.3 + + +0.0205.40.065470.025430.0700.003120.93.1 + + +0.025110.050470.025170.0570.003121.313 + + +0.020220.060470.030300.0660.004122.03.0 + + +0.025200.070470.035180.0770.003120.64.8 + + +0.0205.10.045220.020300.0510.002116.7>100 + + +0.025160.065470.025430.0700.003120.2>100 + + +0.020130.065470.025230.0700.003119.32.3 + + +0.0203.70.055470.020430.0590.003121.32.2 + + +0.020190.065470.030370.0680.004123.111 + + +0.025220.065470.025430.0700.002118.117 + + +0.025270.055470.025390.0620.002118.6>100 + + +0.0206.30.060430.025430.0650.002116.96.3 + + +0.025120.065430.030430.0720.004122.54.1 + + +0.0202.60.060430.025430.0660.004122.05.7 + + +0.0206.20.060470.025110.0640.004121.91.7 + + +0.025140.070430.030430.0760.004122.11.9 + + +0.025340.070430.030180.0760.003120.115 + + +0.0203.50.065470.025570.0700.004121.81.9 + + +0.025180.065430.025240.0690.002117.62.5 + + +0.025100.065430.030470.0700.004122.02.5 + + +0.0204.20.050220.020140.0560.003119.12.7 + + +0.0201.90.055470.020340.0590.004122.14.3 + + +0.020<1.00.065470.025470.0700.002117.22.1 + + +0.020170.065470.025430.0700.003121.1>100 + + +0.020<1.00.060470.025570.0650.003119.81.9 + + +0.025150.070430.025430.0740.003120.94.7 + + +0.0205.90.050220.020280.0510.002117.1>100 + + +0.025130.070470.030510.0770.002117.41.9 + + +0.025270.055850.030170.0580.003120.21.8 + + +0.020170.055430.020430.0590.004123.13.7 + + +0.020<1.00.065430.030430.0700.003120.4>100 + + +0.0206.60.065430.025430.0700.003119.6>100 + + +0.030170.085430.035570.0920.004122.82.2 + + +0.025240.055470.025390.0620.002117.8>100 + + +0.025120.050230.025260.0580.002116.451 + + +0.025140.055430.025260.0590.003119.02.2 + + +0.025110.070470.035300.0780.002117.21.9 + + +0.025150.090430.040470.0990.003120.24.7 + + +0.025170.065470.030430.0720.003119.63.6 + + +0.0203.60.060570.030280.0620.003119.8>100 + + +0.025320.065470.035270.0740.003120.24.0 + + +0.025160.065430.025240.0690.003119.6>100 + + +0.020160.040240.020220.0470.002117.4>100 + + +0.020190.065470.025430.0700.002116.72.0 + + +0.025160.070390.035510.0800.004121.92.0 + + +0.025120.080430.035270.0870.003119.72.7 + + +0.025200.070470.030510.0760.003119.46.7 + + +0.030200.065430.030510.0720.003121.64.7 + + +0.020<1.00.065390.025260.0690.003119.94.1 + + +0.0254.70.060470.030220.0650.002117.91.5 + + +0.025230.065470.030370.0700.002118.22.2 + + +0.020160.065470.025390.0710.003120.02.9 + + +0.0204.00.045340.020180.0500.003118.7>100 + + +0.0202.90.055230.025170.0620.002118.5>100 + + +0.025470.070470.030470.0750.004122.72.7 + + +0.0259.70.065430.035280.0740.003121.12.0 + + +0.025570.090470.040510.0970.003121.31.9 + + +0.025110.050220.020340.0560.002114.82.3 + + +0.025200.065470.030470.0720.003119.151 + + +0.025130.055430.025430.0610.004122.02.6 + + +0.015<1.00.015180.015120.0260.001108.0>100 + + +0.0202.90.050210.025220.0580.002117.2>100 + + +0.0208.30.060470.030240.0660.003121.51.9 + + +0.0205.80.040230.020230.0470.002114.4>100 + + +0.020120.055430.020390.0590.003121.02.8 + + +0.025130.055220.030200.0660.002117.63.1 + + +0.0207.30.050390.020320.0560.004122.22.5 + + +0.030230.070430.035470.0770.003120.3>100 + + +0.025180.065430.025510.0700.004121.82.0 + + +0.020320.065430.035170.0700.003120.114 + + +0.025170.060260.025230.0650.002116.1>100 + + +0.025200.060230.030240.0700.002116.9>100 + + +0.025130.075470.035510.0810.003121.56.0 + + +0.025180.050210.025220.0560.002117.2>100 + + +0.025220.055430.025180.0590.003119.63.0 + + +0.020<1.00.070470.030470.0770.002118.3>100 + + +0.0208.10.030390.020230.0370.002116.6>100 + + +0.025170.070470.025240.0740.002118.63.3 + + +0.0206.20.065430.030510.0720.003118.82.6 + + +0.020130.035210.020200.0410.001112.8>100 + + +0.025140.075470.030470.0810.004121.71.9 + + +0.025120.065430.030370.0720.004121.92.0 + + +0.025160.065430.025470.0700.003120.615 + + +0.025220.060430.030510.0650.003120.72.0 + + +0.025210.060470.025370.0660.003121.12.1 + + +0.0203.60.065470.030470.0720.004121.9>100 + + +0.030180.075470.030510.0790.003121.5>100 + + +0.025120.075430.035300.0810.003119.41.8 + + +0.025200.050220.025230.0570.002115.0>100 + + +0.025110.060470.025180.0660.003119.12.4 + + +0.025220.065470.030390.0730.003119.02.4 + + +0.025150.070470.030430.0760.003119.72.1 + + +0.025160.050340.025390.0550.002115.9>100 + + +0.0206.20.045340.020300.0490.002117.62.3 + + +0.025270.055240.025160.0610.002115.44.9 + + +0.0253.50.090470.040570.0970.004123.12.1 + + +0.025170.060430.025510.0660.003119.92.3 + + +0.025320.090430.045370.0980.002118.61.9 + + +0.035110.070470.030510.0770.003120.33.7 + + +0.025130.065430.025200.0700.002117.4>100 + + +0.0205.30.050240.025260.0590.002118.2>100 + + +0.025130.055470.025430.0610.002117.1>100 + + +0.020130.060470.025510.0640.002118.34.0 + + +0.020120.035240.020190.0430.002115.7>100 + + +0.020100.065430.030510.0720.002117.8>100 + + +0.025320.065430.025430.0690.004123.32.1 + + +0.020130.065470.030370.0700.003119.64.1 + + +0.0203.80.055230.025240.0620.003120.0>100 + + +0.0207.20.050390.025390.0570.002117.8>100 + + +0.0203.20.050230.025260.0590.002116.62.5 + + +0.0206.20.055230.025370.0620.002118.3>100 + + +0.025130.065470.030240.0720.003120.21.8 + + +0.025180.050320.025340.0570.002116.9>100 + + +0.025130.080470.035510.0870.002118.51.9 + + +0.0206.60.040230.020300.0460.002117.6>100 + + +0.020170.040210.020230.0470.002115.2>100 + + +0.025180.090730.040510.0930.003119.3>100 + + +0.025280.075430.030570.0810.004122.22.2 + + + + + + diff --git a/tests/test_bw_file_fields.py b/tests/test_bw_file_fields.py index eb9f843..f3a39d2 100644 --- a/tests/test_bw_file_fields.py +++ b/tests/test_bw_file_fields.py @@ -335,3 +335,33 @@ def test_a_loud_interval_does_not_hide_a_short_histogram(name, n): # which the old "first word is 0000" test rejected. ev = read_blastware_file(_FIX / _HD / name) assert len(ev.raw_samples["Tran"]) == n + + +# ── The footer is the file's last 26 bytes ────────────────────────────────── +# Every DL2 file ends in a valid footer (70,041 / 70,041: 0e 08 and two valid +# times). A few also hold an earlier "0e 08 + date" record, ~1.1 KB before +# the end: the stop time followed by zeros. The first-match footer search took +# it, so a histogram started at its own stop -- a day late on BE9558's daily +# histograms -- and a waveform lost its stop and its trigger time. +_FT = "footer-11-03-26" + + +def test_a_histogram_starts_at_its_footer_not_at_an_earlier_stop_record(): + ts = read_blastware_file(_FIX / _FT / "K558L9XP.FK0H").timestamp + # Blastware: 2025-10-07 19:14:08 (SFM read 2025-10-08 19:10:01) + assert (ts.year, ts.month, ts.day, ts.hour, ts.minute) == (2025, 10, 7, 19, 14) + + +def test_a_histogram_with_the_early_record_gets_its_time(): + ts = read_blastware_file(_FIX / _FT / "T003LCYV.JD0H").timestamp + # Blastware: 2025-12-05 18:04:25 (SFM had no time at all) + assert ts is not None + assert (ts.year, ts.month, ts.day, ts.hour, ts.minute) == (2025, 12, 5, 18, 4) + + +def test_a_waveform_with_the_early_record_is_timed_from_its_trigger(): + ev = read_blastware_file(_FIX / _FT / "K440I4LG.JK0W") + ts = ev.timestamp + # Blastware: 2019-09-26 11:14:08, record time 4 s (SFM read the stop, 11:14:12) + assert (ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second) == (2019, 9, 26, 11, 14, 8) + assert ev.timestamp_source in ("event_record", "estimate") From e1e8a851c8677d86b9e6d0f7fdddeba6f37edef9 Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 12:12:02 -0500 Subject: [PATCH 10/13] docs: where the 1995 default-clock events come from Brian's account: units come back from calibration with the internal battery unplugged, so a comms-test trigger before the date is set carries the default. DL2 holds 17 such events on 6 units, all within 1995-09-01 12:02 .. 09-03 11:24. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- docs/instantel_protocol_reference.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index d3a3b16..8fbdfe4 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -2669,6 +2669,11 @@ Appears in event index blocks. Time-of-day fields (hour/min/sec) are absent. | `1E` | 30 | Day (0x1E = 30 decimal) | ✅ CONFIRMED | > ✅ **2026-02-26 — CONFIRMED:** The year 1995 is the **MiniMate Plus factory default RTC date**, which the device reverts to whenever the internal battery is disconnected or the real-time clock loses power. Any event timestamped around 1995 means the clock was not set. This is known device behavior, not an encoding anomaly. +> +> **2026-11-03 — where they come from (operator account, Brian):** units come back from calibration with the internal battery unplugged, so an event triggered while testing communications, before anyone sets the date, carries the default. +> - **DL2 (measured):** 17 such events on 6 units (BE9440, BE9557, BE11529, BE17354, BE18189, BE18190). All fall between 1995-09-01 12:02:02 and 1995-09-03 11:24:06, most of them between 12:02 and 13:01 on 1 September. +> - 🔶 **Inferred:** the clock restarts at a fixed default near 1995-09-01 12:00 and runs from power-up. +> - These files still end in a valid footer. SFM reads the 1995 times and reports them as `CLOCK_NOT_SET` (`models.Timestamp`). ### 8.2 9-byte format (Full Waveform Record / SUB 0C, sub_code=0x10) > ✅ **CONFIRMED 2026-04-01** — Cross-referenced against Blastware event report From fcacc8f28c59ab3ac8f31f099c6ded3610cf929d Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 13:04:13 -0500 Subject: [PATCH 11/13] docs(changelog): Unreleased -- the footer is the file's last 26 bytes Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d8e6d..d2d3d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,30 @@ All notable changes to seismo-relay are documented here. backfill (`backfill_sidecars.py` then `backfill_event_shape.py`). Those files are stored wrongly on prod today, and the backfill rewrites them. No schema change. +- **A Blastware file's footer is its last 26 bytes: no more day-late + histograms.** + - **Measured:** every DL2 file ends in a valid footer (`0e 08` and two valid + times), 70,041 / 70,041. + - **The bug:** the decoder took the first "`0e 08` + plausible year". On 14 + files there is an earlier record, about 1.1 KB before the end, holding the + stop time followed by zeros. + - A histogram then started at its own stop: a day late on BE9558's daily + histograms (K558L9XP.FK0H read 2025-10-08 19:10:01 for Blastware's + 2025-10-07 19:14:08). + - T003LCYV.JD0H got no time at all. + - A waveform lost its stop, so its trigger was never computed and the stop + was stamped instead (K440I4LG.JK0W: 11:14:12 for 11:14:08). + - **The fix:** the last 26 bytes are now taken when they are a footer, and + the old search remains only as the fallback. + - **Decode checker:** event times 6,524 / 6,524 and histogram start dates + 63,518 / 63,518. 13 comparisons fixed, 0 regressions, 18 of 88 fields + fully match (was 16). + - **Also:** the protocol reference records where the 1995 default-clock + events come from (units back from calibration with the battery unplugged; + 17 in DL2). + - ⚠ **Codec change:** it rides the next release's `TOOL_VERSION` bump and + backfill. It moves the stored time of those ~14 events on prod. No schema + change. ### Added - **A Blastware file's job number, and whether Blastware shows it.** From 5a089671e848ac900823b1f12ab3dbdad9716e5e Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 13:05:58 -0500 Subject: [PATCH 12/13] docs: where file-only decoding stands, and that prod's ASCII overlay is scaffolding CLAUDE.md 'Where things stand' now says plainly how prod uses a paired Blastware ASCII report (save_imported_bw overlays its peaks, notes, sample rate and record time onto SFM's decode), that only report-less events run on the decoder alone, and that the overlay is scaffolding to retire at step 3 of the plan. The checker status is brought up to dev: 18 of 88 fields, the remaining groups A-F in the proposed order. README roadmap: the same framing and progress. Protocol reference: - D.3.3: the footer is the file's last 26 bytes; footer[18:24] is not fixed (retracted). - D.6.1: STRT[18] picks the codec. - D.6.3: the job number. - D.6.5: the PVS^2 high word is non-zero above 1.28 in/s (retracted 'reads 0000'); the peak/PVS consistency check; Blastware's Number of Intervals is the monitoring time / the interval. - D.6.7: refreshed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CLAUDE.md | 66 ++++++++++++++++++++------- README.md | 28 +++++++++--- docs/instantel_protocol_reference.md | 67 ++++++++++++++++++++++++---- 3 files changed, 132 insertions(+), 29 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 1552b7a..d57b2ad 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,10 +10,27 @@ pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as --- -## Where things stand (updated 2026-11-02) +## Where things stand (updated 2026-11-03) Read this first when picking the project back up. +- **🔑 Prod still leans on Blastware's ASCII report, and that is scaffolding.** + - **How it works today:** when a `_ASCII.TXT` report arrives with a + Blastware file, `WaveformStore.save_imported_bw` overlays its peaks, notes, + sample rate and record time onto SFM's decode + (`event_file_io.apply_report_to_event`). + - **Only events without a report** run on the decoder alone: all DL2 events + before 2025, and everything SFM downloads itself. + - **Why that matters:** the overlay made SFM trustworthy from day one. It + also hid how much the decoder could not yet do; until the checker (below) + there was no full list of what Blastware reports. + - **The goal is full function without Blastware (Brian, 2026-10-29).** The + README roadmap has four steps: + 1. the checker ✅ + 2. complete the file-only decode, one field group at a time + 3. switch ingest so reports are kept only for checking (retire the overlay) + 4. stop the watchers forwarding reports + - Until step 3, prod keeps the report as truth wherever one exists. - **🔑 The Series-3 decode checker (2026-10-29; v0.33.0).** - **Goal:** SFM produces everything Blastware reports, from the event file alone (spec and plan in `docs/superpowers/`). @@ -28,25 +45,42 @@ Read this first when picking the project back up. - **Byte layouts** of every field read from the file: `docs/instantel_protocol_reference.md` Appendix **D.6**. - **As of v0.33.0, plus the range fix on `dev` (`057df47`, 2026-11-02):** - - ✅ **Match on every event:** sample rate, record time, pre-trigger, notes, - event type (#41, from STRT[18]), and geophone range (`dev`). + **Where the decoder stands on `dev`** (2026-11-03, run `20261103-121047`): + **18 of 88 fields match on every event**, up from about 6 before v0.33.0. + The four `dev` fixes below share one release and one backfill. + - ✅ **Match on every event:** + - sample rate, record time, pre-trigger, notes and event type (v0.33.0) + - geophone range, job number, event times (6,524 / 6,524) and histogram + start dates (63,518 / 63,518) — `dev` - ✅ **Geophone samples** are exact on **6,524 / 6,524** waveforms in every - year (`dev`). v0.33.0 had 6,491: the 33 others were on the 1.250 in/s - range, 8× high under SFM's old Normal-range assumption. - - ✅ **Histogram PVS** = the stored per-interval PVS²: 69,952 / 70,042. - - ✅ **Mic: one count = 0.25 Pa,** with Blastware's dB offset at 81.9384. It - fails on only a few dozen events. + year (`dev`; v0.33.0 had 6,491, its 33 others being Sensitive-range events + read 8× high). + - ✅ **Histograms** decode to Blastware's own interval table on every DL2 + file: Tran / Vert / Long interval peaks have 0 mismatches (`dev`). + - The codec is now chosen by STRT[18]. The waveform codec had been + claiming 2018 5 s histograms. + - The sub-minute layout check now tests peak ≤ PVS ≤ √3·peak. + - Blastware's "Number of Intervals" is the monitoring time ÷ the interval: + a carve-out, 8 events. + - ✅ **Histogram PVS** = the stored per-interval PVS²: 69,989 / 70,042. + **Mic:** one count = 0.25 Pa, dB offset 81.9384; a few dozen stragglers. - ❌ **Open:** - - histogram start times are 1 s early (#51) - - 35 sub-minute (5 s / 2 s) histograms decode wrongly, plus 2 one-minute - no-mic histograms (`R352HFZ7`-shaped, likely a separate cause) - - 26 histogram start dates are a day off - - the per-interval PVS is not stored + - histogram start times are 1 s early (#51; fixing it moves every stored + histogram by 1 s, and the event key is (serial, time), so it needs a + decision first) + - the mic stragglers: ~20 one-minute histograms with an interval or two off - Blastware prints `OORANGE` when the vector sum alone exceeds the range (a carve-out to prove) - - ⬜ **Not read yet:** job number, ZC frequency, acceleration, displacement, - time of peak, sensor check, battery, calibration, units, monitor log. + - ⬜ **Not read yet, in the order proposed** (2026-11-03): + - **A. Setup fields:** trigger source and levels, stop mode, mic type, + display units, firmware version, serial number, calibration, battery. + - **B. Histogram interval detail:** per-interval frequencies (#50: they + assume 1024 sps), per-interval PVS, interval size, stop time. + - **C. #51 timing:** start time, per-interval times, peak times. + - **D. Blastware's waveform calculations:** ZC frequency, acceleration, + displacement, time of peak. + - **E. Sensor check results.** + - **F. Monitor log:** probably not in the event file at all. - 🔶 **#48 is still open.** The event file's setup block puts the pre-trigger where the 1A "stable anchor" `be 80 00 00 00 00` sits. In the file, though, it is **each event's own pre-trigger**, not the setting: 253–256 samples at diff --git a/README.md b/README.md index 2b12e08..869c5e2 100644 --- a/README.md +++ b/README.md @@ -621,16 +621,34 @@ Implementation steps (concrete): ### High-impact (unblocks product features) -- [x] **Series III waveform body codec reverse-engineering.** ✅ The body codec is fully decoded (`minimateplus/waveform_codec.py`, `histogram_codec.py`), and verified per-sample against Blastware's own exports. As of v0.33.0, geophone samples are exact on 6,491 / 6,524 DL2 waveforms against their `_XML.XML` reports, across 2016–2026. -- [ ] **SFM produces everything Blastware reports, from the event file alone.** The four-piece plan: +- [x] **Series III waveform body codec reverse-engineering.** ✅ The body codec is fully decoded (`minimateplus/waveform_codec.py`, `histogram_codec.py`), and verified per-sample against Blastware's own exports. Geophone samples are exact on all 6,524 DL2 waveforms against their `_XML.XML` reports, across 2016–2026 (`dev`; v0.33.0 had 6,491, before the geophone range was read from the file). +- [ ] **SFM produces everything Blastware reports, from the event file alone.** + + **Why this matters:** until it's done, prod overlays Blastware's ASCII report onto SFM's decode wherever a report exists. That made SFM trustworthy from day one, but it is scaffolding: the goal is full function without Blastware. + + The four-piece plan: 1. the decode checker ✅ v0.33.0 2. complete the file-only decode, one field group at a time, each proven by the checker - 3. flip ingest so reports are kept only for checking + 3. flip ingest so reports are kept only for checking (retire the overlay) 4. stop the watchers forwarding reports - **Done so far:** setup fields, notes, event type, histogram PVS, mic. + **Done so far: 18 of 88 report fields match on every DL2 event.** + - In v0.33.0: setup fields, notes, event type, histogram PVS, mic. + - On `dev`: + - the geophone range + - the job number + - histograms that decoded wrongly + - the footer: no more day-late histograms; every waveform time exact - **Next:** histogram start times (#51), the 37 histograms that decode wrongly, the job number, the geophone range (Sensitive-range events read 8×), and the values Blastware computes itself (ZC frequency, acceleration, displacement, time of peak), plus the sensor check, battery, calibration and monitor log. Design: `docs/superpowers/specs/2026-10-29-s3-decode-checker-design.md`. + **Next:** + - setup fields still unread: trigger, stop mode, units, serial, calibration, battery + - histogram interval detail: frequencies (#50), per-interval PVS, interval size, stop time + - histogram start times (#51) + - the values Blastware computes itself: ZC frequency, acceleration, displacement, time of peak + - the sensor check results + - the monitor log + + Design: `docs/superpowers/specs/2026-10-29-s3-decode-checker-design.md`. Status detail: CLAUDE.md "Where things stand". - [x] **Series IV (Thor IDF) binary codec reverse-engineering.** ✅ v0.21.0 — `micromate/idf_file.read_idf_file()` decodes both IDFW (waveform body at offset `0x0f1f`, reusing `decode_waveform_v2()`; 87–99% sample fidelity on quiet events) and IDFH (dedicated segment-based decoder: all 859 corpus files decode, 181,071 intervals, peaks within ~1.8% of sidecar values). `WaveformStore.save_imported_idf` now also projects parsed Thor data into a `bw_report` block via `micromate/idf_to_bw_report.py` so Thor events render in the existing Event Report PDF pipeline without a separate renderer. - [ ] **In-app waveform viewer accuracy.** Depends on Series III codec decode. Plot.v1 JSON pipeline + viewer skeleton already exist; will start showing real waveforms automatically once `_decode_a5_waveform` produces correct samples. Series IV waveforms come online when the IDF codec lands. - [ ] **Series IV live-device support.** Once the IDF binary is decoded, extend `micromate/` with `transport.py` / `framing.py` / `protocol.py` / `client.py` mirroring the `minimateplus/` package layout — depends on capturing Thor's wire protocol (TCP / RS-232 captures TBD). diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index 8fbdfe4..0240e0e 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -11,6 +11,7 @@ | Date | Section | Change | |---|---|---| +| 2026-11-03 | Appendix D.3.3, D.6.1, D.6.3, D.6.5, D.6.7, §8 | ✅ **File-only decode, second pass (on `dev`).** **D.3.3:** the footer is the file's last 26 bytes (70,041 / 70,041); an earlier stop-time record fooled the first-match search on 14 files, making histograms a day late. Its `[18:24]` is **not** fixed (retracted). **D.6.1:** STRT[18] now picks the codec; the waveform codec had claimed 2018 5 s histograms. **D.6.3:** the job number (flags `k − 9` bit `0x02`, uint16 at `k − 8`; 2,997 / 2,997). **D.6.5:** the PVS² high word is non-zero above 1.28 in/s (retracted "reads 0000"), so the layout check now uses peak ≤ PVS ≤ √3·peak (34,502,955 / 34,502,955); Blastware's "Number of Intervals" is the monitoring time ÷ the interval. **§8:** where the 1995 default-clock events come from. 18 of 88 report fields now match on every DL2 event. | | 2026-11-02 | Appendix D.3.1, D.6 (NEW), §15 | ✅ **Event fields SFM reads from the file alone (v0.33.0, plus the range on `dev`).** New D.6 records the bytes and the DL2 verification for each field: the record type `STRT[18]`, the recording-setup block (sample rate, pre-trigger, record time, the four notes), the geophone range (label + 29 in the setup's channel blocks), each histogram interval's PVS², and the mic scale (one count = 0.25 Pa). **Retracted in place:** D.3.1's `STRT[20]` = record time (it is `00` on every DL2 file; the "70 s" SFM used to report was `STRT[18]`, the record-type byte), and the 2026-08-26 reading of sub-minute histogram records as little-endian (big-endian from byte 5 since v0.32.0, #47/#49). **For #48:** the file's copy of the block puts the pre-trigger where the 1A "stable anchor" `be 80 00 00 00 00` sits. In the file, though, it is each event's own pre-trigger, which varies on the same unit on the same day (253–256 samples at 1024 sps), and Blastware reports it per event. So the file says little about whether the live 1A loses its anchor, and #48 stays open. | | 2026-10-26 (5) | §7.8.9 | ✅ **The embedded event record: the instrument's trigger time, inside the 5A stream.** Every Blastware waveform file carries `00 28 05 00 ?? ?? fe 80 [trigger 8 B][stop 8 B]`, times as `dd mm yyyy(BE) 00 hh mm ss`. The trigger equals Blastware's report 1,320/1,320, the filename 7,935/7,935 and the unit's 0C record 10/10. It occurs once in the unit's own A5 payloads (8/8 events) and in SFM-only downloads (2/2): instrument data, not Blastware's. The footer's `ts2 - record time` is only an estimate, a second off on ~19%. Decoder rule, validation and an open case (3 waveform-named files the codec does not recognise) in §7.8.9. 🔶 The §7.5 `0C` "sub_code" timestamp variants look like the same 8-byte form read with its escapes. | | 2026-10-17 | §7.6.1 | 🔶 **OPEN — the 6-byte "stable anchor" may be two settings at their defaults, not a constant.** Series IV's `0x1A` has the same field order as the S3 compliance block, and a keypad diff pass on a Micromate (UM20147) measured the bytes in the anchor's position: `[f32 BE pre-trigger, negative seconds][record stop mode, 00 00 = Fixed]`. `be 80 00 00` is exactly −0.25 s. If S3 matches — **inferred, not measured on S3** — then any S3 unit set to Record Stop Mode = Auto (a basic Blastware Compliance Setup option) or a non-default pre-trigger loses the anchor, and `client.py` silently decodes no recording mode / sample rate / interval / record time and skips them on write. No S3 capture has ever been taken in Auto stop mode (see the 2026-03-09 Auto Window rows), which would explain why the anchor never broke. To settle: one BW capture with Record Stop Mode = Auto. See `docs/micromate_protocol_reference.md` → *The `0x1A` field map from a keypad pass*. | @@ -3441,12 +3442,16 @@ The body is reconstructed from the raw A5 bulk waveform stream frames by strippi The footer terminates the N00 file. Its bytes come directly from the terminator A5 frame's inner content — do NOT reconstruct from event metadata. +✅ **It is the file's last 26 bytes** (2026-11-03): `0e 08` and two valid times end every one of 70,041 DL2 files. +- ⚠ **Do not search for the first `0e 08` + plausible year.** 14 DL2 files also hold an earlier record of that shape, about 1.1 KB before the end, carrying the stop time followed by zeros. +- Taking it made a histogram start at its own stop (a day late on BE9558's daily histograms). It also cost a waveform its stop, and with it the trigger time. + | Offset | Length | Field | Notes | |---|---|---|---| | 0 | 2 | `0e 08` | Fixed marker | | 2 | 8 | ts1 | Start timestamp (8B big-endian) | | 10 | 8 | ts2 | Stop timestamp (8B big-endian) | -| 18 | 6 | `00 01 00 02 00 00` | Fixed | +| 18 | 6 | varies | ⚠ **Not fixed** (2026-11-03). `00 01 00 02 00 00` in M529LIY6.N00. Elsewhere: `00 21 04 00 00 00` (K558L9XP.FK0H, K439I2WY.RK0H, T1895KDW.6J0H), `00 01 02 00 00 00` (K5575KDW.5L0W), `00 01 00 01 00 00` (S3545KFL.S60W). Not identified | | 24 | 2 | CRC | 2-byte CRC — algorithm unconfirmed | **CRC:** The 2-byte CRC at footer[24:26] has an unconfirmed algorithm. In M529LIY6.N00 it reads `fe da`. Attempts to match CRC-16/CCITT, CRC-16/IBM, CRC-32 (truncated), and 40+ polynomial/init combinations all failed. The writer copies it verbatim from the terminator frame. @@ -3633,6 +3638,9 @@ copy in `~/dl2-archive`. Counts below are from that archive unless stated otherw - The filename's `W` / `H` is only a cross-check. On a disagreement SFM logs it and keeps the byte (#41). - Checker, event type: 70,042 / 70,042. +- **It also picks the codec** (2026-11-03). Trying the waveform codec first handed it BE9440, + BE9557 and BE17354's 2018 5 s histograms. It accepted them and returned about 5× too many + "samples" (K440HDXX.XH0H: 44,504 for Blastware's 6,976). #### D.6.2 Recording-setup block — sample rate, pre-trigger, record time ✅ @@ -3689,7 +3697,21 @@ Offsets are from `k`, the first byte of the setup name: ("Seis. Loc:", "Location:", "Project: "). - An empty value means none. - They match Blastware on every DL2 event. -- Not read yet: extended notes, job number. +- Not read yet: extended notes. + +**Job number** ✅ 2026-11-02, in Series IV's `0x1A` layout (`[39]` report flags, `[40:42]` the +number): + +| Offset | Type | Field | +|---|---|---| +| `k − 9` | uint8 | report flags: bit `0x02` = job number shown | +| `k − 8` | uint16 BE | job number, kept while not shown | + +- **The flag** matches Blastware's `JobNumber` on 2,997 / 2,997 DL2 events that print one, and + 66,986 / 66,986 that don't. +- **The value** matches on all 2,997, but every printed value is 1, so it is only proven for 1. + Hidden ones hold real numbers (802, 1012, 1013, 622). +- Bit `0x04` is also seen (2,311 files); it is not identified. #### D.6.4 Geophone range — the setup's channel blocks ✅ 2026-11-01 @@ -3724,7 +3746,11 @@ Each interval stores its peak vector sum **squared**: - **The event's PVS is the largest interval's.** Combining the three channel peaks instead read high on 86% of DL2 histograms, because the peaks can come from different moments. - **Verified:** √value matches Blastware's "Geo PVS" on 34.5 M DL2 sub-minute intervals, and the - event PVS matches on 69,952 / 70,042 events. The rest are the open histogram cases in D.6.7. + event PVS matches on 69,989 / 70,042 events (`dev`, 2026-11-03). +- **A consistency check** (2026-11-03): an interval's vector sum is never below its largest + channel peak, nor above √3 times it, give or take one unit of rounding. That holds on + 34,502,955 / 34,502,955 DL2 sub-minute intervals, and is what the codec now uses to recognise + a sub-minute record layout. - 🔶 On the stream's last block, the "arbitrary bytes at [21:23]" in the 2026-08-25 note are probably the high half of this field (inferred from the layout, not measured). @@ -3737,6 +3763,20 @@ Each interval stores its peak vector sum **squared**: > ⚠ **RETRACTED:** the 2026-08-26 notes (Changelog, §15) read these records as 8 × uint16 > little-endian after a 6-byte header. That was the same big-endian words shifted by one byte. > Their "2-word tail whose first word is 0000" is the PVS², whose high word reads `0000`. +> +> ⚠ **RETRACTED 2026-11-03:** "the high word reads `0000`" holds only on quiet intervals. It is +> non-zero above 1.28 in/s. The layout check required it, so a one-block histogram with a loud +> interval was not recognised at all (T193KR5M.X90H, K440HA3C.JM0H, R352HFZ7.530H). The check is +> now the consistency test above. + +**Blastware's "Number of Intervals" is the monitoring time ÷ the interval** (measured +2026-11-03), from the footer's start and stop: +- It is exact on T193KSWP.FF0H (2,880), M462KSWR.1R0H (1,650) and T193KY0A.740H (6,390). +- When the unit never wrote the last minute, the file holds one block fewer (30 intervals at + 2 s). Blastware's own interval table lists only the stored intervals, which is what SFM + decodes. +- A decode-checker carve-out (`interval-count-is-duration`) covers the 8 DL2 events where the + two differ. #### D.6.6 Mic ✅ v0.33.0 @@ -3751,15 +3791,26 @@ Each interval stores its peak vector sum **squared**: #### D.6.7 Not read from the file yet -- **Fields:** job number, extended notes, ZC frequency, acceleration, displacement, time of - peak, sensor check results, battery, calibration, units, monitor log. +*Updated 2026-11-03. 18 of 88 report fields now match on every DL2 event.* +- **Fields not read yet:** + - trigger source and levels, stop mode, mic type, display units, firmware version, serial + number, calibration, battery + - per-interval frequencies (#50: they assume 1024 sps), per-interval PVS, interval size, + histogram stop time + - extended notes + - the values Blastware computes: ZC frequency, acceleration, displacement, time of peak + - sensor check results + - monitor log - **Open cases:** - histogram start times are 1 s early (#51) - - 35 sub-minute histograms and 2 one-minute mic-off histograms decode wrongly - - 26 histogram start dates are a day off - - the per-interval PVS is not stored + - about 20 one-minute histograms with a mic peak an interval or two off - Blastware prints `OORANGE` when the vector sum alone exceeds the range (a carve-out still to prove) +- **Resolved on `dev`, 2026-11-02 → 03:** + - the 37 histograms that decoded wrongly (D.6.1, D.6.5) + - the 26 histogram start dates a day off (D.3.3; 17 of them were the same 5 s files, timed + as waveforms) + - the job number (D.6.3) --- From be5bab478722ba6fd79b5ac8817680526b62c872 Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 3 Nov 2026 13:06:19 -0500 Subject: [PATCH 13/13] docs(changelog): Unreleased -- where file-only decoding stands Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d3d8d..cfce416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,6 +114,25 @@ All notable changes to seismo-relay are documented here. `.h5` attributes are additive. No schema change, no migration. ### Protocol / Documentation +- **Where file-only decoding stands, and that prod's ASCII overlay is + scaffolding.** + - **CLAUDE.md "Where things stand"** now says plainly that a paired + Blastware ASCII report overwrites SFM's decode on import, and that only + report-less events run on the decoder alone. The overlay is to be retired + at step 3 of the plan. + - The checker status is brought up to `dev`: 18 of 88 fields match on every + DL2 event, with the remaining groups A–F in the proposed order. The README + roadmap is updated to match. + - **The protocol reference** records: + - the footer as the file's last 26 bytes (D.3.3, with `[18:24]` retracted + as "fixed") + - the codec chosen by STRT[18] + - the job number + - the PVS² high word and the peak / PVS consistency check (retracting + "reads 0000") + - Blastware's interval count + - a refreshed "not read yet" list + - Docs only: no code change, no migration. - **`docs/instantel_protocol_reference.md` gains Appendix D.6:** the bytes and DL2 verification for every field SFM reads from a Blastware event file. - the record type, `STRT[18]`