This repository had diverged from the working tree: its src/analysis/ still
held only the peak-search identifier, and none of the work since v1.0.6 had
been published. This commit replays that work onto this history. It is a
single commit by necessity - the working tree was tracked in a separate,
unrelated history whose root commit contains credential files from an
archived project, so that history is deliberately not pushed.
Identification rebuilt on full-spectrum template fitting
src/analysis/{templates,fit,identify,ambient}.*, src/data/spectrum_window.*
The peak-search pipeline had accumulated ~28 tuned constants and 6 boolean
gates, and was measurably non-monotonic on real ore: correct at 300 s and
600 s, wrong at 900 s and 1200 s, correct again at 1800 s. More data made it
worse. Replaced with per-nuclide templates plus a broad continuum basis, a
Poisson ML-EM fit, full Fisher covariance, and chain-coupled columns for
members in secular equilibrium.
Chain elevation is judged against a learned ambient floor rather than a
fixed 4%-of-counts cutoff, which had been acting as a hardcoded ~0.20 uSv/h
dose gate and discarded an 8-sigma detection for missing it by 0.3
percentage points.
spectrum_window.* analyses counts accumulated since a baseline that rolls
forward when the count rate steps, so a sample presented to a detector that
has been integrating for hours is not diluted into the accumulation.
Startup update check no longer evicts the detector link
Reported twice from the field as "it reconnects itself" about 30-40 s after
power-on. WiFi and BLE cannot both hold their buffers on this board, so an
update check must drop the link - and the check was scheduled at boot + 45 s,
landing squarely on a connection that had just come up. It now runs before
anything is connected, with a watchdog so a stalled WiFi job cannot leave the
detector disconnected.
Offline replay harness
host/ compiles the firmware's own analysis sources against shims, so
regressions are caught on real captures before touching hardware. Includes
three real acquisitions (background 3808 s, thorium 1048 s, uranium 1829 s),
which are the authority for any future change.
Design log
CLAUDE.md records the hardware constraints, every field test, and the
reasoning behind each decision - including the measurements showing why some
obvious-looking fixes would not work.
Verified: THORIUM 120 s, URANIUM 300 s, BACKGROUND stable on the real
captures, and on hardware 86 consecutive THORIUM verdicts with a single BLE
connect over ten minutes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
939 B
Plaintext
47 lines
939 B
Plaintext
# build output and caches - rebuildable, and permanent once committed
|
|
.pio/
|
|
.pioenvs/
|
|
.piolibdeps/
|
|
build/
|
|
dist/
|
|
__pycache__/
|
|
*.pyc
|
|
*.pyo
|
|
.venv/
|
|
venv/
|
|
env/
|
|
node_modules/
|
|
|
|
# local editor state
|
|
.vscode/.browse*
|
|
.vscode/c_cpp_properties.json
|
|
.vscode/launch.json
|
|
.vscode/ipch/
|
|
*.code-workspace
|
|
|
|
# large/derived artefacts
|
|
*.sqlite3
|
|
*.db-journal
|
|
*.o
|
|
*.elf
|
|
*.map
|
|
|
|
# secrets must never enter history - use environment variables
|
|
.env
|
|
*.pem
|
|
*.key
|
|
credentials.json
|
|
|
|
# The generic display/touch bring-up base this firmware was seeded from is a
|
|
# separate concern and now lives outside the project, at
|
|
# ../ESP32-S3-Touch-base. It is reference material, not part of this build,
|
|
# and it carries an archive of the unrelated project it came from - including
|
|
# credential files. Keep it out of this repo.
|
|
ESP32-S3-Touch/
|
|
|
|
# Local editor state - machine-specific paths, no value to anyone else.
|
|
.vscode/
|
|
|
|
# clangd index config - local editor state.
|
|
.clangd
|