F1ReplayTiming
F1 리플레이와 실시간 트랙 데이터·텔레메트리를 시각화
브라우저에서 방사선 센서 데이터를 검토, 동료 비교·이상 탐지·정비 안내 제공, 교육용이며 설비 제어나 안전 시스템이 아님
Browser-based review of radiation-monitor sensor data: peer comparison, anomaly detection and maintenance guidance. A training aid, not a plant-control or safety system.
데이터JavaScript · PythonGitHub @rpeyyety-luffy온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗NuclearRad AI monitoring console — a Streamlit training simulation of a five-sensor radiation watch.
NuclearRad AI is a research and training prototype on synthetic data. It is not a safety-certified system, has not been validated on real plant instruments, and never controls equipment. All metrics it shows come from its own simulations.
Windows Command Prompt (Python 3.10 or newer):
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python model_training.py
streamlit run main.py
Other commands (same window, with the virtual environment active):
python -m pytest
python batch_testing.py --runs-per-scenario 5
python model_training.py --retrain
On macOS / Linux use source .venv/bin/activate instead of .venv\Scripts\activate.
python model_training.py trains the model once (about 30 seconds) and saves it in models/;
the dashboard and the batch script load that file instead of retraining. If no compatible model is
saved (for example after the features or scikit-learn version change), it is trained automatically.
main.py)| Tab | What it does |
|---|---|
| A · Overview | Reactor schematic, sensor cards and status from the original rule-based monitor |
| B · Scenario simulator | Choose scenario, seed, noise, sensor, start, duration and magnitude; Generate scenario; download the labelled run |
| C · Sensor monitoring | Peer comparison, trust over time and per-sensor timelines (rule-based monitor) |
| D · Model prediction | Predict: fault present, category, affected sensor, uncalibrated vote share; ML vs rule-based detector; health score of every sensor over time |
| E · Fault-tolerance response | Simulate response: recommended action, suggested maintenance per faulty sensor, and a peer-based correction with raw vs corrected MAE |
| F · Evaluation | Validation and held-out test metrics, confusion matrix, per-class report |
| G · Automated testing | Run batch test on fresh seeds; results table and CSV download |
| File | Role |
|---|---|
nuclearrad.py | Original demo (generate, assess, forecast, summarise) plus the configurable simulator (ScenarioConfig, simulate) |
feature_engineering.py | 15 causal per-sensor features (past and present readings only) |
dataset_generator.py | Labelled runs; train / validation / test split by run, from disjoint seed ranges |
model_training.py | Random Forest; thresholds tuned on validation; test split evaluated once; save / load |
fault_detection.py | Per-sample classification and run-level verdict; same aggregation applied to the rule-based detector |
fault_response.py | Recommended responses and the simulated peer-based correction |
sensor_health.py | Health score and condition per sensor, and a suggested maintenance action (replace, repair, recalibrate, inspect) |
evaluation.py | Metric formulas (N/A where a denominator is zero) |
batch_testing.py | Batch evaluation and CSV export (results/batch_results.csv) |
The model gives each sensor a health score from 0 to 100 at every sample: 100 × (1 − the mean model probability of an instrument fault over the last 20 samples). Like the vote share, it is not calibrated. Each sensor gets a condition: Healthy, Watch (not confirmed yet), Degraded, Faulty or Failed (stuck, or signal lost). A confirmed fault gets a suggested maintenance action, chosen from the fault type the model predicted and the severity measured in the readings:
| Predicted fault | Suggested action |
|---|---|
| Stuck | REPLACE (immediate) |
| Dropout | REPAIR cable, connector, power or logger (immediate when most recent readings are missing) |
| Drift | RECALIBRATE below a 30% offset from the peers; REPLACE at or above it |
| Noise | REPAIR shielding, grounding or supply below 8× normal scatter; REPLACE above it |
| Spike | INSPECT connectors for fewer than 4 spike events; REPAIR from 4 on |
These limits are illustrative values for this simulator, not limits of any real instrument. The
batch test checks each suggestion against the action the simulation's ground truth calls for
(maintenance_correct in the CSV) and counts runs where work was suggested on a healthy sensor.
Scenarios: Normal, Spike (positive / negative), Drift (upward / downward), Stuck, Noise, Dropout, Two faulty sensors, Real leak (a real plant-wide change, not a sensor fault) and Real leak + Drift.
Design rules the code follows:
Metrics: accuracy = (TP+TN)/(TP+TN+FP+FN), precision = TP/(TP+FP), recall = TP/(TP+FN), specificity = TN/(TN+FP), FPR = FP/(FP+TN), MAE = mean |reference − estimate|, improvement = (MAE_raw − MAE_corrected)/MAE_raw × 100 (N/A when MAE_raw is 0), detection delay = first detection − fault start in samples (missed detections are counted, not given a delay). Positive class = an instrument fault; Normal and Real leak runs are negatives.
The single-page sensor view still runs with streamlit run sensor_charts.py.
Vercel cannot host a Streamlit server, so index.html runs the app in the browser with
stlite (Streamlit on Pyodide). vercel.json publishes it as a
static site — import the repo in Vercel and deploy with no extra settings. The first load takes a
few seconds while Python loads in the browser.
On the data monitor page (index.html), load the demo data or a file, then use the buttons above
Assessment and suggested actions:
The report covers whatever is currently loaded (the uploaded file, or the demo with its selected scenario, which is listed under Filters applied). It contains a header (title, generation time, time range, data source), an executive summary with sensor counts by trust level, a sensor table (type, location, last reading, last seen, verification status, trust level and score, flags), three charts (sensors by trust level, abnormal readings by type, and reading trends for the flagged or lowest-scoring sensors) and prioritised recommended actions. Every page has a footer with the page number and generation time. Everything is built in the browser; no data is sent anywhere.
| File | Role |
|---|---|
report_data.js | Collects the report data from the analysis (no rendering, no rules) |
report_rules.js | Trust levels and the High / Medium / Low action rules |
report_render.js | Turns report data into a print-optimised HTML page with static SVG charts |
sensors.js | Sensor names, types and locations, shared with the 3D model |
Trust levels (first match from the top): Offline when the last 5% of readings (at least 5) are missing; Untrusted when the detector reports the sensor as faulty; Needs review when it is on watch or at risk; otherwise Trusted. The score shown next to the level is the detector's health score (0–100).
Customising the recommendations: edit report_rules.js. SETTINGS holds the limits (offline
tail, the health score below which a healthy sensor gets a "monitor" note, the missing-data share
that triggers a logging check). ACTION_RULES is an ordered list; each rule has an id, a
priority (High, Medium or Low, possibly depending on the data), a when test that returns the
evidence text or null, and a next step. Rules that share a group are exclusive per sensor
(only the first match is used), so a sensor marked for replacement does not also get a
recalibration action. The rules are deterministic and use no external service.
Tests:
node ml/test_report.js # trust levels, every action rule, aggregation on all labelled recordings, edge cases
node ml/test_report_pdf.js # renders real PDFs with headless Chrome and checks they are valid
node ml/test_report_pdf.js --out sample_report.pdf # also keeps a sample PDF
The PDF smoke test needs Chrome or Chromium (set CHROME_PATH if it is not found); without one it
prints SKIPPED and exits with code 2.
fault_detector.html lets anyone upload sensor readings (Excel or CSV, one column per sensor) and
see which sensors are faulty, with a graph per sensor and recommended fixes. It runs entirely in
the browser (detector.js), so nothing is uploaded to a server.
Each sensor is compared with an ideal healthy run (built into detector.js; users can supply their
own ideal file) and with the other sensors, so a change that moves every sensor together is
reported as a possible real radiation rise rather than a sensor fault. Open
fault_detector.html#demo to see it on demo data.
faultml.js holds six logistic-regression models, trained on labelled recordings in ml/data:
The file name tells the trainer the fault type (drift*.csv, dropout*.csv, noise*.csv, stuck*.csv, spike*.csv;
realleak*_<fault>.csv is a real leak plus that sensor fault; normal_*.csv is healthy). Labelled files need Anomaly_Active and Faulty_Sensor columns (and Real_Leak for leaks), as in the supplied
sets. Retrain after adding recordings:
node ml/train_models.js
This rewrites the model block in faultml.js and the leave-one-file-out results in
ml/model_report.md.