Commit Graph

3 Commits

Author SHA1 Message Date
dw.jang eb25c01c97 docs(tools): align_analyze.py 이관 + CH3 flicker fix Python replay 검증 결과
- tools/align_analyze.py 신규: AlignGuide4Stage 상태머신 Python 재현
  - `--both` 모드로 NEW (majority + relaxed + soft-hint) vs LEGACY (연속 3 hit)
    로직 병행 replay 지원
  - Kotlin AlignmentConstants (V_WIN/V_MAJ/L_WIN/L_MAJ/STUCK/SOFT) 값 그대로 매핑
- tools/README.md: align_analyze.py 사용법 + 파라미터 매핑 표 + data123/
  4 세션 검증 결과 표 (Phantom / Human 0·1·3 CM) 정리
- tools/labdb_upload.py 신규 추가 (기존 문서만 있고 실체 미커밋 상태였음)
- VesiScan_Android_Pipeline_Summary.md v7 patch (2026-07-13):
  align_analyze.py 도구 언급 + CH3 flicker fix 실측 검증 결과 요약

검증 결과 요약 (data123/ human 4 세션):
- Human 0CM (CH3 31.8%): LEGACY 즉시 회귀 → NEW flick 1/4 흡수 유지
- Human 1CM (CH3 77.3%): LEGACY idx15 oscillation → NEW idx13 조기 진입
- Human 3CM (CH3 97.2%): 양쪽 정상 (회귀 없음)
- Phantom: 양쪽 정상 (relaxed mode 오진입 없음)
2026-07-13 15:21:07 +09:00
dw.jang 60b630d3de docs: v7 (2026-07-10) 반영 — msp 제거, 6-stage alignment, mtb queue fix, labdb 자동 재시도
이번 세션 대량 변경 사항을 5개 문서에 반영. 각 문서마다 stale 이던
섹션을 갱신하거나 신규 섹션 추가.

USER_GUIDE.md
  - Sensor Alignment 를 V1 (3-stage) / V2 (6-stage) 로 재구성
  - V2 6-stage 표 + relaxed mode / soft hint 설명
  - GREEN 진입 5초 hold + 10-strike 리셋 완화 명시
  - "최적의 위치입니다!" 문구 반영

docs/BLE_PROTOCOL_REFERENCE.md
  - msp 명령 취소선 처리 + mim 신규 명령 문서화
  - Watchdog timeout 25초 연장 명시 (2.5)
  - §2.6 신규: firmware VBTFW0121 mls mode 0 freeze 취약점 +
    앱 측 3-layer 회피 (isMtbBusy / mtb 3초 timeout / 자동 재연결)

VesiScan_Android_Pipeline_Summary.md
  - v7 (2026-07-10) 섹션 신규 추가 — BLE / Alignment / UI / labdb /
    tools 5개 카테고리로 변경 사항 정리
  - 권장 펌웨어 표기 VBTFW0116 → VBTFW0120+ 로 갱신

labdb.md
  - §12b 신규: 앱 측 Auto Retry Policy — endMeasurement 자동 업로드
    조건 완화, LabdbAutoRetry object, UI 배너, 재시도 안전성

tools/README.md
  - labdb_upload.py 섹션 신규 — 사용법 / 폴더 구조 / 재실행 안전성 /
    buildPayload 로직 / 활용 예 정리

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-10 11:25:26 +09:00
dw.jang 252692417a tools: analyze_csv.py — App CSV → Python pipeline 비교/검증 CLI
App 측정 시 자동 저장되는 CSV (Downloads/VesiScan_ADC/*.csv) 를
appshare for_app_share / vesiscan_test.library.method_d 로 재계산해
다음을 비교/시각화하는 영구 분석 툴.

4 modes:
  1. Basic compare: App BV vs Python BV (mean/std/bias/CV)
  2. Ablation: 5 algorithm config (DPS, lr floor 등) 개별 영향
  3. Plot: BV timeseries / app↔py scatter / lr_ratio histogram
  4. Cycle inspect: 특정 scan_id 의 raw → walls → BV detail

설계 의도:
  - 알고리즘 변경 후 회귀 자동 검증
  - 임상 측정 정확도 (catheter ground truth) 비교
  - device-to-device variance 분석
  - lr_ratio 분포로 phantom vs human anatomy 패턴 차이 확인

appshare 경로 자동 탐색 + APPSHARE_DIR env var 지원.

검증: phantom 150 mL CSV (2547 scans) 로 smoke test 통과.
  APP mean=147.6 (-1.6%), Python NEW mean=93.0 (-38%, lr=0.67)
  → ablation 으로 lr_ratio 가 차이의 주범 확인.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-30 17:49:28 +09:00