diff --git a/CLAUDE.md b/CLAUDE.md index bf2795d..ba04dc2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,12 +45,12 @@ 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-05, run `20261105-140021`): - **59 of 88 fields match on every event**, up from about 6 before v0.33.0 and - 47 before group D. + **Where the decoder stands on `dev`** (2026-11-06, run `20261106-125854`): + **71 of 88 fields match on every event**, up from about 6 before v0.33.0, + 47 before group D and 59 after it. - Groups A, B, C and D part 1 shipped in v0.34.0 (#50, #51). - - D part 2 (the unit's own summary) is on `dev` and owes the next release - a backfill. + - D part 2 (the unit's own summary) and E (the sensor check) are on `dev` + and owe the next release a backfill. - ๐Ÿ”‘ **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 @@ -77,6 +77,14 @@ Read this first when picking the project back up. (fitted g 386.2238): 6,522โ€“6,523 / 6,524. The unit stores its own too, which Blastware ignores. The misses are O117I1NK.R70W, whose samples wrap at the trigger, and S353I5PZ.EP0W Vert (open). + - group E (D.6.13): sensor check frequency, ratio, mic amplitude and + result, every record type. Also the unit's own, in each sensor-check + record's header. "Check" is the unit's status code, not a limit SFM can + recompute. + - ๐Ÿ”‘ **The tail of every event file is one record chain** (D.6.13): + event record โ†’ unit summary โ†’ sensor checks โ†’ footer, each + `[length][id][payload]`. It ends exactly at the file's end on all 70,041 + DL2 files, and SFM reads none of it otherwise. - ๐Ÿ”‘ **"Units" means three different things โ€” keep them apart** (reference D.6.6): - **Recorded data:** the mic samples and interval peaks in the file, as @@ -114,8 +122,8 @@ Read this first when picking the project back up. - ~~**D. Blastware's waveform calculations**~~ โœ… done. ZC frequency, displacement and time of peak are the unit's own (D.6.12); acceleration is Blastware's. - - **E. Sensor check results.** Probably records `0x3c` / `0x3d`, which - follow the unit's summary (inferred, D.6.12). + - ~~**E. Sensor check results**~~ โœ… done (D.6.13). Plus the traces of a + unit without a mic, which the trace decoder had been dropping. - **F. Monitor log:** probably not in the event file at all. Lead, not measured: O117I1NK's report prints its log as the event record's start โ€“ stop. diff --git a/docs/instantel_protocol_reference.md b/docs/instantel_protocol_reference.md index 18b4500..64083e9 100644 --- a/docs/instantel_protocol_reference.md +++ b/docs/instantel_protocol_reference.md @@ -11,6 +11,7 @@ | Date | Section | Change | |---|---|---| +| 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). | | 2026-11-04 | SUB 1A / 09 reads, SUB 68โ€“74 settings write, the keypad | **SFM's settings write, benched on BE9441 (Brian at the unit; ~12 writes, each with his go).** **Every write** -- trigger 0.04 โ†” 0.05, a note, several fields at once (Project, job number + its report flag, trigger), the alarm 1.0 โ†” 1.5, and a full restore -- was acknowledged on all nine steps (`97 8C 8Eร—5 8D 7D 7C 96 8B 8D`), read back as sent, and **confirmed on the unit's own screen**; the unit ended byte for byte as found. Moved bytes were exactly the field's: trigger f32 at each geophone channel +30 (`+31..+33` moved), **alarm f32 at channel +38** (`+39` moved; the first Series-3 alarm write), job number `[40:42]`, its report bit `[39]` `0x02`, a note's value window. **`[26:28]`** went `01 7f` โ†’ `00 00` on SFM's first write (Blastware's value) and the unit **set `01 7f` again during the next monitoring session**. The **two bytes after the block** went out as `00 00` (Blastware sends a per-unit constant) and were taken. **๐Ÿ”‘ Escaped-checksum artifact:** when a reply's checksum byte is itself escaped (02 / 03 / 04, ~1 frame in 85), `S3FrameParser` keeps the escape's `0x10` and strips only the byte after it, so the frame's data gains one trailing `0x10`. It hit the first live 1A read (frame B 1,026 bytes after the header); the 12 recorded reads never had. SFM's settings read and waveform read now take exactly the length they asked for. **๐Ÿ”‘ The keypad menu wins:** a write sent while the setup menu was open was acknowledged and read back, then **lost when the operator pressed Cancel or Save** -- the menu writes its own copy of the **whole** block back (both times the block returned byte for byte to its state when the menu was opened). A keypad Cancel with nothing pending leaves the block unchanged. **While monitoring**, the 1A read returns the device-info block (SFM refuses, nothing sent), and the opening poll was answered only intermittently (2 of 3 attempts timed out). Code: `minimateplus.protocol.read_compliance_content` / `read_waveform_data_raw`, `micromate.setup_fields`; notes `~/bench-logs/2026-11-04-sfm-settings/`. | | 2026-11-03 (5) | SUB 1A / 71 / 69 (settings read and write) | **The settings block, read and written as content (measured, BE9441's 10-26 recording and BE11529's 2026-04-20 captures).** **Read:** unescape each 1A data frame and take `data[11:]`; every frame but the last starts with one `00` that is not content; dropped, the frames join into **2,090 bytes headed by N = 2090: Series IV's `0x1A` content layout** (12 / 12 reads, Blastware's 4 ร— 512 + 42 and SFM's 1024 + 1024 + 42). The old "stable anchor" `be 80 00 00 00 00` is content `[12:18]` (pre-trigger โˆ’0.25 + stop mode Fixed). **Round trip:** the read after each of Blastware's two 10-26 writes equals the image it had just written, all 2,090 bytes (2 / 2). While monitoring, the read returns the device-info block (`0e 'BE9441' โ€ฆ`, 5 / 5). **`[26:28]`:** Blastware writes `00 00` on all 11 writes; the unit reads `01 7f` after a monitoring session (BE9441 10-26, BE11529 4-20 15:19) and sets it by itself; meaning unknown. **The two bytes after the block** (`[2090:2092]` of the 0x71 image) are Blastware's own per-unit constant -- `7c ea` on all nine of BE11529's writes, `0c e9` on both of BE9441's -- not the block's CRC-16/AUG, and in no reply of BE9441's three-hour session; SFM sends `00 00`. **`0x09` `[200:202]`:** Blastware echoed the unit's `8c 76` on all nine April writes; on 10-26 it read `17 17` and wrote `78 76` (read back so); meaning unknown. **Blastware re-renders the mic trigger level:** on BE11529's first write (4-20 15:19) the unit read 0.005 and 0.01 psi in its two `MicL` channel blocks (3 and 7; Series 3 carries 8 channel blocks of 48 bytes from `[1708]`, the second four prefixed `0x32`) and Blastware wrote 0.004983 and 0.010058 -- the same levels to its 0.1 dB; every other write left them alone. **Every one of the 11 Blastware writes reproduces** from the block before it with only the fields Blastware changed (plus that re-render and, on 10-26, the mic bit of `[25]`). Code: `minimateplus.protocol.assemble_compliance_content`, `read_compliance_content`, `micromate.setup_fields`; tests `tests/test_s3_settings_read.py`, `tests/test_setup_fields.py`. | @@ -3466,6 +3467,10 @@ 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. + +> ๐Ÿ”‘ **2026-11-06 (measured):** it is the last record of the chain that starts with the event +> record (D.6.13). The two bytes before it, `00 1a`, are its length (26), and `0e` is its id. +> The chain lands exactly on it in all 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. @@ -3959,12 +3964,12 @@ All four channels match every DL2 histogram. #### D.6.11 Not read from the file yet -*Updated 2026-11-05. 59 of 88 report fields now match on every DL2 event, up from 47 -before group D (run `20261105-140021`, 0 regressions).* +*Updated 2026-11-06. 71 of 88 report fields now match on every DL2 event: 47 before group D, +59 after it, 71 with the sensor check (run `20261106-125854`, 0 regressions).* - **Fields not read yet:** - extended notes - - sensor check results (probably the records after the unit's summary, `0x3c` / `0x3d`; - inferred, D.6.12) + - ~~sensor check results~~ **read, 2026-11-06 (D.6.13)**: the unit's own, in the header of + each sensor-check record - monitor log - ~~the values Blastware computes: ZC frequency, acceleration, displacement, time of peak~~ **Read, 2026-11-04 โ†’ 05 (D.6.12).** Blastware prints the unit's own ZC frequency, @@ -4017,6 +4022,11 @@ channels. The 4 others are O117I1NK (below). **Then records `0x3c` (and on a histogram `0x3d`)**, length 202โ€“212. Not read yet. Probably the sensor check, before and after (inferred, not measured). +> โš  **RETRACTED 2026-11-06 (measured):** "before and after". They are the sensor check, but +> one record per channel: `0x3c` Tran, `0x3d` Vert, `0x3e` Long, `0x3f` MicL, on waveforms and +> histograms alike. My first walk stopped at the first id it did not know. The chain runs on +> to the footer: D.6.13. + **What Blastware prints from them.** It prints the unit's values; it does not recompute them: | Field | Rule | DL2 | @@ -4047,6 +4057,51 @@ full resolution: a stored sample of ยฑ16 counts hides anything from 1 to 31. from sample 4,096 to 4,097, which its own sample table shows. Not explained. Skipping every 4,096-sample boundary fixes this file but breaks another. +#### D.6.13 The record chain to the footer, and the sensor check โœ… 2026-11-06 + +**The whole tail of an event file is one record chain.** Walked from the event record by its +length prefixes, it ends exactly at the file's last byte on **all 70,041 DL2 files**, in two +shapes: + +| Files | Chain | +|---|---| +| 70,033 | `0x05` event record โ†’ `0x32`โ€“`0x35` unit's summary (D.6.12) โ†’ `0x3c`โ€“`0x3f` sensor checks โ†’ `0x0e` footer | +| 8 | the same without `0x35` and `0x3f`: BE16352, which records no mic | + +The **footer** (D.3.3, "the file's last 26 bytes") is the chain's last record: its length +`00 1a` sits just before it, and its first byte, `0e`, is its id. SFM reads nothing in the +chain unless the walk ends exactly at the end of the file. + +**Each sensor-check record** (`0x3c` Tran, `0x3d` Vert, `0x3e` Long, `0x3f` MicL) holds the +check the unit ran: a header with its results, then the trace Blastware draws in its "Sensor +Check" strip (`minimateplus/sensor_check.py`, since 2026-09-15). Payload after the id: + +| bytes | content | +|---|---| +| `[0:2]` | `00 00` | +| `[2]` | channel type: `01` geophone, `02` mic, `00` the check disabled | +| `[3]` | `00` | +| `[4]` | **status**: `00` passed; 1โ€“15 otherwise | +| `[5:7]` | **frequency ร— 10**, uint16 BE (Hz) | +| `[7:9]` | **ratio ร— 10**, uint16 BE (geophones; the mic's reads 10) | +| `[9:11]` | **amplitude, mV**, uint16 BE (the mic's; geophones carry a value too, ~260โ€“700, not printed) | +| `[11:19]` | not identified โ“ | +| `[19:]` | the trace (`sensor_check.py`'s `_HEADER_LEN` = 20 counts the id byte) | + +**What Blastware prints** (`TestFreq`, `TestRatio`, `TestAmplitude`, `TestResults`): + +| Field | Rule | DL2 | +|---|---|---| +| geophone test frequency and ratio | as stored, รท 10 | 209,943 / 209,943 each | +| mic test frequency and amplitude | as stored (frequency รท 10) | 69,975 / 69,975 each | +| result | `Passed` at status 0, `Check` at any other, `Disabled` at channel type 0 (and nothing else printed) | every channel | + +**The status code is the unit's verdict, not a limit SFM can recompute.** Geophones that pass +span 6.7โ€“9.4 Hz and ratio 1.9โ€“6.0, yet K559L6N1's Tran reads `Check` at 8.1 Hz and 3.3. Each +of the four bits occurs across the whole range of frequency, ratio and amplitude, so their +meanings are not decoded. Every mic `Check` in DL2 (691) is status 13 with frequency 0 and +amplitude 0: a mic that did not respond (inferred). + --- *All findings reverse-engineered from live RS-232 bridge captures.* diff --git a/minimateplus/decode_check.py b/minimateplus/decode_check.py index bbddb14..350a415 100644 --- a/minimateplus/decode_check.py +++ b/minimateplus/decode_check.py @@ -157,6 +157,13 @@ def sfm_side(raw: bytes) -> SfmSide: ("LongZCFreq", pv.long_zc_freq), ("MicLZCFreq", pv.mic_zc_freq)): if hz is not None: values[tag] = "<1.0" if hz < 1.0 else hz + # The unit's sensor check (2026-11-06), every record type. + for ch, r in (ev.sensor_check_results or {}).items(): + values[f"{ch}TestResults"] = r.result + for tag, value in (("TestFreq", r.freq_hz), ("TestRatio", r.ratio), + ("TestAmplitude", r.amplitude_mv)): + if value is not None: + values[f"{ch}{tag}"] = value if counts["MicL"]: values["MicLPSPL dB(L)"] = mic_count_to_db(max(abs(c) for c in counts["MicL"])) values["MicLPSPL psi(L)"] = pv.micl if pv is not None else None diff --git a/minimateplus/event_file_io.py b/minimateplus/event_file_io.py index 06eb722..4127afc 100644 --- a/minimateplus/event_file_io.py +++ b/minimateplus/event_file_io.py @@ -26,7 +26,7 @@ import struct from pathlib import Path from typing import Optional, Union -from .models import DeviceInfo, Event, PeakValues, ProjectInfo, Timestamp +from .models import DeviceInfo, Event, PeakValues, ProjectInfo, SensorCheckResult, Timestamp from . import blastware_file as _bw # avoid circular reference at module load from .bw_ascii_report import BwAsciiReport from . import waveform_codec as _wc @@ -1069,12 +1069,34 @@ def _histogram_event_record( return None, None, (f"{rejected} candidate(s), none valid" if rejected else "no candidate"), None -# The unit's own event summary (measured on DL2, 2026-11-05). The event record -# is the first of a chain of [length uint16 BE][id][payload] records, so the -# next record starts `length` + 2 bytes after its lead. Its payload holds the -# vector-sum peak's sample at [22:26] past the marker. The four that follow, -# 22 bytes each, are one per channel (ids 0x32 Tran .. 0x35 MicL; a unit -# without a mic has no 0x35): +# The event record is the first of a chain of [length uint16 BE][id][payload] +# records, the next starting `length` + 2 bytes after a record's lead (measured +# on all 70,041 DL2 files, 2026-11-06): the event record 0x05, the unit's +# summary 0x32-0x35, its sensor checks 0x3c-0x3f, then the footer 0x0e -- the +# file's last 26 bytes. A unit without a mic has no 0x35 or 0x3f (8 files). +# The walk ends exactly at the file's end on every one, so a chain that does +# not is not read at all. +_RECORD_LEAD_TO_MARKER = 6 # the lead `00 28 05 00` and the source sit before the marker + + +def _record_chain(raw: bytes, marker_at: int) -> Optional[dict[int, bytes]]: + """Each record's payload by id (the first of each), for the chain that + starts with the validated event record whose marker is at `marker_at`; None + unless the chain ends exactly at the end of the file.""" + off = marker_at - _RECORD_LEAD_TO_MARKER + out: dict[int, bytes] = {} + while off < len(raw): + ln = int.from_bytes(raw[off:off + 2], "big") + if off + 3 > len(raw) or ln < 1 or off + 2 + ln > len(raw): + return None + out.setdefault(raw[off + 2], raw[off + 3:off + 2 + ln]) + off += 2 + ln + return out + + +# The unit's own event summary (measured on DL2, 2026-11-05). The event +# record's payload holds the vector-sum peak's sample at [25:29] (its marker +# + 22). Then one record per channel, 22 bytes (ids 0x32 Tran .. 0x35 MicL): # [0] 0 [1:3] min [3:5] max (int16 BE; geophones in units of 16 counts) # [5:9] peak sample [9:11] half-period, samples [11:15] displacement # integral, units x samples [15:21] probably the unit's own largest sample step @@ -1082,26 +1104,22 @@ def _histogram_event_record( # computation from the samples (_waveform_peak_detail) # min, max and peak sample equal the samples' own on 25,962 / 25,966 DL2 # channels (the 4 others: O117I1NK.R70W, whose samples wrap at the trigger). +_EVENT_RECORD_ID = 0x05 +_SUMMARY_PVS_SAMPLE = slice(25, 29) _SUMMARY_CHANNELS = {0x32: "Tran", 0x33: "Vert", 0x34: "Long", 0x35: "MicL"} -_SUMMARY_CHANNEL_LEN = 22 -_RECORD_LEAD_TO_MARKER = 6 # the lead `00 28 05 00` and the source sit before the marker -_SUMMARY_PVS_SAMPLE_AT = 22 # past the marker +_SUMMARY_CHANNEL_LEN = 21 # the payload; the record is 22 with its id -def _unit_summary(raw: bytes, marker_at: int) -> Optional[dict]: - """The unit's per-channel event summary after the validated event record - whose marker is at `marker_at`: {"pvs_sample": int, "Tran": {...}, ...}, - each channel {"min", "max", "peak_sample", "half_period", - "disp_integral"}. None when no channel record follows the event record.""" - lead = marker_at - _RECORD_LEAD_TO_MARKER - off = lead + 2 + int.from_bytes(raw[lead:lead + 2], "big") - out: dict = {"pvs_sample": int.from_bytes( - raw[marker_at + _SUMMARY_PVS_SAMPLE_AT:marker_at + _SUMMARY_PVS_SAMPLE_AT + 4], "big")} - while off + 2 + _SUMMARY_CHANNEL_LEN <= len(raw): - ch = _SUMMARY_CHANNELS.get(raw[off + 2]) - if int.from_bytes(raw[off:off + 2], "big") != _SUMMARY_CHANNEL_LEN or ch is None or ch in out: - break - p = raw[off + 3:off + 2 + _SUMMARY_CHANNEL_LEN] +def _unit_summary(chain: dict[int, bytes]) -> Optional[dict]: + """The unit's per-channel event summary from a record chain: + {"pvs_sample": int, "Tran": {...}, ...}, each channel {"min", "max", + "peak_sample", "half_period", "disp_integral"}. None when the chain has no + channel record.""" + out: dict = {"pvs_sample": int.from_bytes(chain.get(_EVENT_RECORD_ID, b"")[_SUMMARY_PVS_SAMPLE], "big")} + for rid, ch in _SUMMARY_CHANNELS.items(): + p = chain.get(rid) + if p is None or len(p) != _SUMMARY_CHANNEL_LEN: + continue out[ch] = { "min": struct.unpack(">h", p[1:3])[0], "max": struct.unpack(">h", p[3:5])[0], @@ -1109,10 +1127,41 @@ def _unit_summary(raw: bytes, marker_at: int) -> Optional[dict]: "half_period": int.from_bytes(p[9:11], "big"), "disp_integral": int.from_bytes(p[11:15], "big"), } - off += 2 + _SUMMARY_CHANNEL_LEN return out if len(out) > 1 else None +# The sensor check's results, in the header of each sensor-check record (ids +# 0x3c Tran .. 0x3f MicL, whose traces minimateplus.sensor_check decodes). +# Payload: [2] channel type (1 geophone, 2 mic, 0 the check disabled) [4] status, +# 0 = passed [5:7] frequency x 10 [7:9] ratio x 10 [9:11] amplitude, mV. +# Blastware prints them as they are (DL2, 2026-11-06): 209,943 / 209,943 +# geophone frequencies and ratios, 69,975 / 69,975 mic frequencies and +# amplitudes; "Passed" on status 0 and "Check" on every other (1 .. 15: its bits +# are not decoded), "Disabled", with nothing else, on type 0. +_SENSOR_CHECK_CHANNELS = {0x3c: "Tran", 0x3d: "Vert", 0x3e: "Long", 0x3f: "MicL"} +_SENSOR_CHECK_HEADER_LEN = 11 + + +def _sensor_check_results(chain: dict[int, bytes]) -> Optional[dict[str, SensorCheckResult]]: + out: dict[str, SensorCheckResult] = {} + for rid, ch in _SENSOR_CHECK_CHANNELS.items(): + p = chain.get(rid) + if p is None or len(p) < _SENSOR_CHECK_HEADER_LEN: + continue + kind, status = p[2], p[4] + if kind == 0: + out[ch] = SensorCheckResult("Disabled", status) + continue + r = SensorCheckResult("Passed" if status == 0 else "Check", status, + freq_hz=int.from_bytes(p[5:7], "big") / 10) + if ch == "MicL": + r.amplitude_mv = int.from_bytes(p[9:11], "big") + else: + r.ratio = int.from_bytes(p[7:9], "big") / 10 + out[ch] = r + return out or None + + def _parse_record_time_seconds(raw: bytes) -> Optional[float]: """The configured post-trigger record time in seconds, from the recording- setup config block, or None when absent / implausible.""" @@ -1612,7 +1661,9 @@ def decode_blastware_bytes(raw: bytes, *, name: Optional[str] = None) -> Event: if (is_waveform_body and ev.peak_values is not None and ev.sample_rate and ev.pretrig_samples is not None): _waveform_peak_detail(ev.peak_values, samples, geo_fs, ev.sample_rate, ev.pretrig_samples) - _summary = _unit_summary(raw, _record_at) if _record_at is not None else None + _chain = _record_chain(raw, _record_at) if _record_at is not None else None + _summary = _unit_summary(_chain) if _chain is not None else None + ev.sensor_check_results = _sensor_check_results(_chain) if _chain is not None else None if _summary is not None and ev.peak_values is not None and ev.sample_rate: _apply_unit_summary(ev.peak_values, _summary, geo_fs, ev.sample_rate, ev.pretrig_samples if is_waveform_body else None) diff --git a/minimateplus/models.py b/minimateplus/models.py index bf0cd91..675ea7e 100644 --- a/minimateplus/models.py +++ b/minimateplus/models.py @@ -383,6 +383,17 @@ class PeakValues: long_peak_disp_in: Optional[float] = None +@dataclass +class SensorCheckResult: + """One channel's sensor check, as the unit stores it in the event file + (2026-11-06). `result` is Blastware's word for it.""" + result: str # "Passed", "Check" or "Disabled" + status: int # the unit's code: 0 passed; its bits are not decoded + freq_hz: Optional[float] = None # geophone resonance / mic test frequency; None when Disabled + ratio: Optional[float] = None # geophones only + amplitude_mv: Optional[int] = None # the mic only + + # โ”€โ”€ Project / operator metadata โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ @dataclass @@ -592,6 +603,9 @@ class Event: # Raw ADC counts; the source series' scale differs but the trace is a # shape diagnostic (rendered fit-to-box). None when absent. sensor_check: Optional[dict] = None # {"Tran": [...], ..., "MicL": [...]} + # And its results per channel, from the same records (2026-11-06): None + # when the file's record chain is not whole. + sensor_check_results: Optional[dict] = None # channel -> SensorCheckResult # Where `timestamp` came from, when decoded from a Blastware binary # (event_file_io): "event_record" -- the instrument's own event record in diff --git a/minimateplus/sensor_check.py b/minimateplus/sensor_check.py index 7432ea8..870c02f 100644 --- a/minimateplus/sensor_check.py +++ b/minimateplus/sensor_check.py @@ -98,25 +98,25 @@ def _decode_delta_stream(buf: bytes) -> List[int]: def _find_chain(body: bytes): - """Locate the four length-prefixed sensor-check records. + """Locate the length-prefixed sensor-check records. Returns a list of ``(offset, id, length)`` or ``None``. The chain is - validated by walking the ids 0x3c โ†’ 0x3d โ†’ 0x3e โ†’ 0x3f via their own length - prefixes, so a stray 0x3c byte in the waveform data cannot match. + validated by walking the ids 0x3c โ†’ 0x3d โ†’ 0x3e (โ†’ 0x3f) via their own + length prefixes, so a stray 0x3c byte in the waveform data cannot match. + A unit without a mic has no 0x3f (BE16352, all 8 of its DL2 events, + 2026-11-06), so the three geophone records are enough. """ for p in range(len(body) - 6): if body[p + 2] == 0x3C and body[p + 3] == 0 and body[p + 4] == 0: q = p recs = [] - ok = True for expect in _CHAIN_IDS: if q + 3 > len(body) or body[q + 2] != expect: - ok = False break length = int.from_bytes(body[q:q + 2], "big") recs.append((q, expect, length)) q = q + 2 + length - if ok and len(recs) == 4: + if len(recs) >= 3: return recs return None @@ -124,8 +124,8 @@ def _find_chain(body: bytes): def decode_sensor_check(raw: bytes) -> Dict[str, List[int]]: """Decode the four sensor self-check traces from a series-3 event binary. - Returns ``{"Tran": [...], "Vert": [...], "Long": [...], "MicL": [...]}`` in - raw decode units (same 16-count LSB as the main waveform), or ``{}`` if the + Returns ``{"Tran": [...], "Vert": [...], "Long": [...], "MicL": [...]}`` (no + "MicL" on a unit without a mic) in raw decode units (same 16-count LSB as the main waveform), or ``{}`` if the binary carries no sensor-check block (a histogram event, a non-series-3 file, or a unit/firmware that doesn't store it). """ diff --git a/tests/fixtures/unit-summary-11-05-26/K440HJCN.AS0W b/tests/fixtures/unit-summary-11-05-26/K440HJCN.AS0W new file mode 100755 index 0000000..36325c1 Binary files /dev/null and b/tests/fixtures/unit-summary-11-05-26/K440HJCN.AS0W differ diff --git a/tests/fixtures/unit-summary-11-05-26/K440HJCN_AS0W_XML.XML b/tests/fixtures/unit-summary-11-05-26/K440HJCN_AS0W_XML.XML new file mode 100755 index 0000000..1d0574c --- /dev/null +++ b/tests/fixtures/unit-summary-11-05-26/K440HJCN_AS0W_XML.XML @@ -0,0 +1,3977 @@ + + +8.0 +Full Waveform +BE9440 +V 10.72-8.17 MiniMate Plus +K440HJCN.AS0W +11:16:04 +2018-08-09 + +Tran +Vert +Long +MicL + +Tran +0.400 in/s +-0.250 sec +1.0 sec. +Fixed +1024 sps +6.6 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.410 +in/s + + +0.285 +in/s + + +0.285 +in/s + + +23 +Hz + + +24 +Hz + + +22 +Hz + + +0.363 +s + + +0.457 +s + + +0.251 +s + + +0.159 +g + + +0.133 +g + + +0.119 +g + + +0.003 +in + + +0.002 +in + + +0.002 +in + + +0.549 +in/s + + +0.364 +s + +Linear Weighting + +106.5 +dB(L) + + +0.470 +s + + +51 +Hz + +9.6 Hz. +13.8 +Check +8.5 Hz. +7.2 +Check +7.3 Hz. +1.9 +Passed +19.7 Hz. +519 mv +Passed + + +2018-08-09 11:16:04 - 2018-08-09 11:16:06 "Event Recorded " + + + + +0.3350.190-0.245-98.84 + + +0.3300.190-0.24587.96 + + +0.3200.180-0.24597.50 + + +0.3050.170-0.24091.48 + + +0.2900.165-0.23087.96 + + +0.2650.160-0.21587.96 + + +0.2350.155-0.19595.92 + + +0.1950.150-0.17097.50 + + +0.1550.150-0.14593.98 + + +0.1050.145-0.1150.000 + + +0.0600.135-0.080-95.92 + + +0.0050.125-0.045-97.50 + + +-0.0450.110-0.010-97.50 + + +-0.0950.0900.025-93.98 + + +-0.1400.0650.060-91.48 + + +-0.1850.0350.09087.96 + + +-0.2300.0000.12097.50 + + +-0.265-0.0350.145100.0 + + +-0.300-0.0700.16597.50 + + +-0.325-0.1000.18091.48 + + +-0.350-0.1350.19081.94 + + +-0.365-0.1650.2050.000 + + +-0.375-0.1950.21093.98 + + +-0.380-0.2150.215100.0 + + +-0.380-0.2300.215102.8 + + +-0.370-0.2400.215104.2 + + +-0.350-0.2450.210102.8 + + +-0.320-0.2450.200100.0 + + +-0.280-0.2450.19095.92 + + +-0.240-0.2400.18091.48 + + +-0.190-0.2300.16081.94 + + +-0.145-0.2150.1450.000 + + +-0.095-0.1950.120-87.96 + + +-0.045-0.1700.095-87.96 + + +0.005-0.1350.065-93.98 + + +0.055-0.1050.035-97.50 + + +0.100-0.0650.000-93.98 + + +0.145-0.015-0.035-93.98 + + +0.1850.025-0.070-102.8 + + +0.2250.070-0.100-106.0 + + +0.2600.110-0.135-105.5 + + +0.2850.140-0.160-101.0 + + +0.3050.170-0.185-93.98 + + +0.3200.180-0.205-87.96 + + +0.3300.195-0.220-95.92 + + +0.3400.195-0.230-101.0 + + +0.3350.190-0.235-100.0 + + +0.3350.185-0.245-81.94 + + +0.3300.180-0.24597.50 + + +0.3200.170-0.24098.84 + + +0.3050.165-0.23591.48 + + +0.2850.155-0.225-81.94 + + +0.2600.150-0.210-93.98 + + +0.2250.150-0.195-91.48 + + +0.1850.150-0.170-81.94 + + +0.1450.145-0.14087.96 + + +0.0950.140-0.10587.96 + + +0.0450.130-0.07081.94 + + +-0.0100.120-0.0400.000 + + +-0.0600.1050.000-81.94 + + +-0.1100.0850.035-95.92 + + +-0.1600.0550.070-97.50 + + +-0.2050.0250.100-93.98 + + +-0.245-0.0100.13081.94 + + +-0.280-0.0450.15595.92 + + +-0.315-0.0800.17598.84 + + +-0.340-0.1100.190100.0 + + +-0.360-0.1450.205100.0 + + +-0.375-0.1750.21098.84 + + +-0.385-0.2000.22097.50 + + +-0.385-0.2200.22097.50 + + +-0.385-0.2350.22097.50 + + +-0.370-0.2400.22097.50 + + +-0.345-0.2450.21597.50 + + +-0.315-0.2450.21097.50 + + +-0.275-0.2450.19597.50 + + +-0.225-0.2350.18095.92 + + +-0.180-0.2300.16093.98 + + +-0.130-0.2100.14091.48 + + +-0.080-0.1900.11581.94 + + +-0.030-0.1650.090-87.96 + + +0.020-0.1350.060-97.50 + + +0.070-0.0950.025-101.0 + + +0.115-0.055-0.010-100.0 + + +0.160-0.010-0.045-101.9 + + +0.2000.035-0.080-104.9 + + +0.2350.075-0.115-105.5 + + +0.2650.115-0.145-101.9 + + +0.2900.145-0.170-91.48 + + +0.3100.170-0.19581.94 + + +0.3250.185-0.2100.000 + + +0.3300.195-0.225-97.50 + + +0.3400.190-0.240-104.2 + + +0.3400.190-0.245-104.2 + + +0.3350.180-0.250-95.92 + + +0.3250.180-0.25087.96 + + +0.3150.170-0.24593.98 + + +0.2950.160-0.23591.48 + + +0.2750.160-0.22591.48 + + +0.2500.155-0.21093.98 + + +0.2150.150-0.19097.50 + + +0.1700.150-0.16093.98 + + +0.1300.145-0.13581.94 + + +0.0800.140-0.095-93.98 + + +0.0250.125-0.060-100.0 + + +-0.0250.120-0.030-98.84 + + +-0.0750.1050.010-93.98 + + +-0.1250.0750.045-81.94 + + +-0.1700.0500.08087.96 + + +-0.2150.0150.10595.92 + + +-0.250-0.0200.14095.92 + + +-0.285-0.0550.16093.98 + + +-0.315-0.0900.180-81.94 + + +-0.345-0.1200.195-81.94 + + +-0.360-0.1550.21081.94 + + +-0.370-0.1850.21591.48 + + +-0.375-0.2050.220100.0 + + +-0.380-0.2250.225102.8 + + +-0.370-0.2400.220103.5 + + +-0.360-0.2450.220103.5 + + +-0.330-0.2500.215101.9 + + +-0.295-0.2450.20098.84 + + +-0.250-0.2400.19095.92 + + +-0.210-0.2350.17091.48 + + +-0.160-0.2200.1500.000 + + +-0.115-0.2050.130-81.94 + + +-0.060-0.1750.105-91.48 + + +-0.015-0.1450.075-91.48 + + +0.040-0.1200.040-97.50 + + +0.085-0.0750.010-98.84 + + +0.130-0.030-0.025-93.98 + + +0.1750.010-0.065-95.92 + + +0.2150.055-0.095-102.8 + + +0.2500.090-0.125-104.9 + + +0.2750.125-0.155-103.5 + + +0.2950.155-0.180-97.50 + + +0.3150.175-0.200-91.48 + + +0.3350.185-0.215-93.98 + + +0.3350.185-0.230-100.0 + + +0.3400.190-0.240-101.9 + + +0.3400.185-0.245-98.84 + + +0.3350.180-0.25081.94 + + +0.3250.170-0.25098.84 + + +0.3150.165-0.24093.98 + + +0.2900.160-0.2300.000 + + +0.2700.155-0.220-91.48 + + +0.2400.155-0.200-91.48 + + +0.2000.155-0.1750.000 + + +0.1550.145-0.15091.48 + + +0.1100.145-0.11595.92 + + +0.0550.140-0.08091.48 + + +0.0050.130-0.04587.96 + + +-0.0450.115-0.00587.96 + + +-0.1000.0950.0300.000 + + +-0.1450.0700.060-93.98 + + +-0.1950.0400.095-93.98 + + +-0.2350.0050.125-93.98 + + +-0.275-0.0300.1500.000 + + +-0.310-0.0650.17093.98 + + +-0.340-0.1000.19097.50 + + +-0.355-0.1350.205100.0 + + +-0.370-0.1650.215100.0 + + +-0.385-0.1950.22598.84 + + +-0.385-0.2150.22595.92 + + +-0.385-0.2300.23095.92 + + +-0.375-0.2400.22597.50 + + +-0.350-0.2450.22098.84 + + +-0.325-0.2500.21098.84 + + +-0.285-0.2500.20098.84 + + +-0.240-0.2450.18597.50 + + +-0.190-0.2350.17093.98 + + +-0.140-0.2200.15091.48 + + +-0.090-0.2000.12087.96 + + +-0.040-0.1750.09581.94 + + +0.010-0.1400.065-87.96 + + +0.055-0.1100.035-98.84 + + +0.105-0.0700.000-101.9 + + +0.145-0.025-0.040-101.9 + + +0.1900.020-0.080-103.5 + + +0.2250.065-0.110-104.9 + + +0.2600.100-0.140-102.8 + + +0.2850.135-0.170-93.98 + + +0.3100.160-0.1950.000 + + +0.3250.180-0.21081.94 + + +0.3350.185-0.230-91.48 + + +0.3400.190-0.240-101.9 + + +0.3450.185-0.250-104.9 + + +0.3400.185-0.255-101.9 + + +0.3350.175-0.255-87.96 + + +0.3250.175-0.25591.48 + + +0.3050.170-0.24593.98 + + +0.2900.160-0.23593.98 + + +0.2600.160-0.22093.98 + + +0.2250.155-0.19593.98 + + +0.1900.155-0.17091.48 + + +0.1450.150-0.14087.96 + + +0.0900.145-0.105-81.94 + + +0.0400.140-0.070-95.92 + + +-0.0100.130-0.030-95.92 + + +-0.0650.1100.005-93.98 + + +-0.1150.0900.040-91.48 + + +-0.1650.0650.075-81.94 + + +-0.2100.0300.11091.48 + + +-0.250-0.0050.14093.98 + + +-0.285-0.0400.16593.98 + + +-0.320-0.0750.18581.94 + + +-0.345-0.1150.195-81.94 + + +-0.365-0.1450.21081.94 + + +-0.380-0.1800.22091.48 + + +-0.390-0.2050.230100.0 + + +-0.390-0.2200.235102.8 + + +-0.385-0.2350.230103.5 + + +-0.375-0.2450.225103.5 + + +-0.350-0.2500.220102.8 + + +-0.315-0.2450.215101.0 + + +-0.270-0.2450.200100.0 + + +-0.225-0.2400.18093.98 + + +-0.175-0.2250.16081.94 + + +-0.125-0.2100.135-81.94 + + +-0.070-0.1850.110-91.48 + + +-0.020-0.1600.080-91.48 + + +0.030-0.1300.050-93.98 + + +0.080-0.0900.015-97.50 + + +0.125-0.050-0.020-95.92 + + +0.170-0.005-0.055-97.50 + + +0.2100.040-0.090-102.8 + + +0.2450.080-0.125-105.5 + + +0.2750.115-0.155-104.9 + + +0.3000.145-0.185-100.0 + + +0.3200.165-0.205-95.92 + + +0.3350.180-0.225-91.48 + + +0.3450.180-0.235-95.92 + + +0.3500.190-0.245-101.9 + + +0.3500.185-0.255-101.0 + + +0.3450.180-0.260-81.94 + + +0.3350.170-0.26097.50 + + +0.3250.170-0.25598.84 + + +0.3050.160-0.24591.48 + + +0.2850.160-0.235-81.94 + + +0.2550.155-0.215-93.98 + + +0.2150.155-0.190-91.48 + + +0.1750.155-0.165-81.94 + + +0.1250.150-0.13093.98 + + +0.0700.145-0.09593.98 + + +0.0200.135-0.05593.98 + + +-0.0350.120-0.02087.96 + + +-0.0850.1050.020-87.96 + + +-0.1400.0800.060-95.92 + + +-0.1850.0450.090-95.92 + + +-0.2300.0100.125-81.94 + + +-0.270-0.0250.15591.48 + + +-0.305-0.0600.17593.98 + + +-0.335-0.0950.20095.92 + + +-0.360-0.1300.21595.92 + + +-0.380-0.1600.22598.84 + + +-0.390-0.1900.240100.0 + + +-0.400-0.2100.240100.0 + + +-0.400-0.2300.24098.84 + + +-0.390-0.2400.24097.50 + + +-0.370-0.2500.23595.92 + + +-0.340-0.2500.23095.92 + + +-0.300-0.2500.21597.50 + + +-0.255-0.2450.20098.84 + + +-0.205-0.2350.18095.92 + + +-0.155-0.2250.16091.48 + + +-0.105-0.2050.1300.000 + + +-0.050-0.1750.105-87.96 + + +0.000-0.1500.070-91.48 + + +0.050-0.1150.040-100.0 + + +0.100-0.0750.000-101.0 + + +0.145-0.030-0.035-101.9 + + +0.1850.015-0.075-102.8 + + +0.2250.055-0.110-104.9 + + +0.2600.095-0.140-104.9 + + +0.2850.130-0.170-100.0 + + +0.3100.155-0.1950.000 + + +0.3200.180-0.21587.96 + + +0.3400.185-0.2350.000 + + +0.3450.190-0.245-98.84 + + +0.3450.190-0.255-104.9 + + +0.3450.185-0.260-103.5 + + +0.3400.180-0.265-93.98 + + +0.3300.175-0.26091.48 + + +0.3150.170-0.25595.92 + + +0.2950.165-0.24595.92 + + +0.2700.165-0.22591.48 + + +0.2400.160-0.21091.48 + + +0.1950.160-0.18093.98 + + +0.1550.155-0.15087.96 + + +0.1000.150-0.11581.94 + + +0.0500.145-0.080-93.98 + + +-0.0050.135-0.040-97.50 + + +-0.0550.120-0.005-97.50 + + +-0.1100.0950.035-95.92 + + +-0.1600.0650.065-87.96 + + +-0.2050.0350.10091.48 + + +-0.2450.0000.13597.50 + + +-0.285-0.0400.16097.50 + + +-0.320-0.0750.18587.96 + + +-0.345-0.1100.200-87.96 + + +-0.365-0.1450.215-81.94 + + +-0.385-0.1750.23087.96 + + +-0.395-0.2000.23597.50 + + +-0.400-0.2250.240101.9 + + +-0.395-0.2350.240102.8 + + +-0.380-0.2450.240102.8 + + +-0.360-0.2500.235101.9 + + +-0.325-0.2550.225101.0 + + +-0.285-0.2550.210100.0 + + +-0.235-0.2500.19597.50 + + +-0.185-0.2350.17091.48 + + +-0.135-0.2200.1500.000 + + +-0.080-0.1950.120-87.96 + + +-0.025-0.1700.090-87.96 + + +0.025-0.1350.060-91.48 + + +0.075-0.1000.025-97.50 + + +0.120-0.055-0.010-97.50 + + +0.165-0.010-0.050-100.0 + + +0.2100.035-0.090-103.5 + + +0.2450.075-0.125-106.0 + + +0.2800.110-0.155-104.9 + + +0.3050.140-0.185-100.0 + + +0.3200.165-0.205-91.48 + + +0.3400.180-0.225-91.48 + + +0.3450.185-0.240-95.92 + + +0.3550.190-0.255-101.0 + + +0.3500.185-0.260-101.0 + + +0.3500.180-0.265-81.94 + + +0.3400.175-0.26597.50 + + +0.3300.170-0.26097.50 + + +0.3150.165-0.25581.94 + + +0.2900.160-0.240-91.48 + + +0.2600.160-0.220-97.50 + + +0.2250.160-0.200-93.98 + + +0.1800.160-0.1700.000 + + +0.1300.155-0.14093.98 + + +0.0750.155-0.10093.98 + + +0.0250.145-0.06087.96 + + +-0.0300.130-0.0250.000 + + +-0.0850.1100.015-87.96 + + +-0.1350.0850.055-91.48 + + +-0.1850.0550.085-87.96 + + +-0.2300.0150.1150.000 + + +-0.270-0.0200.15081.94 + + +-0.305-0.0550.17587.96 + + +-0.335-0.0950.19587.96 + + +-0.360-0.1300.21091.48 + + +-0.375-0.1600.22598.84 + + +-0.390-0.1900.235101.0 + + +-0.400-0.2150.245101.0 + + +-0.400-0.2350.245100.0 + + +-0.390-0.2450.25097.50 + + +-0.375-0.2500.24595.92 + + +-0.345-0.2550.23593.98 + + +-0.305-0.2600.22595.92 + + +-0.260-0.2500.20595.92 + + +-0.210-0.2450.18595.92 + + +-0.160-0.2300.16593.98 + + +-0.105-0.2100.13591.48 + + +-0.055-0.1850.11081.94 + + +-0.005-0.1550.080-81.94 + + +0.045-0.1200.040-97.50 + + +0.095-0.0800.005-101.9 + + +0.145-0.035-0.035-102.8 + + +0.1850.010-0.075-102.8 + + +0.2200.055-0.110-104.2 + + +0.2550.100-0.140-103.5 + + +0.2850.130-0.175-98.84 + + +0.3100.160-0.2000.000 + + +0.3250.175-0.22587.96 + + +0.3400.185-0.240-81.94 + + +0.3450.190-0.250-97.50 + + +0.3450.190-0.265-103.5 + + +0.3450.185-0.265-103.5 + + +0.3400.180-0.270-93.98 + + +0.3300.175-0.26591.48 + + +0.3150.170-0.26097.50 + + +0.2950.165-0.25093.98 + + +0.2700.160-0.23087.96 + + +0.2400.160-0.21081.94 + + +0.2000.160-0.18591.48 + + +0.1500.160-0.15087.96 + + +0.1050.150-0.1150.000 + + +0.0500.145-0.080-93.98 + + +-0.0050.140-0.035-98.84 + + +-0.0550.1200.000-97.50 + + +-0.1100.0950.040-93.98 + + +-0.1600.0700.07581.94 + + +-0.2050.0350.11095.92 + + +-0.2500.0000.140100.0 + + +-0.290-0.0400.16597.50 + + +-0.320-0.0750.19093.98 + + +-0.350-0.1100.205-81.94 + + +-0.370-0.1450.220-87.96 + + +-0.385-0.1800.23587.96 + + +-0.395-0.2050.24098.84 + + +-0.400-0.2250.245102.8 + + +-0.400-0.2400.245104.2 + + +-0.385-0.2500.245103.5 + + +-0.360-0.2550.240101.9 + + +-0.325-0.2550.23098.84 + + +-0.285-0.2550.21597.50 + + +-0.235-0.2500.19595.92 + + +-0.185-0.2400.17591.48 + + +-0.130-0.2200.15081.94 + + +-0.075-0.2000.120-87.96 + + +-0.025-0.1700.090-93.98 + + +0.025-0.1400.060-95.92 + + +0.080-0.1000.020-101.0 + + +0.125-0.060-0.020-101.0 + + +0.170-0.015-0.055-98.84 + + +0.2150.030-0.095-97.50 + + +0.2500.075-0.130-101.0 + + +0.2850.115-0.160-103.5 + + +0.3100.145-0.190-102.8 + + +0.3300.165-0.215-98.84 + + +0.3450.180-0.235-95.92 + + +0.3550.185-0.250-93.98 + + +0.3600.190-0.265-97.50 + + +0.3600.185-0.270-100.0 + + +0.3550.180-0.275-95.92 + + +0.3450.175-0.27591.48 + + +0.3350.170-0.265100.0 + + +0.3150.170-0.26098.84 + + +0.2950.165-0.24581.94 + + +0.2600.165-0.225-95.92 + + +0.2250.165-0.200-97.50 + + +0.1800.165-0.170-87.96 + + +0.1300.160-0.14087.96 + + +0.0750.155-0.10095.92 + + +0.0200.145-0.06093.98 + + +-0.0350.135-0.02087.96 + + +-0.0850.1100.020-87.96 + + +-0.1400.0850.060-91.48 + + +-0.1900.0550.095-91.48 + + +-0.2350.0150.1250.000 + + +-0.275-0.0200.15581.94 + + +-0.310-0.0550.18591.48 + + +-0.340-0.0950.20593.98 + + +-0.365-0.1350.22091.48 + + +-0.385-0.1650.23595.92 + + +-0.395-0.1950.245101.0 + + +-0.405-0.2150.255102.8 + + +-0.405-0.2350.255102.8 + + +-0.395-0.2450.255101.9 + + +-0.375-0.2500.25098.84 + + +-0.350-0.2550.24093.98 + + +-0.310-0.2550.22587.96 + + +-0.265-0.2550.20587.96 + + +-0.210-0.2450.18591.48 + + +-0.160-0.2300.16093.98 + + +-0.105-0.2100.13091.48 + + +-0.055-0.1900.10081.94 + + +0.000-0.1550.070-81.94 + + +0.050-0.1200.035-98.84 + + +0.100-0.080-0.005-103.5 + + +0.145-0.035-0.040-104.2 + + +0.1900.010-0.080-102.8 + + +0.2300.055-0.120-102.8 + + +0.2600.095-0.155-103.5 + + +0.2950.130-0.180-101.0 + + +0.3150.160-0.210-91.48 + + +0.3350.175-0.23081.94 + + +0.3450.185-0.250-81.94 + + +0.3500.190-0.265-97.50 + + +0.3500.185-0.270-103.5 + + +0.3500.185-0.275-104.9 + + +0.3450.175-0.275-98.84 + + +0.3350.175-0.27591.48 + + +0.3200.175-0.265101.9 + + +0.2950.170-0.255101.9 + + +0.2700.170-0.23595.92 + + +0.2350.170-0.2100.000 + + +0.1950.165-0.1850.000 + + +0.1450.165-0.15087.96 + + +0.1000.160-0.11587.96 + + +0.0450.150-0.07581.94 + + +-0.0100.140-0.035-81.94 + + +-0.0650.1200.005-97.50 + + +-0.1200.1000.045-98.84 + + +-0.1650.0650.080-95.92 + + +-0.2100.0300.1150.000 + + +-0.250-0.0050.15095.92 + + +-0.290-0.0450.17597.50 + + +-0.325-0.0800.20095.92 + + +-0.350-0.1200.22081.94 + + +-0.370-0.1550.235-81.94 + + +-0.385-0.1850.25081.94 + + +-0.395-0.2150.25597.50 + + +-0.400-0.2350.260101.0 + + +-0.395-0.2500.260103.5 + + +-0.380-0.2600.260104.2 + + +-0.360-0.2600.250102.8 + + +-0.320-0.2600.240101.9 + + +-0.280-0.2600.22098.84 + + +-0.230-0.2500.20095.92 + + +-0.180-0.2400.18093.98 + + +-0.125-0.2200.15081.94 + + +-0.075-0.1950.125-87.96 + + +-0.020-0.1650.085-93.98 + + +0.030-0.1300.055-97.50 + + +0.080-0.0900.015-101.0 + + +0.130-0.050-0.020-100.0 + + +0.175-0.005-0.060-95.92 + + +0.2150.040-0.105-95.92 + + +0.2500.080-0.140-101.0 + + +0.2850.120-0.170-104.2 + + +0.3100.150-0.200-103.5 + + +0.3300.170-0.225-101.0 + + +0.3450.180-0.245-98.84 + + +0.3550.190-0.260-97.50 + + +0.3600.190-0.275-98.84 + + +0.3600.190-0.280-100.0 + + +0.3550.185-0.285-93.98 + + +0.3500.180-0.28093.98 + + +0.3300.180-0.275100.0 + + +0.3150.175-0.270100.0 + + +0.2900.175-0.25087.96 + + +0.2550.170-0.230-93.98 + + +0.2200.170-0.205-93.98 + + +0.1700.170-0.170-81.94 + + +0.1200.170-0.13587.96 + + +0.0650.155-0.09593.98 + + +0.0100.150-0.06087.96 + + +-0.0400.135-0.0200.000 + + +-0.0950.1100.025-91.48 + + +-0.1450.0800.060-91.48 + + +-0.2000.0450.095-87.96 + + +-0.2400.0100.1300.000 + + +-0.280-0.0350.1600.000 + + +-0.315-0.0700.1850.000 + + +-0.345-0.1100.210-81.94 + + +-0.370-0.1450.2250.000 + + +-0.390-0.1800.24095.92 + + +-0.400-0.2100.250102.8 + + +-0.405-0.2300.255105.5 + + +-0.405-0.2500.260104.9 + + +-0.395-0.2600.260101.9 + + +-0.375-0.2650.25097.50 + + +-0.345-0.2650.24087.96 + + +-0.305-0.2700.23087.96 + + +-0.255-0.2600.20591.48 + + +-0.205-0.2450.18593.98 + + +-0.155-0.2300.16095.92 + + +-0.100-0.2100.13591.48 + + +-0.045-0.1800.10081.94 + + +0.005-0.1450.065-87.96 + + +0.055-0.1150.030-98.84 + + +0.105-0.070-0.010-102.8 + + +0.155-0.025-0.045-103.5 + + +0.1950.020-0.090-103.5 + + +0.2350.065-0.125-104.9 + + +0.2700.105-0.155-104.9 + + +0.3000.140-0.185-101.9 + + +0.3250.165-0.210-93.98 + + +0.3400.180-0.235-81.94 + + +0.3500.195-0.250-87.96 + + +0.3600.195-0.265-97.50 + + +0.3600.195-0.270-101.0 + + +0.3600.195-0.280-101.0 + + +0.3550.190-0.280-87.96 + + +0.3400.185-0.27093.98 + + +0.3200.190-0.26598.84 + + +0.3000.185-0.25095.92 + + +0.2750.180-0.23587.96 + + +0.2400.180-0.20581.94 + + +0.1950.180-0.18093.98 + + +0.1450.175-0.14595.92 + + +0.0950.170-0.11091.48 + + +0.0400.155-0.065-87.96 + + +-0.0150.145-0.030-98.84 + + +-0.0700.1200.010-103.5 + + +-0.1250.0900.050-101.9 + + +-0.1700.0600.085-93.98 + + +-0.2200.0150.12091.48 + + +-0.260-0.0250.15598.84 + + +-0.300-0.0650.18098.84 + + +-0.330-0.1000.20087.96 + + +-0.355-0.1350.220-87.96 + + +-0.375-0.1750.235-87.96 + + +-0.395-0.2050.25095.92 + + +-0.400-0.2300.255102.8 + + +-0.405-0.2500.260104.9 + + +-0.395-0.2650.260104.9 + + +-0.380-0.2750.255103.5 + + +-0.355-0.2750.250101.0 + + +-0.320-0.2700.23598.84 + + +-0.280-0.2650.21598.84 + + +-0.225-0.2550.19595.92 + + +-0.175-0.2400.17591.48 + + +-0.120-0.2200.145-81.94 + + +-0.070-0.1900.115-95.92 + + +-0.015-0.1550.080-101.0 + + +0.035-0.1200.050-100.0 + + +0.085-0.0800.010-101.9 + + +0.135-0.035-0.030-100.0 + + +0.1800.010-0.070-97.50 + + +0.2150.055-0.105-98.84 + + +0.2550.100-0.140-101.9 + + +0.2900.135-0.175-102.8 + + +0.3150.165-0.205-98.84 + + +0.3350.180-0.230-95.92 + + +0.3500.190-0.250-95.92 + + +0.3550.200-0.260-100.0 + + +0.3600.200-0.275-102.8 + + +0.3600.200-0.280-101.0 + + +0.3550.195-0.285-87.96 + + +0.3450.190-0.280100.0 + + +0.3300.190-0.275101.9 + + +0.3100.190-0.26098.84 + + +0.2850.185-0.2500.000 + + +0.2500.185-0.225-97.50 + + +0.2100.180-0.195-95.92 + + +0.1600.180-0.165-87.96 + + +0.1100.175-0.13081.94 + + +0.0550.165-0.09091.48 + + +0.0000.150-0.05091.48 + + +-0.0550.130-0.01081.94 + + +-0.1100.1050.025-81.94 + + +-0.1650.0700.065-93.98 + + +-0.2100.0300.095-87.96 + + +-0.250-0.0100.135-81.94 + + +-0.295-0.0550.16081.94 + + +-0.325-0.0900.18581.94 + + +-0.360-0.1300.20581.94 + + +-0.375-0.1700.22087.96 + + +-0.390-0.2000.23597.50 + + +-0.405-0.2300.250103.5 + + +-0.410-0.2500.255104.2 + + +-0.405-0.2650.260104.2 + + +-0.390-0.2750.260101.9 + + +-0.370-0.2800.25097.50 + + +-0.335-0.2800.24095.92 + + +-0.290-0.2750.22595.92 + + +-0.245-0.2700.21095.92 + + +-0.195-0.2550.19095.92 + + +-0.135-0.2350.16087.96 + + +-0.085-0.2100.13581.94 + + +-0.035-0.1800.105-87.96 + + +0.020-0.1450.065-93.98 + + +0.070-0.1000.030-100.0 + + +0.120-0.060-0.010-102.8 + + +0.170-0.015-0.045-102.8 + + +0.2100.030-0.090-103.5 + + +0.2500.080-0.125-105.5 + + +0.2800.120-0.155-104.9 + + +0.3100.150-0.190-100.0 + + +0.3300.180-0.210-87.96 + + +0.3500.190-0.2400.000 + + +0.3600.200-0.255-87.96 + + +0.3600.205-0.265-97.50 + + +0.3650.205-0.280-101.9 + + +0.3600.200-0.280-98.84 + + +0.3500.195-0.280-87.96 + + +0.3400.195-0.27587.96 + + +0.3200.195-0.26591.48 + + +0.2950.195-0.25087.96 + + +0.2600.190-0.23087.96 + + +0.2250.190-0.20593.98 + + +0.1800.190-0.17595.92 + + +0.1250.185-0.14093.98 + + +0.0750.170-0.10081.94 + + +0.0200.160-0.060-93.98 + + +-0.0400.140-0.025-98.84 + + +-0.0900.1150.015-98.84 + + +-0.1400.0850.055-95.92 + + +-0.1950.0450.0900.000 + + +-0.2350.0050.12093.98 + + +-0.275-0.0350.15097.50 + + +-0.315-0.0700.17597.50 + + +-0.340-0.1150.19591.48 + + +-0.360-0.1500.215-81.94 + + +-0.380-0.1850.23081.94 + + +-0.390-0.2200.24095.92 + + +-0.395-0.2400.250100.0 + + +-0.400-0.2650.255101.9 + + +-0.390-0.2750.255101.9 + + +-0.375-0.2750.255101.9 + + +-0.345-0.2800.245101.0 + + +-0.310-0.2800.235100.0 + + +-0.260-0.2700.21598.84 + + +-0.210-0.2550.19597.50 + + +-0.160-0.2400.17095.92 + + +-0.105-0.2150.14081.94 + + +-0.055-0.1800.110-91.48 + + +0.000-0.1500.075-100.0 + + +0.055-0.1100.040-102.8 + + +0.100-0.0700.005-103.5 + + +0.150-0.020-0.035-101.0 + + +0.1900.025-0.075-98.84 + + +0.2300.065-0.110-100.0 + + +0.2650.105-0.145-101.9 + + +0.2950.145-0.180-101.0 + + +0.3200.170-0.210-97.50 + + +0.3450.185-0.230-97.50 + + +0.3550.200-0.250-101.0 + + +0.3600.200-0.260-101.9 + + +0.3650.200-0.275-101.9 + + +0.3600.195-0.280-95.92 + + +0.3550.195-0.28593.98 + + +0.3400.195-0.275102.8 + + +0.3250.195-0.270101.0 + + +0.3050.190-0.25591.48 + + +0.2700.195-0.235-95.92 + + +0.2400.190-0.215-98.84 + + +0.1900.190-0.185-93.98 + + +0.1450.185-0.155-81.94 + + +0.0950.175-0.11587.96 + + +0.0350.165-0.07591.48 + + +-0.0150.150-0.04087.96 + + +-0.0700.1250.000-81.94 + + +-0.1250.0900.040-87.96 + + +-0.1750.0600.075-91.48 + + +-0.2200.0150.10581.94 + + +-0.265-0.0250.13591.48 + + +-0.305-0.0600.16595.92 + + +-0.335-0.1050.19091.48 + + +-0.360-0.1450.2050.000 + + +-0.380-0.1750.225-81.94 + + +-0.395-0.2100.23593.98 + + +-0.400-0.2350.245101.9 + + +-0.405-0.2600.255104.2 + + +-0.395-0.2700.255104.2 + + +-0.380-0.2750.255102.8 + + +-0.360-0.2850.250100.0 + + +-0.315-0.2800.23593.98 + + +-0.275-0.2750.22091.48 + + +-0.225-0.2650.20591.48 + + +-0.175-0.2500.18591.48 + + +-0.120-0.2300.15587.96 + + +-0.070-0.2000.13081.94 + + +-0.015-0.1700.095-81.94 + + +0.040-0.1300.060-95.92 + + +0.085-0.0950.020-101.0 + + +0.135-0.045-0.015-101.9 + + +0.1800.005-0.050-101.9 + + +0.2250.045-0.095-103.5 + + +0.2600.090-0.130-106.5 + + +0.2900.130-0.165-106.0 + + +0.3150.160-0.190-101.9 + + +0.3400.180-0.220-91.48 + + +0.3500.200-0.2400.000 + + +0.3600.205-0.260-81.94 + + +0.3650.205-0.270-97.50 + + +0.3600.205-0.275-101.0 + + +0.3600.205-0.280-95.92 + + +0.3450.200-0.28087.96 + + +0.3350.195-0.27593.98 + + +0.3050.200-0.26593.98 + + +0.2850.195-0.24587.96 + + +0.2500.195-0.230-81.94 + + +0.2050.195-0.20081.94 + + +0.1600.190-0.16591.48 + + +0.1100.180-0.13093.98 + + +0.0550.170-0.09091.48 + + +0.0050.160-0.055-81.94 + + +-0.0550.135-0.020-98.84 + + +-0.1050.1050.020-101.9 + + +-0.1600.0750.060-100.0 + + +-0.2050.0350.095-91.48 + + +-0.250-0.0100.13093.98 + + +-0.285-0.0500.160100.0 + + +-0.320-0.0900.180100.0 + + +-0.345-0.1300.20593.98 + + +-0.375-0.1700.22081.94 + + +-0.390-0.2000.24091.48 + + +-0.400-0.2300.24597.50 + + +-0.400-0.2500.250101.0 + + +-0.400-0.2650.255102.8 + + +-0.390-0.2700.255101.9 + + +-0.365-0.2800.250101.0 + + +-0.340-0.2800.240101.0 + + +-0.295-0.2750.225101.0 + + +-0.250-0.2600.210101.0 + + +-0.195-0.2500.18597.50 + + +-0.145-0.2250.16591.48 + + +-0.090-0.2050.135-81.94 + + +-0.035-0.1700.105-98.84 + + +0.010-0.1350.075-101.9 + + +0.065-0.1000.035-103.5 + + +0.110-0.0500.000-102.8 + + +0.160-0.010-0.040-100.0 + + +0.2050.040-0.080-97.50 + + +0.2400.080-0.115-100.0 + + +0.2750.115-0.155-103.5 + + +0.3050.155-0.180-101.9 + + +0.3300.175-0.210-97.50 + + +0.3400.185-0.230-93.98 + + +0.3600.195-0.250-98.84 + + +0.3600.195-0.265-101.9 + + +0.3600.200-0.270-102.8 + + +0.3600.195-0.280-95.92 + + +0.3550.190-0.28093.98 + + +0.3350.185-0.275104.2 + + +0.3150.190-0.260103.5 + + +0.2950.190-0.25097.50 + + +0.2650.190-0.230-91.48 + + +0.2300.190-0.200-98.84 + + +0.1800.190-0.175-95.92 + + +0.1300.180-0.145-81.94 + + +0.0800.175-0.10587.96 + + +0.0200.160-0.06591.48 + + +-0.0300.145-0.03081.94 + + +-0.0850.1150.010-91.48 + + +-0.1400.0850.045-93.98 + + +-0.1850.0450.085-91.48 + + +-0.2350.0050.12087.96 + + +-0.275-0.0400.14593.98 + + +-0.310-0.0800.17595.92 + + +-0.335-0.1200.19087.96 + + +-0.360-0.1550.210-81.94 + + +-0.375-0.1900.230-81.94 + + +-0.390-0.2200.24095.92 + + +-0.395-0.2400.250101.9 + + +-0.395-0.2600.255104.9 + + +-0.390-0.2700.255104.9 + + +-0.370-0.2750.250103.5 + + +-0.340-0.2750.240101.9 + + +-0.305-0.2750.23595.92 + + +-0.260-0.2650.22093.98 + + +-0.210-0.2600.19587.96 + + +-0.160-0.2350.17581.94 + + +-0.105-0.2150.145-81.94 + + +-0.055-0.1850.115-87.96 + + +0.000-0.1550.085-87.96 + + +0.045-0.1150.050-93.98 + + +0.100-0.0750.010-100.0 + + +0.150-0.030-0.025-101.0 + + +0.1850.010-0.065-101.0 + + +0.2250.055-0.105-103.5 + + +0.2650.100-0.140-105.5 + + +0.2900.135-0.175-104.9 + + +0.3150.165-0.200-101.0 + + +0.3350.180-0.225-87.96 + + +0.3500.195-0.2450.000 + + +0.3600.200-0.260-81.94 + + +0.3600.200-0.275-97.50 + + +0.3550.200-0.275-100.0 + + +0.3500.200-0.280-95.92 + + +0.3400.195-0.28087.96 + + +0.3200.195-0.27595.92 + + +0.3050.195-0.26093.98 + + +0.2750.195-0.24081.94 + + +0.2400.190-0.215-81.94 + + +0.2000.190-0.19081.94 + + +0.1450.185-0.16095.92 + + +0.1000.180-0.12093.98 + + +0.0400.165-0.08587.96 + + +-0.0150.155-0.045-87.96 + + +-0.0650.125-0.005-97.50 + + +-0.1200.1000.030-100.0 + + +-0.1700.0650.065-98.84 + + +-0.2150.0200.100-81.94 + + +-0.255-0.0150.13093.98 + + +-0.295-0.0600.16098.84 + + +-0.325-0.0950.18097.50 + + +-0.355-0.1350.20091.48 + + +-0.370-0.1750.2150.000 + + +-0.385-0.2050.23593.98 + + +-0.395-0.2350.245101.9 + + +-0.395-0.2550.250103.5 + + +-0.395-0.2650.250104.2 + + +-0.380-0.2800.250101.9 + + +-0.355-0.2800.245100.0 + + +-0.325-0.2750.240100.0 + + +-0.280-0.2750.220100.0 + + +-0.230-0.2600.205100.0 + + +-0.185-0.2400.18597.50 + + +-0.125-0.2200.16091.48 + + +-0.070-0.1900.130-81.94 + + +-0.020-0.1600.100-95.92 + + +0.030-0.1250.065-101.0 + + +0.080-0.0850.030-103.5 + + +0.130-0.045-0.010-103.5 + + +0.1750.005-0.045-101.0 + + +0.2150.045-0.090-98.84 + + +0.2500.090-0.120-101.0 + + +0.2850.130-0.155-102.8 + + +0.3100.155-0.185-101.9 + + +0.3300.180-0.210-97.50 + + +0.3450.190-0.230-97.50 + + +0.3550.200-0.250-98.84 + + +0.3600.200-0.260-101.0 + + +0.3600.200-0.270-101.9 + + +0.3550.195-0.275-93.98 + + +0.3450.190-0.27098.84 + + +0.3250.190-0.270104.9 + + +0.3100.190-0.260103.5 + + +0.2800.190-0.24093.98 + + +0.2500.185-0.225-93.98 + + +0.2100.185-0.200-97.50 + + +0.1650.185-0.165-91.48 + + +0.1150.180-0.1350.000 + + +0.0600.170-0.09581.94 + + +0.0100.155-0.0600.000 + + +-0.0500.135-0.020-87.96 + + +-0.1000.1050.015-93.98 + + +-0.1500.0750.050-91.48 + + +-0.2000.0400.090-87.96 + + +-0.240-0.0050.12081.94 + + +-0.280-0.0500.14591.48 + + +-0.315-0.0850.17593.98 + + +-0.340-0.1250.19587.96 + + +-0.365-0.1600.21081.94 + + +-0.380-0.1950.22591.48 + + +-0.390-0.2250.24098.84 + + +-0.395-0.2450.245102.8 + + +-0.395-0.2600.250103.5 + + +-0.385-0.2750.250103.5 + + +-0.365-0.2800.250102.8 + + +-0.335-0.2750.240100.0 + + +-0.295-0.2750.22595.92 + + +-0.250-0.2700.20587.96 + + +-0.200-0.2550.1900.000 + + +-0.150-0.2350.165-81.94 + + +-0.090-0.2100.140-87.96 + + +-0.045-0.1800.110-91.48 + + +0.010-0.1450.080-91.48 + + +0.060-0.1100.040-93.98 + + +0.110-0.0650.005-97.50 + + +0.155-0.020-0.035-98.84 + + +0.2000.025-0.075-100.0 + + +0.2350.070-0.110-104.2 + + +0.2700.110-0.145-106.5 + + +0.2950.145-0.175-105.5 + + +0.3200.170-0.200-98.84 + + +0.3400.185-0.2250.000 + + +0.3550.195-0.24581.94 + + +0.3600.200-0.260-87.96 + + +0.3600.200-0.270-100.0 + + +0.3600.200-0.275-101.9 + + +0.3500.195-0.275-93.98 + + +0.3350.195-0.27087.96 + + +0.3200.195-0.26097.50 + + +0.2950.190-0.25091.48 + + +0.2650.190-0.2350.000 + + +0.2300.190-0.210-81.94 + + +0.1850.190-0.18087.96 + + +0.1350.185-0.14593.98 + + +0.0800.175-0.11093.98 + + +0.0250.160-0.07087.96 + + +-0.0250.145-0.040-87.96 + + +-0.0800.1250.005-97.50 + + +-0.1300.0950.040-101.0 + + +-0.1800.0550.075-101.0 + + +-0.2250.0150.105-91.48 + + +-0.265-0.0250.13591.48 + + +-0.300-0.0650.16098.84 + + +-0.330-0.1050.180100.0 + + +-0.355-0.1450.20095.92 + + +-0.375-0.1750.21591.48 + + +-0.385-0.2100.23095.92 + + +-0.390-0.2350.235101.0 + + +-0.395-0.2550.245104.2 + + +-0.385-0.2700.245104.9 + + +-0.370-0.2750.240103.5 + + +-0.345-0.2800.235101.9 + + +-0.310-0.2750.22598.84 + + +-0.265-0.2700.21097.50 + + +-0.220-0.2600.19595.92 + + +-0.170-0.2450.17093.98 + + +-0.115-0.2200.14581.94 + + +-0.065-0.1950.120-87.96 + + +-0.010-0.1600.085-97.50 + + +0.035-0.1250.055-102.8 + + +0.085-0.0800.020-105.5 + + +0.135-0.035-0.015-105.5 + + +0.1750.010-0.055-101.9 + + +0.2200.055-0.095-97.50 + + +0.2550.095-0.125-98.84 + + +0.2850.135-0.160-100.0 + + +0.3100.160-0.185-98.84 + + +0.3300.185-0.210-95.92 + + +0.3450.190-0.230-93.98 + + +0.3550.200-0.245-97.50 + + +0.3600.200-0.260-101.0 + + +0.3600.200-0.265-101.9 + + +0.3550.195-0.265-93.98 + + +0.3400.190-0.27095.92 + + +0.3250.190-0.260101.9 + + +0.3050.185-0.250101.0 + + +0.2800.185-0.24093.98 + + +0.2450.185-0.215-91.48 + + +0.2050.185-0.190-91.48 + + +0.1550.185-0.155-91.48 + + +0.1050.175-0.125-87.96 + + +0.0500.165-0.085-87.96 + + +-0.0050.155-0.050-81.94 + + +-0.0550.135-0.010-81.94 + + +-0.1100.1050.0300.000 + + +-0.1600.0700.0650.000 + + +-0.2100.0350.0950.000 + + +-0.250-0.0100.13087.96 + + +-0.290-0.0500.15593.98 + + +-0.320-0.0850.18093.98 + + +-0.350-0.1300.20087.96 + + +-0.370-0.1650.2150.000 + + +-0.385-0.1950.23087.96 + + +-0.395-0.2200.24098.84 + + +-0.395-0.2450.245102.8 + + +-0.395-0.2600.245105.5 + + +-0.380-0.2650.245104.2 + + +-0.360-0.2750.235102.8 + + +-0.325-0.2700.22598.84 + + +-0.280-0.2700.21093.98 + + +-0.235-0.2650.19587.96 + + +-0.185-0.2500.1750.000 + + +-0.135-0.2350.1500.000 + + +-0.080-0.2050.120-81.94 + + +-0.030-0.1750.090-87.96 + + +0.020-0.1450.060-91.48 + + +0.070-0.1050.025-97.50 + + +0.115-0.065-0.010-100.0 + + +0.160-0.020-0.045-101.0 + + +0.2000.030-0.085-101.0 + + +0.2350.075-0.120-103.5 + + +0.2700.110-0.150-105.5 + + +0.2950.145-0.180-104.2 + + +0.3200.170-0.205-100.0 + + +0.3350.185-0.225-81.94 + + +0.3500.195-0.24581.94 + + +0.3550.195-0.2550.000 + + +0.3550.195-0.270-97.50 + + +0.3550.195-0.270-100.0 + + +0.3450.190-0.275-93.98 + + +0.3300.190-0.27091.48 + + +0.3150.190-0.26095.92 + + +0.2900.190-0.24591.48 + + +0.2600.190-0.225-81.94 + + +0.2250.190-0.200-87.96 + + +0.1800.185-0.1700.000 + + +0.1300.180-0.14081.94 + + +0.0800.170-0.10091.48 + + +0.0250.160-0.06587.96 + + +-0.0250.140-0.025-81.94 + + +-0.0800.1150.010-97.50 + + +-0.1300.0850.050-101.0 + + +-0.1800.0500.080-97.50 + + +-0.2250.0150.11581.94 + + +-0.265-0.0300.14597.50 + + +-0.300-0.0700.170101.0 + + +-0.335-0.1050.19098.84 + + +-0.355-0.1450.21091.48 + + +-0.375-0.1800.22587.96 + + +-0.385-0.2100.23597.50 + + +-0.395-0.2350.240101.9 + + +-0.390-0.2500.245104.2 + + +-0.385-0.2650.245102.8 + + +-0.365-0.2700.24098.84 + + +-0.340-0.2700.23593.98 + + +-0.305-0.2700.22095.92 + + +-0.260-0.2650.20597.50 + + +-0.210-0.2500.185100.0 + + +-0.160-0.2300.16598.84 + + +-0.105-0.2100.14091.48 + + +-0.055-0.1800.110-87.96 + + +-0.005-0.1500.085-98.84 + + +0.040-0.1150.050-101.9 + + +0.090-0.0700.015-103.5 + + +0.140-0.030-0.020-102.8 + + +0.1800.015-0.060-100.0 + + +0.2200.060-0.095-98.84 + + +0.2550.100-0.130-101.0 + + +0.2850.135-0.160-101.9 + + +0.3050.160-0.185-100.0 + + +0.3300.180-0.210-93.98 + + +0.3400.190-0.230-93.98 + + +0.3500.195-0.245-98.84 + + +0.3550.195-0.255-101.9 + + +0.3550.190-0.260-103.5 + + +0.3450.190-0.265-97.50 + + +0.3350.185-0.26595.92 + + +0.3200.185-0.255102.8 + + +0.3000.185-0.245102.8 + + +0.2750.185-0.23093.98 + + +0.2400.185-0.210-91.48 + + +0.2000.180-0.185-93.98 + + +0.1500.185-0.155-87.96 + + +0.1000.175-0.1200.000 + + +0.0450.165-0.08587.96 + + +-0.0050.150-0.04591.48 + + +-0.0600.130-0.0100.000 + + +-0.1150.1000.025-87.96 + + +-0.1600.0650.060-91.48 + + +-0.2100.0300.0950.000 + + +-0.250-0.0100.12591.48 + + +-0.290-0.0550.15095.92 + + +-0.325-0.0950.17593.98 + + +-0.350-0.1300.19581.94 + + +-0.370-0.1650.210-91.48 + + +-0.385-0.2000.2200.000 + + +-0.395-0.2250.23097.50 + + +-0.400-0.2450.240103.5 + + +-0.395-0.2600.240104.9 + + +-0.380-0.2650.240103.5 + + +-0.360-0.2700.230101.0 + + +-0.330-0.2700.22597.50 + + +-0.285-0.2700.21095.92 + + +-0.235-0.2600.19091.48 + + +-0.190-0.2500.17087.96 + + +-0.135-0.2300.145-81.94 + + +-0.085-0.2050.120-91.48 + + +-0.030-0.1750.090-91.48 + + +0.020-0.1450.060-91.48 + + +0.070-0.1050.025-93.98 + + +0.115-0.065-0.010-98.84 + + +0.160-0.015-0.045-100.0 + + +0.2050.030-0.085-101.0 + + +0.2400.070-0.120-103.5 + + +0.2750.110-0.150-106.0 + + +0.3000.140-0.175-105.5 + + +0.3250.170-0.205-101.0 + + +0.3450.180-0.220-87.96 + + +0.3550.190-0.2400.000 + + +0.3600.195-0.250-81.94 + + +0.3650.195-0.260-97.50 + + +0.3550.195-0.265-100.0 + + +0.3500.190-0.265-91.48 + + +0.3350.190-0.26091.48 + + +0.3150.190-0.25097.50 + + +0.2950.190-0.24091.48 + + +0.2600.190-0.220-87.96 + + +0.2250.190-0.195-91.48 + + +0.1800.190-0.16581.94 + + +0.1300.185-0.13591.48 + + +0.0800.175-0.10091.48 + + +0.0250.160-0.06087.96 + + +-0.0300.145-0.025-87.96 + + +-0.0800.1200.010-98.84 + + +-0.1300.0850.050-100.0 + + +-0.1800.0500.085-97.50 + + +-0.2250.0150.1100.000 + + +-0.260-0.0250.14593.98 + + +-0.300-0.0700.17098.84 + + +-0.325-0.1050.18597.50 + + +-0.350-0.1450.20587.96 + + +-0.370-0.1850.22087.96 + + +-0.380-0.2100.23098.84 + + +-0.385-0.2350.235101.9 + + +-0.390-0.2550.245103.5 + + +-0.380-0.2650.245101.9 + + +-0.370-0.2700.24098.84 + + +-0.340-0.2750.23095.92 + + +-0.305-0.2700.22095.92 + + +-0.265-0.2650.20098.84 + + +-0.215-0.2550.180101.0 + + +-0.165-0.2350.16097.50 + + +-0.110-0.2100.13587.96 + + +-0.060-0.1850.110-91.48 + + +-0.010-0.1500.075-100.0 + + +0.040-0.1100.045-102.8 + + +0.085-0.0700.005-103.5 + + +0.135-0.025-0.030-103.5 + + +0.1750.020-0.065-100.0 + + +0.2150.060-0.100-97.50 + + +0.2450.105-0.130-101.0 + + +0.2800.135-0.155-101.9 + + +0.3050.165-0.185-101.0 + + +0.3200.185-0.205-98.84 + + +0.3400.190-0.225-95.92 + + +0.3500.195-0.245-97.50 + + +0.3550.200-0.250-100.0 + + +0.3500.190-0.255-101.0 + + +0.3450.190-0.265-95.92 + + +0.3300.190-0.26095.92 + + +0.3150.185-0.250101.9 + + +0.2950.185-0.245101.0 + + +0.2700.185-0.22593.98 + + +0.2350.185-0.205-91.48 + + +0.1950.185-0.185-93.98 + + +0.1500.185-0.150-87.96 + + +0.1000.175-0.115-91.48 + + +0.0450.165-0.080-91.48 + + +-0.0100.155-0.045-87.96 + + +-0.0600.130-0.005-91.48 + + +-0.1100.1000.030-87.96 + + +-0.1650.0700.065-81.94 + + +-0.2100.0300.09087.96 + + +-0.250-0.0100.13093.98 + + +-0.290-0.0500.15097.50 + + +-0.325-0.0950.17597.50 + + +-0.345-0.1300.19591.48 + + +-0.370-0.1650.21081.94 + + +-0.380-0.2000.22087.96 + + +-0.395-0.2300.235100.0 + + +-0.395-0.2500.235102.8 + + +-0.390-0.2600.240104.2 + + +-0.380-0.2650.240103.5 + + +-0.355-0.2750.230101.9 + + +-0.325-0.2700.22098.84 + + +-0.280-0.2700.21095.92 + + +-0.235-0.2650.19087.96 + + +-0.185-0.2500.1700.000 + + +-0.135-0.2400.150-87.96 + + +-0.085-0.2100.120-91.48 + + +-0.030-0.1800.090-93.98 + + +0.020-0.1500.055-93.98 + + +0.070-0.1100.025-95.92 + + +0.110-0.060-0.010-100.0 + + +0.160-0.020-0.045-101.0 + + +0.2050.025-0.085-101.0 + + +0.2350.070-0.115-102.8 + + +0.2700.110-0.145-104.9 + + +0.3000.140-0.175-104.9 + + +0.3200.165-0.200-98.84 + + +0.3400.180-0.220-87.96 + + +0.3450.195-0.23581.94 + + +0.3550.195-0.25581.94 + + +0.3600.200-0.260-93.98 + + +0.3500.195-0.265-97.50 + + +0.3450.190-0.265-91.48 + + +0.3300.195-0.26091.48 + + +0.3100.190-0.25597.50 + + +0.2900.190-0.24091.48 + + +0.2600.190-0.2200.000 + + +0.2200.190-0.195-87.96 + + +0.1750.190-0.16581.94 + + +0.1250.185-0.13581.94 + + +0.0750.175-0.10081.94 + + +0.0250.165-0.0600.000 + + +-0.0300.145-0.020-87.96 + + +-0.0800.1200.010-98.84 + + +-0.1300.0900.050-98.84 + + +-0.1800.0500.080-97.50 + + +-0.2200.0150.110-87.96 + + +-0.265-0.0250.14087.96 + + +-0.295-0.0700.16598.84 + + +-0.320-0.1050.185100.0 + + +-0.350-0.1400.20598.84 + + +-0.365-0.1750.21597.50 + + +-0.375-0.2050.230100.0 + + +-0.385-0.2250.235102.8 + + +-0.380-0.2450.240102.8 + + +-0.375-0.2600.240101.0 + + +-0.360-0.2650.23595.92 + + +-0.325-0.2650.22593.98 + + +-0.295-0.2650.21593.98 + + +-0.255-0.2600.20098.84 + + +-0.210-0.2450.18098.84 + + +-0.155-0.2300.15595.92 + + +-0.105-0.2100.13081.94 + + +-0.060-0.1800.105-91.48 + + +-0.005-0.1550.075-97.50 + + +0.045-0.1200.040-100.0 + + +0.085-0.0800.010-101.9 + + +0.130-0.035-0.030-101.9 + + +0.1700.005-0.060-97.50 + + +0.2150.050-0.100-93.98 + + +0.2450.090-0.130-97.50 + + +0.2750.125-0.160-102.8 + + +0.3050.155-0.185-101.9 + + +0.3200.175-0.210-97.50 + + +0.3350.180-0.225-95.92 + + +0.3450.190-0.240-95.92 + + +0.3500.190-0.250-100.0 + + +0.3450.185-0.255-101.9 + + +0.3400.185-0.260-98.84 + + +0.3300.180-0.26087.96 + + +0.3150.185-0.250101.9 + + +0.2950.180-0.245103.5 + + +0.2700.180-0.22595.92 + + +0.2350.175-0.210-81.94 + + +0.2050.180-0.175-93.98 + + +0.1500.175-0.150-93.98 + + +0.1050.170-0.115-91.48 + + +0.0500.155-0.0750.000 + + +0.0000.145-0.04087.96 + + +-0.0550.130-0.0050.000 + + +-0.1050.1000.030-91.48 + + +-0.1550.0650.065-91.48 + + +-0.2000.0300.095-87.96 + + +-0.245-0.0100.13081.94 + + +-0.275-0.0500.15597.50 + + +-0.310-0.0900.17598.84 + + +-0.335-0.1250.19595.92 + + +-0.355-0.1600.21081.94 + + +-0.375-0.1900.22581.94 + + +-0.385-0.2200.23595.92 + + +-0.380-0.2400.240101.0 + + +-0.385-0.2550.240104.2 + + + + + + + diff --git a/tests/test_bw_file_fields.py b/tests/test_bw_file_fields.py index 3af2f1d..c049752 100644 --- a/tests/test_bw_file_fields.py +++ b/tests/test_bw_file_fields.py @@ -595,10 +595,66 @@ def test_time_of_peak_is_the_units_own_peak_sample(): assert pv.pvs_time == 0.0 -def test_without_the_units_summary_nothing_is_guessed(): +def test_an_unreadable_channel_record_leaves_only_that_channel_unread(): raw = bytearray((_FIX / f"{_US}/I145L6UJ.3Y0W").read_bytes()) i = raw.find(b"\x00\x16\x32") - raw[i + 2] = 0x00 # break the Tran record's id + raw[i + 2] = 0x00 # break the Tran record's id; the chain holds pv = decode_blastware_bytes(bytes(raw), name=None).peak_values - assert (pv.tran_zc_freq, pv.mic_zc_freq, pv.tran_peak_disp_in) == (None, None, None) + assert (pv.tran_zc_freq, pv.tran_peak_disp_in) == (None, None) assert abs(pv.tran_time_of_peak - 2.281) <= 0.0005 # the samples' peak, as before + assert _prints_as(pv.mic_zc_freq, "43") # the others are read + + +def test_without_a_whole_record_chain_nothing_is_guessed(): + # The chain from the event record ends exactly at the file's end on all + # 70,041 DL2 files; one that does not is not read at all. + raw = bytearray((_FIX / f"{_US}/I145L6UJ.3Y0W").read_bytes()) + i = raw.find(b"\x00\xd4\x3c") # the Tran sensor-check record, length 212 + raw[i + 1] = 0xd3 # one byte short + ev = decode_blastware_bytes(bytes(raw), name=None) + assert ev.sensor_check_results is None + pv = ev.peak_values + assert (pv.tran_zc_freq, pv.mic_zc_freq, pv.tran_peak_disp_in) == (None, None, None) + + + +# โ”€โ”€ Group E: the sensor check results โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +# Records 0x3c Tran .. 0x3f MicL, after the unit's summary, carry the sensor +# check the unit ran: its trace (minimateplus.sensor_check) and, in the record's +# header, its results (measured on DL2, 2026-11-06): +# [2] channel type (1 geophone, 2 mic, 0 check disabled) [4] status, 0 = passed +# [5:7] frequency x 10 [7:9] ratio x 10 [9:11] amplitude, mV +# Blastware prints them as they are: 209,943 / 209,943 geophone frequencies and +# ratios, 69,975 / 69,975 mic frequencies and amplitudes; "Passed" on status 0, +# "Check" on every other status, "Disabled" on type 0. + +@pytest.mark.parametrize("rel,want", [ + # channel: (result, frequency Hz, ratio, amplitude mV), Blastware's _XML.XML + (f"{_US}/I145L6UJ.3Y0W", {"Tran": ("Passed", 7.3, 3.7, None), "Vert": ("Passed", 7.2, 3.9, None), + "Long": ("Passed", 7.2, 3.9, None), "MicL": ("Passed", 19.7, None, 592)}), + (f"{_US}/K440HJCN.AS0W", {"Tran": ("Check", 9.6, 13.8, None), "Vert": ("Check", 8.5, 7.2, None), + "Long": ("Passed", 7.3, 1.9, None), "MicL": ("Passed", 19.7, None, 519)}), + (f"{_US}/R349KMF7.9O0W", {"Tran": ("Passed", 7.4, 3.8, None), "Vert": ("Passed", 7.5, 3.5, None), + "Long": ("Passed", 7.8, 3.6, None), "MicL": ("Check", 0.0, None, 0)}), + (f"{_US}/R352HFZ7.5D0W", {"Tran": ("Disabled", None, None, None), # no mic; check disabled + "Vert": ("Disabled", None, None, None), + "Long": ("Disabled", None, None, None)}), + (f"{_US}/T193HLJ3.X80H", {"Tran": ("Passed", 7.4, 3.9, None), "Vert": ("Passed", 7.2, 3.9, None), + "Long": ("Passed", 7.5, 4.1, None), "MicL": ("Passed", 20.1, None, 556)}), +]) +def test_sensor_check_results_are_the_units_own(rel, want): + got = read_blastware_file(_FIX / rel).sensor_check_results + assert set(got) == set(want) + for ch, (result, freq, ratio, amp) in want.items(): + r = got[ch] + assert r.result == result, ch + assert r.freq_hz == (pytest.approx(freq) if freq is not None else None), ch + assert r.ratio == (pytest.approx(ratio) if ratio is not None else None), ch + assert r.amplitude_mv == amp, ch + + +def test_a_check_keeps_the_units_status_code(): + # Blastware prints only "Check"; the code's bits are not decoded (K559L6N1's + # Tran is a Check at 8.1 Hz and 3.3, inside every passing range). + got = read_blastware_file(_FIX / f"{_US}/K440HJCN.AS0W").sensor_check_results + assert [got[ch].status for ch in ("Tran", "Vert", "Long", "MicL")] == [11, 2, 0, 0] diff --git a/tests/test_decode_check.py b/tests/test_decode_check.py index 1f9ed31..56ae130 100644 --- a/tests/test_decode_check.py +++ b/tests/test_decode_check.py @@ -43,7 +43,7 @@ def test_report_fields_stay_blank(): # since 2026-11-04, ZC frequency and displacement since 2026-11-05: # test_the_setup_fields_match_blastware, test_waveform_peak_detail_*, # test_zc_frequency_and_displacement_match_blastware. Its Tran ZC is N/A.) - for tag in ("TranZCFreq", "TranTestResults"): + for tag in ("TranZCFreq",): # (sensor check results since 2026-11-06) assert s.values.get(tag) is None @@ -393,3 +393,26 @@ def test_a_clipped_events_peak_times_match_blastware(): for f in ("TranTimeofPeak", "VertTimeofPeak", "LongTimeofPeak", "MicLTimeofPeak", "PeakVectorSumTimeSum"): assert res[f].verdict == "match", (f, res[f]) + + + +# โ”€โ”€ Group E: the sensor check results (2026-11-06) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +_SENSOR_CHECK = [f"{ch}Test{f}" for ch in ("Tran", "Vert", "Long", "MicL") + for f in ("Results", "Freq", "Ratio", "Amplitude")] + + +@pytest.mark.parametrize("path", [ + FIX / "R352HIUI.F40W", FIX / "T1905KDW.5F0W", FIX / "T004JTRF.ME0H", FIX / "M529L4XQ.R30H", + _US / "K440HJCN.AS0W", # two Checks + _US / "K558IKSJ.P20W", _US / "O117I1NK.R70W", +]) +def test_sensor_check_results_match_blastware(path): + ref = parse_xml_report_file(path.with_name(path.name.replace(".", "_", 1) + "_XML.XML")) + res = {r.field: r for r in compare(sfm_side(path.read_bytes()), ref, CARVEOUTS)} + checked = 0 + for f in _SENSOR_CHECK: + if ref.scalars.get(f) is None: + continue + assert res[f].verdict == "match", (f, res[f]) + checked += 1 + assert checked >= 4 diff --git a/tests/test_sensor_check.py b/tests/test_sensor_check.py index b39924a..ecb832a 100644 --- a/tests/test_sensor_check.py +++ b/tests/test_sensor_check.py @@ -65,3 +65,14 @@ def test_mic_channel_is_a_pulse_train(): def test_returns_empty_when_no_sensor_check_block(): assert decode_sensor_check(b"not a blastware file") == {} assert decode_sensor_check(b"") == {} + + +def test_a_unit_without_a_mic_has_its_three_geophone_traces(): + # BE16352 records no mic: its chain carries 0x3c-0x3e only (all 8 of its + # DL2 events, 2026-11-06), and the three ring-downs were being dropped. + raw = (Path(__file__).parent / "fixtures" / "decode-checker-10-29-26" / "R352HFZ7.530H").read_bytes() + sc = decode_sensor_check(raw) + assert set(sc) == {"Tran", "Vert", "Long"} + for ch in ("Tran", "Vert", "Long"): + tr = np.asarray(sc[ch], dtype=float) + assert len(tr) > 200 and tr.min() < -500, (ch, len(tr), tr.min())