Root cause of Am-241 misidentification: the Radiacode 103's CsI(Tl) crystal
shifts low-energy peaks upward (59.5 keV → 71.6 keV for Am-241) due to
non-proportional scintillation response. The model was trained on theoretical
peak positions and couldn't match the shifted real peaks.
Changes:
- Add inverse CsI(Tl) non-linear correction to inference pipeline
(radiacode_monitor.py, web/config.py, test_detection.py)
E_apparent = E_true * (1 + 0.37 * exp(-E_true/100))
Corrects channel mapping so peaks appear at theoretical energies
- Fix energy calibration: DetectorConfig now uses E = 0.33 + 2.97*ch
with 1023 channels, matching the real detector (was energy_min=20,
skip_first_channel=True, different channel width)
- Add K-escape peaks for CsI(Tl) iodine X-ray escape (E - 28.5 keV)
- Add asymmetric peak shapes for low-energy tails (< 200 keV)
- Add log1p normalization in dataset and inference (replaces max-norm)
- Add background-subtracted training mode (subtract_background flag)
- Add low-signal augmentation (0.01-5 Bq activities, 30-300s durations)
- Update docker-compose.yml: batch_size=32, duration=30-300s,
CSI_NONLINEAR_ALPHA/BETA env vars for detect and web
- Web dashboard: apply CsI correction to displayed spectra
- Various UI fixes (Chart.js width, zoom/pan, isotope lines)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The .chart-container.fullscreen CSS was missing height: 100vh, so the
container stayed at the default 450px height instead of expanding to
fill the full screen.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use {x,y} data format so Chart.js linear scale uses energy values
instead of channel indices. After reset, force scale min/max to the
full energy range.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The spectrum chart was missing xMin/xMax persistence and data boundary
clamping in enablePan(). Align with the background/cps chart patterns.
Bump cache versions to force browser refresh.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remplace le continuum exponentiel par un modèle réaliste CsI(Tl) dans
l'entraînement (bosse asymétrique ~110 keV + queue Compton)
- Ajoute l'injection de background mesuré (70% mesuré / 30% synthétique)
via --measured_background et MEASURED_BACKGROUND_PATH
- Ajoute l'endpoint /api/background/continuum et le toggle "Continuum CsI"
sur le dashboard background
- Exclut le canal 1023 (overflow bin) de l'affichage web (NUM_CHANNELS=1023)
- Corrige le lissage Gaussien du background (normalisation locale aux bords)
- Met à jour README.md, CLAUDE.md, TUTORIEL.md, TOTO.md, vega_ml/README.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 4 vues : spectre temps reel, historique detections, background, timeline CPS
- API REST : /api/status, /api/spectrum/current, /api/spectrum/difference,
/api/background, /api/background/spectrum, /api/history, /api/cps/timeline
- Frontend vanilla JS + Chart.js (pas de Node.js, leger pour Pi 4)
- Moniteur modifie pour exporter son etat dans /data/monitor_state.json
et le CPS dans /data/cps_log.jsonl chaque cycle
- Nouveau conteneur Docker 'web' sur port 8080
- Theme sombre, calibration energie (E = 0.33 + 2.97 * canal)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Explication etape par etape du pipeline complet :
- Durees et raisons (24h background, 12-24h spectres synthetiques)
- Bruit Poissonnien et rapport signal/bruit
- Physique des spectres synthetiques (Compton, FWHM, efficacite)
- Architecture VegaModel et resultats d'entrainement
- Interpretation des rapports et isotopes de reference
- Guide de transfer vers Raspberry Pi 4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>