# IDF Protocol Reference — Thor / Micromate Series IV Starting-point reference for reverse-engineering Instantel's Micromate Series IV event-file format. Sibling to [instantel_protocol_reference.md](instantel_protocol_reference.md) (the Series III "Rosetta Stone") — this doc holds what we know so far and the open questions still to crack. **Status (2026-05-20):** ASCII text sidecar fully decoded (1,014 sample files round-trip). Binary `.IDFH` / `.IDFW` codec **not yet implemented** — binaries are stored opaquely by `WaveformStore.save_imported_idf`, with metadata sourced from the paired `.txt` sidecar. --- ## File model ### Filename convention ``` _. ``` - **SERIAL** — literal device serial, two-letter prefix + numeric suffix. Examples seen: `UM11719`, `UM13981`, `UM20147`, `BE9439`. Unlike Series III BW filenames (`M529LK44.AB0`, base-36 stem), Series IV filenames carry the serial in plain text. - **YYYYMMDDHHMMSS** — 14-char ASCII timestamp in **device local time** (no timezone marker). - **KIND** — `IDFH` for histograms, `IDFW` for waveforms. The `.IDFH.txt` / `.IDFW.txt` ASCII sidecar lives in a `TXT/` **subfolder** of the unit's directory, not alongside the binary. This pairing convention is encoded in `event_forwarder.idf_report_path()`. ### Directory layout ``` C:\THORDATA\ └── \ └── \ ← unit serial dir ├── UM12345_20260520100000.MLG ← monitor log (not events) ├── UM12345_20260520100000.IDFH ← histogram event (binary) ├── UM12345_20260520100000.IDFW ← waveform event (binary) ├── UM12345_20260520100000.IDFW.CDB ← cache-DB variant (skip) ├── TXT\ │ ├── UM12345_20260520100000.IDFH.txt ← histogram ASCII sidecar │ └── UM12345_20260520100000.IDFW.txt ← waveform ASCII sidecar ├── CSV\, HTML\, PDF\, XML\ ← operator-facing derived exports └── ... ``` The `.IDFW.CDB` files share the binary's basename but appear to be a separate cache/database variant. Their first 8 bytes match the **old**-firmware Thor signature (see below) regardless of which signature the paired `.IDFW` uses. Purpose unknown; sizes vary wildly (observed 123 B → 40,491 B). Thor-watcher's forwarder deliberately skips them. ### Sample corpus The `thor-watcher/example-data/THORDATA_example/` tree carries **1,014 paired .IDFW / .IDFH + .txt files** spanning 2020–2023 across nine units (UM11719, UM13981, UM20147, …, plus BE9439 from 2020). This is the reverse-engineering ground truth. --- ## ASCII sidecar (`.IDFW.txt` / `.IDFH.txt`) — fully decoded Shape: plain text, one `"Key : Value"` line per metadata field, followed for waveforms by a tab-separated sample table headed by the literal line `Waveform Data Channels`. Parsed by [`micromate/idf_ascii_report.py`](../micromate/idf_ascii_report.py). See [`micromate/models.py`](../micromate/models.py) for the typed `IdfReport` shape. ### Notable conventions - **Units are native to Thor** — geophone in **in/s**, microphone in **dB(L)** (not psi like Series III BW reports), frequency in Hz, acceleration in g, displacement in in. - **Below-threshold readings** appear as the literal string `<0.005 in/s` (155 occurrences in the sample corpus) — the parser strips the `<` and treats the numeric remainder as the value. - **Out-of-range / not-measured** values appear as `N/A` — parser drops the field rather than letting the string leak into a numeric column. - **Firmware string** observed: `Micromate ISEE 11.0AK`. - **TitleString1..4** are operator-defined free-text slots; Thor's default labels map them to Location / Client / Company / Notes, which the parser surfaces as `project` / `client` / `operator` / `notes`. - **Histogram sidecars** use `HistogramStartDate` / `HistogramStartTime` in place of waveform's `EventDate` / `EventTime`. Parser falls through to either. - **Histogram tabular block** lacks the `Waveform Data Channels` marker; instead it's a multi-line column header followed by per-interval rows (`