Expand description
Per-pair multiplicative correction of an electronic-stopping model, fitted to measured points, with a bootstrap uncertainty and held-out residuals.
A Correction wraps a base ElectronicStopping model and multiplies
its stopping cross section by a smooth factor g(E) for one ion–target
pair. The factor is
g(E) = exp( sum_{k=0}^{d} c_k T_k(x) ), x = (2 ln E - ln E_lo - ln E_hi) / (ln E_hi - ln E_lo)where T_k are Chebyshev polynomials of the first kind (J. C. Mason and
D. C. Handscomb, Chebyshev Polynomials, CRC Press (2003), ch. 2) and
[E_lo, E_hi] is the energy span of the training points. The exponential
keeps g positive. The coefficients minimise
sum_i w_i (ln(S_i / B_i) - sum_k c_k T_k(x_i))^2, where S_i is the
measured stopping, B_i the base model at the same point and
w_i = 1 / (sigma_i / S_i)^2 when every training point states an
uncertainty sigma_i > 0, otherwise w_i = 1. The normal equations are
solved by Gaussian elimination with partial pivoting (G. H. Golub and
C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins (2013),
sec. 3.4 and 4.2). The form of the correction (a low-order polynomial of
ln E for the log of the ratio) is our own choice; no published fit is
reproduced.
§Where the correction applies
Only inside [E_lo, E_hi] of the training points, and only for the ion
(Z and mass) and target element it was fitted to. Anywhere else
Correction::stopping returns the base model unchanged, because a
polynomial extrapolated beyond its data has no physical basis.
§Uncertainty
The nonparametric bootstrap of B. Efron, Ann. Statist. 7, 1 (1979): the
training points are resampled with replacement replicates times, the
correction is refitted to each resample, and the pointwise band at energy
E is the central interval of g_b(E) over the replicates (linear
interpolation between order statistics). A resample whose fit is singular
(for example fewer distinct energies than coefficients) is discarded and
counted in CorrectionFit::failed_replicates. The band covers the
scatter of the points about the fitted form; it does not include any
systematic error of the measurement or any bias of the polynomial form.
If the measured points carry no stated uncertainty (sigma 0, as in tables
read off a smoothed curve), the band says nothing about measurement error.
§Reproducibility
The held-out split uses the stream (seed, 0) of crate::rng::stream
and replicate b uses (seed, b + 1). Replicates run on the current rayon
pool and are collected in index order; every sum is sequential, so the
result is bit-identical for a given seed whatever the thread count.
§Held-out points
A deterministic, seeded subset of the interior points (never the lowest and
highest energy, so they stay inside the fitted span) is left out of the fit.
CorrectionFit::held_out_report gives the residuals of the base model and
of the corrected model on exactly those points, side by side, whether or not
the correction helps.
Structs§
- Correction
- An
ElectronicStoppingmodel multiplied by a fittedCorrectionFit. - Correction
Fit - A fitted correction: coefficients, bootstrap replicates and the split.
- FitSettings
- Settings of
fit_correction. - Held
OutPoint - One held-out point with the base and corrected model values.
- Held
OutReport - Residuals of the base and the corrected model on the held-out points.
- Residual
Stats - Statistics of
model - measuredover a set of points.
Constants§
- CORRECTED_
MODEL_ NAME - Name returned by
Correction::name.
Functions§
- fit_
correction - Fit a
Correctionofbaseto a single-system element-target dataset.