Metrics for comparing injections of different species (Fe, Ni, Mo, W) without
depending on the absolute scale of each discharge. Used in
notebooks/10W1-10W2/10W2.ipynb.
from aug.analysis.compare import comparison_table, residual_profiles, collapsed_curves, multiline_timing
res = group.analyze_injections()
cmp = comparison_table(res, group) # res.table + métricas nuevas
cmp[cmp.clean].groupby(["species", "regime"])[["curvature", "rise_over_tau", "tau_over_tauE"]].median()
Columns added by comparison_table
| Column | Definition | How to read it |
|---|---|---|
Z |
atomic number (SPECIES_Z) |
|
rise_over_tau |
t_onset_to_peak_ms / tau_imp_ms |
rise relative to decay; the same in every group if only the time scale changes |
tau_A_ms, tau_B_ms |
τ fitted on [0, τ] and [τ, 2.5τ] from the peak, with the offset b fixed |
|
curvature (κ) |
tau_B / tau_A |
1 = pure exponential; < 1 = shoulder (falls faster later); > 1 = slow tail |
tauE_ms |
W_mhd / (P_ECRH + P_NBI + P_OH) |
order of magnitude (no radiation or dW/dt) |
tau_over_tauE |
tau_imp / tau_E |
normalized τ_imp |
dTe_pct, dW_pct |
% change in central Te (ECE) and W_mhd between −100, 0 ms and 30, 120 ms from the onset | cooling caused by the injection |
Other functions
decay_shape(detail): κ of one injection (res.details[(shot, inj)]).segment_tau(tr, z, t0, t1): τ ofA exp(-(t-t0)/τ)over one segment
(offset already subtracted).residual_profiles(res, x_edges): mean residual(y − model)/aof the
single fit per bin ofx = t/τ. Averaged per group, it shows systematic
departures from the exponential shape.collapsed_curves(res, x_grid):(y − b)/avs.x = t/τ. If everything is
exponential, the curves collapse ontoexp(−x).multiline_timing(shot, t_ref, t_onset_core): onset and peak of each line of
the species (SPECIES_LINES, from low to high charge) relative to the onset
of the core line. It measures penetration from the edge (low charge) to the
core (high charge). For W onlyW44_133exists.tau_E_estimate(shot, t_onset),plasma_response(shot, t_onset).
Notes
P_OHis in MW in almost every-rest.txt, and in W for I-mode Mo
#38858/9. Values > 1e3 are taken as W.- The shape metrics only make sense for clean injections (
clean) with a
window ≥ 2.5 τ, so thattau_Bis defined.