How praveenyt872/h2s-dose-reader works
H2S Dose Reader is an offline, client-side tool for turning a photo of a colorimetric H2S dosimeter strip into a dose estimate and occupational exposure record. The main workflow captures or uploads an image, samples white, grey, and strip colors, corrects for lighting, estimates dose and displays a safety classification; users can save and export readings. The README documents demo-image generation and CSV reporting, while sampled script excerpts also indicate worker enrollment, face verification, and zone-time tracking. Those latter features are mapped cautiously because their full wiring was not sampled.
Main entry points: script.js Capture and workflow · index.html Reader interface · sw.js Offline cache · calibration.js Dose calibration
Components 18
Strip measurement
- Reader interface
index.html - Capture and workflow
script.js - Device camera
- Color sampling
script.js - Lighting correction
script.js - Demo image
script.js
Exposure assessment
- Dose calibration
calibration.js - TWA calculation
calibration.js - Safety classification
calibration.js - Reading records
script.js - Dashboard and CSV
script.js
Worker tracking
- Face enrollment and verification
script.js - Zone-time sessions
script.js - Browser local storage
Offline app
- Offline cache
sw.js - Cached app assets
Other components
- Worker
- Administrator
Connections 20
- Worker → Reader interface: uses
- Administrator → Reader interface: uses
- Reader interface → Capture and workflow: dispatches
- Capture and workflow → Device camera: captures
- Capture and workflow → Color sampling: samples image
- Color sampling → Lighting correction: provides colors
- Capture and workflow → Demo image: generates sample
- Capture and workflow → Dose calibration: gets dose
- Capture and workflow → TWA calculation: calculates TWA
- Capture and workflow → Safety classification: determines status
- Capture and workflow → Reading records: saves reading
- Reading records → Browser local storage: persists
- Dashboard and CSV → Reading records: reads and exports
- Reader interface → Dashboard and CSV: opens
- Capture and workflow → Face enrollment and verification: handles verification
- Capture and workflow → Zone-time sessions: tracks zone time
- Face enrollment and verification → Browser local storage: stores enrollment
- Zone-time sessions → Browser local storage: stores sessions
- Offline cache → Cached app assets: caches assets
- Worker → Offline cache: loads offline app