From e2c0f26b6902f6dd36e714a58f9c33eed60baeb5 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 9 Nov 2026 15:11:43 -0500 Subject: [PATCH] docs: over range, the mic's range and dB offset, and Blastware's mic unit labels - Reference D.6.15 (new): over range -- a peak past 2,000 units (the mic in counts) is OORANGE, per channel and per histogram interval; the vector sum is OORANGE exactly when a geophone is (43 / 43), never on its own (38 / 38); the line marks the mic over (18 / 18). - D.6.6: the mic's own range byte (an eighth at 1; 7 events read 8x high); the dB offset corrected in place to 81.938216 (every printed count leaves [81.9382058, 81.9382266]); the unit labels that do not hold, and the mixed columns. - D.6.11, CLAUDE.md: 80 of 88 report fields match on every DL2 event (run 20261109-144544, 0 regressions); the two causes left (the vector sum's last digit on 4 twins, 4 accelerations); the 'vector sum alone' case retracted. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- CLAUDE.md | 36 ++++++++----- docs/instantel_protocol_reference.md | 76 +++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 20 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 7e654c3..90407e6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,14 +45,16 @@ 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**. - **Where the decoder stands on `dev`** (2026-11-08, run `20261108-034313`): - **72 of 88 fields match on every event**, up from about 6 before v0.33.0, - 47 before group D and 59 after it. + **Where the decoder stands on `dev`** (2026-11-09, run `20261109-144544`): + **80 of 88 fields match on every event**, up from about 6 before v0.33.0, + 47 before group D and 59 after it. Every other field matches or is accepted + under a carve-out with its evidence. - Groups A, B, C and D part 1 shipped in v0.34.0 (#50, #51). - - D part 2 (the unit's own summary), E (the sensor check) and F (the - monitor log) are on `dev` and owe the next release a backfill. - - Still open: the mic stragglers, the `OORANGE` tag (18 events), the PPV / - vector-sum `OORANGE` carve-out, 4 accelerations. + - D part 2 (the unit's own summary), E (the sensor check), F (the monitor + log), over range and the mic fixes are on `dev` and owe the next release + a backfill. + - Left: 16 values in two causes -- the vector sum's last digit on 4 + waveform/histogram twins, and 4 accelerations (reference D.6.11). - ๐Ÿ”‘ **Events are keyed unit + time + type:** `UNIQUE(serial, timestamp, record_type)` (#51, Migration 3 in `sfm/database.py`, `dev`). - A waveform and its histogram may share a second: 209 times in prod's @@ -114,11 +116,18 @@ Read this first when picking the project back up. - 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. + **Mic:** one count = 0.25 Pa (an eighth at mic range 1, the mic block's + label + 29), dB offset 81.938216 (2026-11-09; 81.9384 was too high). + - โœ… **Over range (D.6.15):** a peak past 2,000 units (32,000 counts; the + mic in counts) is Blastware's `OORANGE`, per channel and per interval; the + vector sum is `OORANGE` exactly when a geophone is, never on its own. + - ๐Ÿ”‘ **Blastware's mic unit labels don't hold on every report** (D.6.6): the + peak carries its own ``, a sample table's cells say its unit, and + a few reports mix dB and psi in one column (carve-out `mic-units-mixed`). - โŒ **Open:** - - 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) + - the vector sum's last digit on 4 waveform/histogram twins: Blastware's + value is ~1.5 ppm lower, cause unknown (no factor applied) + - 4 accelerations (D.6.12) - โฌœ **Not read yet, in the order proposed** (2026-11-03): - ~~**A. Setup fields**~~ โœ… done on `dev`. - ~~**B. Histogram interval detail**~~ โœ… done on `dev`. Frequencies (#50), @@ -994,8 +1003,9 @@ with zero mismatches. Before: 1 of 1196. 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.~~ **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). + One count = 0.25 Pa, and dB(L) = 81.938216 + 20ยทlog10(|count|), an offset + measured from Blastware's printed values (reference D.6.6; 81.9384 until + 2026-11-09). - **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 diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index 201ce7a..4268a01 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -11,6 +11,7 @@ | Date | Section | Change | |---|---|---| +| 2026-11-09 | Appendix D.6.15 (NEW), D.6.6, D.6.11 | โœ… **Over range and the mic.** **D.6.15:** a peak past full scale (2,000 units = 32,000 counts; the mic in counts) is Blastware's `OORANGE`, per channel and per histogram interval, from the unit's own summary peaks. The vector sum is `OORANGE` exactly when a geophone is (43 / 43); never on its own (38 / 38 numeric), which retracts D.6.11's open "vector sum alone" case. The `` line marks the mic over (18 / 18). **D.6.6:** the mic has its own range byte (label + 29): at 1 a count is an eighth, 7 DL2 events SFM read 8ร— high. The dB offset is **81.938216**: [81.9383, 81.9385] was too high, and every count Blastware printed leaves [81.9382058, 81.9382266]. Blastware's mic unit labels do not hold on every report; some mix dB and psi in one column. **80 of 88 report fields now match on every DL2 event.** | | 2026-11-08 | Appendix D.6.14 (NEW), D.3.3, D.6.11 | โœ… **The monitor log is in the footer.** Every DL2 report prints one Monitor Log line: the footer's ts1 and ts2, then words for the footer's flag word `[18:20]` (`0x0001` Event Recorded, `0x0002` Keyboard Exit, `0x0004` Remote Exit, `0x0008` Selfcheck Passed, `0x0010` Timer Stop, `0x0020` Modem Exit, `0x0200` Battery Low Exit, `0x0800` Memory Full Exit; the higher session-end bit wins, from one file). Rebuilt, it equals Blastware's character for character on 69,983 / 69,983. **D.3.3:** footer `[20:22]` is the trigger source again, `[22:24]` is zero; `[24:26]` still unknown, and no common CRC-16 or sum fits. **72 of 88 report fields now match on every DL2 event.** | | 2026-11-06 | Appendix D.6.13 (NEW), D.3.3, D.6.11, D.6.12 | โœ… **The record chain to the footer, and the sensor check.** Walked from the event record, the chain (event `0x05` โ†’ unit's summary `0x32`โ€“`0x35` โ†’ sensor checks `0x3c`โ€“`0x3f` โ†’ footer `0x0e`) ends exactly at the file's end on all 70,041 DL2 files. The footer is its last record: `00 1a` is its length, `0e` its id. **Each sensor-check record's header holds the unit's results:** channel type `[2]`, status `[4]` (0 = passed), frequency ร— 10 `[5:7]`, ratio ร— 10 `[7:9]` and amplitude mV `[9:11]`. Blastware prints them as they are: 209,943 / 209,943 geophone frequencies and ratios, 69,975 / 69,975 mic frequencies and amplitudes. The result is Passed / Check / Disabled by status and type. The status is the unit's own verdict, its bits not decoded. D.6.12's "`0x3c` / `0x3d`, before and after" retracted in place: one record per channel. **71 of 88 report fields now match on every DL2 event.** | | 2026-11-05 | Appendix D.6.12 (NEW), D.6.11, ยง7.8.9 | โœ… **The unit's own event summary, in every event file.** The embedded event record is the first of a `[length][id][payload]` chain. It holds the vector-sum peak's sample (6,492 / 6,493). Then one 22-byte record per channel, ids `0x32` Tran โ€ฆ `0x35` MicL: min, max, peak sample, **half-period** and a **displacement integral**. Blastware prints them as they are. **ZC frequency** = (rate / 2) / half-period, with the interval rule's words: 25,966 / 25,966 waveform and 253,958 / 253,958 histogram channel values. **Peak displacement** = half the integral: 19,479 / 19,479. Recomputing from the samples had reached 46% and 84%: the unit works at full resolution. **Times of peak** follow the unit's peak sample. That differs from the samples only on **O117I1NK.R70W**, whose stored samples wrap at the trigger by 65,536 counts (Blastware's own table has the same values). Peak acceleration is Blastware's own computation from the stored samples (group D part 1, documented here too). The unit stores its own largest step at `[15:21]` (inferred), which Blastware does not print. ยง7.8.9's "constant, meaning โ“" bytes amended in place. 59 of 88 report fields now match on every DL2 event (47 before group D). | @@ -3860,6 +3861,35 @@ Each interval stores its peak vector sum **squared**: - **Verified:** interval psi mismatches fell from 42,783 to 26, and mic peak mismatches from 345 to 40. +> โš  **CORRECTED 2026-11-09 (measured): the offset is 81.938216, and [81.9383, 81.9385] was too +> high.** Every count Blastware printed in DL2 leaves **[81.9382058, 81.9382266]**: +> - 1,704 distinct counts in waveform sample tables, 520 in histogram intervals and 494 +> histogram peaks; +> - count 129 (124.2) bounds the offset from below, 463 (135.2; 81.9384 prints 135.3) and 677 +> (138.5) from above. +> +> No count prints two ways once the cases below are set aside, so one offset serves every +> printing path. The physical 81.93820 misses only count 129. + +**The mic has its own range** (2026-11-09, measured). Its channel block carries a range byte at +the geophones' offset, label + 29 (D.6.4). At `1` each count is an eighth: 0.25 / 8 Pa. +- It is set on 7 DL2 events, all of them Blastware's values รท 8 (K557J1XQ.GF0W: 79.4 dB(L), not + 97.5). It is set on none of the other 70,026. +- It is independent of the geophone range: 28 events have Sensitive geophones and a range-0 mic. +- SFM read those 7 mics 8ร— high until 2026-11-09. + +**Blastware's mic unit labels do not hold on every report** (2026-11-09, measured). The decode +checker reads each value in the unit actually printed: +- **The peak carries its own ``.** 7 reports set it to dB under a psi Units line, 3 the + reverse; on 2 of those (K888HLJ1.UP0H, S353LADC.OE0H) the peak's own label is the wrong one. +- **A sample table has no unit of its own and need not follow the line.** S353JTHU.DT0W prints + dB under psi on both. Its cells say which: a mic dB value is never under 60, psi never over 1. +- **Some reports mix the two inside one column.** K441L9IN.OT0W prints psi `0.000` for counts of + 1 to 3 in a dB table; S353JTHU.DT0W psi rows, then dB rows. A histogram row can print one unit + in both mic columns: I145HKWT.DY0H row 672 reads 95.92 under psi(L) and dB(L). +- The checker's `mic-units-mixed` carve-out accepts such a field when every cell SFM disagrees + with is SFM's own value in the other unit. A cell matching neither is still a mismatch. + **Three things share the word "units". Keep them apart** (2026-11-03): | Name | What it is | Its units are set by | Where it shows | @@ -3991,10 +4021,11 @@ All four channels match every DL2 histogram. #### D.6.11 Not read from the file yet -*Updated 2026-11-08. 72 of 88 report fields now match on every DL2 event: 47 before group D, -59 after it, 71 with the sensor check, 72 with the monitor log (run `20261108-034313`, -0 regressions). Still open: the mic stragglers, the `OORANGE` tag (18 events), the -PPV / vector-sum `OORANGE` carve-out, and 4 accelerations (D.6.12).* +*Updated 2026-11-09. 80 of 88 report fields now match on every DL2 event: 47 before group D, +59 after it, 71 with the sensor check, 72 with the monitor log, 80 with over range and the mic +(run `20261109-144544`, 0 regressions). Every other field matches or is accepted under a +carve-out with its evidence. What is left is 16 values in two causes, below: the vector sum's +last digit on 4 twins, and 4 accelerations.* - **Fields not read yet:** - extended notes - ~~sensor check results~~ **read, 2026-11-06 (D.6.13)**: the unit's own, in the header of @@ -4005,9 +4036,17 @@ PPV / vector-sum `OORANGE` carve-out, and 4 accelerations (D.6.12).* displacement and time of peak, all stored in the file. Acceleration is the exception: the unit stores its own, but Blastware prints its own computation from the samples. - **Open cases:** - - about 20 one-minute histograms with a mic peak an interval or two off - - Blastware prints `OORANGE` when an event's vector sum alone exceeds the range, with no - clamped channel (a carve-out still to prove; the interval version is proven, D.6.9) + - ~~about 20 one-minute histograms with a mic peak an interval or two off~~ **explained + 2026-11-09 (D.6.6):** Blastware printed one unit in both mic columns of that row. + - ~~Blastware prints `OORANGE` when an event's vector sum alone exceeds the range~~ + **refuted 2026-11-09 (D.6.15):** it never does; the vector sum is `OORANGE` exactly when a + geophone is over range. + - **The vector sum's last digit on 4 waveform/histogram twins** (8 events: K888KLSU, + N599HVPW, O121L4L1, S354KD9N). Each true value sits a few parts in 10โท above a rounding + edge, and Blastware rounds down. A factor of 0.9999983โ€“0.9999989 fits all 69,940 printed + vector sums; the acceleration's 8.5 ppm does not (69,918). Cause unknown; SFM does not + apply a factor. + - **4 accelerations** (D.6.12): O117I1NK.R70W ร—3 and S353I5PZ.EP0W Vert. - **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 @@ -4174,6 +4213,29 @@ Rebuilt that way, the line equals Blastware's **character for character on 69,98 SFM reads the line only when the record chain is whole (D.6.13), which proves the last 26 bytes are the footer. +#### D.6.15 Over range โ€” Blastware's `OORANGE` โœ… 2026-11-09 + +**A peak is over range when it passes full scale: 2,000 units.** That is 32,000 counts on either +geophone range (16 counts to the unit), and 2,000 counts on the mic. For a channel's peak SFM uses +the unit's own summary (D.6.12), whose min and max are true values even where the stored +samples clip or wrap. + +| Where | Blastware prints `OORANGE` | DL2 (2026-11-09) | +|---|---|---| +| a channel's PPV / the mic's PSPL | its summary peak passes 2,000 | numeric up to 1,991 (geophones) / 1,933 (mic), `OORANGE` from 2,001: 209,784 + 69,957 numeric, 60 + 18 over | +| the event's vector sum | **any geophone** is over | `OORANGE` on all 43 events with one, numeric on all 38 whose vector sum alone passes the range (up to 14.49 in/s) | +| the report's "Out of Range" line (``) | the **mic** is over | 18 / 18, and on no other event | +| a histogram interval's peak | that interval's peak passes 2,000 | numeric up to 1,846 / 1,414, `OORANGE` from 2,001: 8,612 + 5,744 numeric, 22 + 12 over | +| a histogram interval's vector sum | any geophone in that interval is over | 16 / 16, and numeric on all 2,862 without | + +- The geophone Sensitive range does not change the threshold: Sensitive-range events read + numeric up to 88 units and `OORANGE` from 2,001. +- **Retracted in passing:** "Blastware prints `OORANGE` when the vector sum alone exceeds the + range" (D.6.11's open case). It never does. +- `PeakValues.*_over_range` carries it. The decode checker matches `OORANGE` only by that flag, + and a flag against a printed number is a mismatch. The `saturation` carve-out now accepts no + DL2 event; it stays for a file without the unit's summary. + --- *All findings reverse-engineered from live RS-232 bridge captures.*