# GURU — `guru-mc-fit` Manual (EN)

Purpose. Estimate the impact state (u, P) by matching:
- Screen (target) line through origin: P = s·u, with s = C·D·rho0 or C·D/V0
  (D — shock speed measured in the flyer, rho0 or V0 — initial density/specific
  volume; C — unit conversion; P in kbar, speeds in km/s).
- Flyer Hugoniot P_flyer(U) with U = w − u. Uncertainty in w rigidly shifts the
  whole flyer curve along U.

Monte‑Carlo samples s and w (and optionally curve fit via bootstrap/jackknife),
and performs a two‑level choice: model (file) then phase (inside model), with a
union policy that keeps in‑domain intersections and picks the largest margin to
edges.

Synopsis
```bash
guru-mc-fit -i HUG1.tsv [-i HUG2.tsv ...] \
  --w W --sigma-w dW \
  --D D --sigma-D dD --rho0 R0 [--sigma-rho0 dR0] [--V0 V0 --sigma-V0 dV0] \
  [--degree 1|2|3] [--resample none|bootstrap|jackknife] \
  [--model-choice random|weighted|fixed] [--model-probs p1 ...] \
  [--phase-choice union|random|weighted|fixed] [--phase-id ID] \
  [--samples N] [--U-tol-frac f] \
  [--plot] [--plot-prefix PREFIX] \
  [--out-samples samples.tsv] [--out-stats stats.tsv]
```

Notes
- Screen line (P = s·u) represents the experimental target; flyer curve P(U)
  is computed and shifted by U = w − u. Legends reflect this naming: “screen
  line (mean)”, “flyer fit”.
- Union over phases: scan all phases in the chosen model, keep intersections
  inside each phase’s U‑domain (with padding f·span), pick the one with the
  largest margin to edges.

Outputs
- Console: ok draws, mean/std/95%CI for P and u.
- TSV: samples (optional), stats (optional).
- Plots: histograms for P and u; P–u cloud and zoom.

