9 Commits
Author SHA1 Message Date
serversdownandClaude Opus 5.5 6818e3023e feat(checker): a histogram row printing one unit in both mic columns is the mixed-units case
The ~20 histograms with one mic interval off were Blastware printing
the same number in both mic columns of a row: I145HKWT.DY0H row 672
reads 95.92 under psi(L) and dB(L) (count 5: dB), S353K894.OE0H rows
106 and 608 read 0.000 under both (count 2: psi).  SFM's count agrees
with the neighbouring rows and with the other column.  mic-units-mixed
now covers the interval mic columns too; a column names its own unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-09 14:45:41 -05:00
serversdownandClaude Opus 5.5 0b6150adb5 feat(checker): read each mic value in the unit Blastware printed; carve out mixed columns
Blastware's dB(L) / psi(L) labels do not hold for the mic on every
report (DL2, 2026-11-09):
- the mic peak carries its own <Units>, which 7 reports set to dB under
  a psi Units line and 3 the reverse: the checker now reads the peak in
  its own unit;
- a mic sample table has no unit of its own and need not follow the
  line (S353JTHU.DT0W prints dB under psi): the checker reads it from
  its cells -- 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.  Carve-out
  mic-units-mixed accepts a mic field when every cell SFM disagrees
  with is SFM's own value in the other unit: 19 DL2 events (14 sample
  tables, 5 peaks); a cell matching neither stays a mismatch.

Not a decoder change: SFM's mic data were right.  Checker run
20261109-141808: 78 of 88 fields, 0 regressions; no mic peak or mic
sample table mismatches left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-09 14:44:11 -05:00
serversdownandClaude Opus 5.5 e25784d9db feat(decode): over range inside a histogram's intervals, as in the event
Inside an interval the rule is the event's: a peak past 2,000 units
(the mic in counts) is Blastware's OORANGE, and the interval's vector
sum is OORANGE when any geophone is.  DL2 (2026-11-09): numeric up to
1,846 (geophones) / 1,414 (mic), OORANGE from 2,001; vector sums 16 / 16
OORANGE with a geophone over, 2,862 / 2,862 numeric without.

event_file_io.over_full_scale(count, channel); the checker renders those
interval cells as OORANGE.  The saturation carve-out compares SFM's own
words properly (_differs): an OORANGE from SFM never counts as
saturation, and an OORANGE equal to Blastware's is not a difference.
Its interval tests run on the numeric values it used to see.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-09 13:35:08 -05:00
serversdownandClaude Opus 5.5 13f2769736 feat(decode_check): an OORANGE interval vector sum is saturation
Blastware prints OORANGE for an interval's vector sum when it exceeds
the range in an interval where Blastware also clamped a channel: 17 / 17
DL2 cells, SFM's sum 10.01 .. 17.33 in/s (sqrt 3 x 10.005).  The
saturation carve-out now covers intervals.Geo PVS in/s with that rule,
per interval, as it already did for PeakVectorSum.  The 4 other cells
left mismatching sit 4e-6 past a rounding boundary (Blastware's
arithmetic is a hair lower) and stay mismatches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-03 18:02:51 -05:00
serversdownandClaude Opus 5.5 6c2dbf0463 docs(decode_check): the units carve-out cites Instantel's manuals
Both settings are documented: the unit's Microphone Units (MiniMate Plus
manual s3.9.7, keypad Right Arrow + Setups: psi(L) / dB(L) / Pa(L)) and
Blastware's report preference (Blastware manual s4, Preferences > Units
and Channel).  The report follows Blastware's, as DL2's fleet-wide
switches showed.  Where the unit's own setting is stored is unmeasured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-03 17:15:28 -05:00
serversdownandClaude Opus 5.5 6c2eda5f63 feat(decode): a Blastware file's identity, battery and trigger settings
Group A of the file-only decode, every field matched against every DL2
report (2026-11-03):

- Identity block before the setup name, what the live read gets from
  SUB FE: serial k-202, firmware k-147, DSP version k-138, calibration
  date k-132 + 'by' k-128, manufacturer k-94, model k-72, firmware
  minor k-193.  Event.device_info (DeviceInfo gains calibration_date /
  calibrated_by).  Serial, Version and Calibration 69,983 / 69,983.
- Battery: uint16 hundredths of a volt at k-190 (Event.battery_volts).
  69,729 exact; the other 254 are Blastware rounding half up.
- Trigger source: the two bytes between the embedded event record's
  lead and fe 80, a bitmask (0x01 Tran 0x02 Vert 0x04 Long 0x08 MicL
  0x200 Manual): 6,493 / 6,493.  Event.triggered_by.
- Trigger settings in Series IV's 0x1A layout: sources bitmask k-19,
  stop mode k-31 (0 = Fixed), each channel's float32 level at
  label+30 (geo in/s, mic psi), mic type code at MicL+4 (2 = Linear
  Weighting).  Geo level 6,447 / 6,447, mic 4,403 / 4,403; Blastware
  prints a level when its channel is a trigger source and the event
  was not Manual.  The mic level's dB uses 6895 Pa/psi (4,272 / 4,272
  against 4,271 at 6894.757).
- .h5 attrs for all of them (additive).
- Checker: SFM's side reports the ten fields; the mic trigger level
  follows the report's dB/psi.  Carve-out
  units-is-a-display-preference: dB or psi is Blastware's PC setting
  when it wrote the report -- DL2's reports switch fleet-wide in 61
  clean runs by write time, and no byte of the file separates them.
  Two tests that pinned BatteryLevel / Calibration as blank now pin the
  match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-03 13:38:39 -05:00
serversdownandClaude Opus 5.5 aec4a38473 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-02 16:20:32 -05:00
serversdownandClaude Opus 5.5 c0d837c14f fix(checker): final-review fixes -- regressions, baselines, the PVS carve-out, the headline
- A matching event that now fails outright is a regression: compare_runs
  walks the previous run's matching rows, so a check that collapses to
  one error row no longer hides every field it used to match.  Counts
  moved are taken over the events both runs checked.
- The default baseline is the newest completed run (run.json written) of
  the same scope; a 2,000-event sample is no baseline for a full run.
  changes.md names the previous run's scope.
- The PVS saturation carve-out now needs Blastware's OORANGE, a channel
  Blastware clamped at SFM's ceiling, and SFM's sum within three channels
  at the ceiling -- an unclipped Sensitive-range channel read 8x can no
  longer let an 8x sum through.
- 'Fields fully matching' needs a match: an always-empty element proves
  nothing.  Events without a report are a line of their own.
- CLAUDE.md: histogram PVS described correctly; 35 sub-minute histograms
  plus 2 one-minute no-mic ones, not '~37 sub-minute'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-10-29 20:11:33 -04:00
serversdownandClaude Opus 5.5 ff7dd908a7 feat(codec): carve-outs for proven Blastware differences -- saturation first
A mismatch becomes 'accepted' only through a written carve-out whose
evidence does not rest on SFM's output.  Saturation: Blastware clamps a
clipped channel to the range maximum and prints OORANGE, while the file
holds counts past full scale.  SFM's value must sit at the ceiling
(r - 0.0006 .. r * 1.01), so a Sensitive-range event read 8x high on
SFM's Normal assumption stays a mismatch; a vector sum is accepted when
a clipped channel under it is at the ceiling.  series_pairs() is now the
one place waveform rows and interval columns are paired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-10-29 19:27:01 -04:00