Expand description
Stopping datasets: measured S_e points with a citation on every point, and
the comparison of an ElectronicStopping model against them.
The format is specified in docs/stopping-data-format.md. In short: a
#-prefixed key: value header, one CSV header row with the units in the
column names, then one point per line:
# format: lindhard-stopping-data/1
# name: example
# description: free text
ion_z,ion_mass_amu,target,energy_ev,s_e_ev_1e15_cm2,sigma_ev_1e15_cm2,method,citation
5,,Si,1.0e4,12.5,0.3,transmission,"Author, Journal vol, page (year), Table N"
5,11.009,SiO2,2.0e4,10.1,0.2,backscattering,"Author, Journal vol, page (year)"- Stopping and its uncertainty are cross sections per target atom in
eV·10⁻¹⁵ cm² (the unit of
to_ev_1e15_cm2). For a compound target the value is per average atom (per molecule divided by the number of atoms in the formula), the quantitybragg_cross_section_per_atomreturns. - Every row needs a non-empty
methodandcitation; a row without one is rejected with its line number (seedocs/data-provenance.md: data without an origin is not admitted). - The parser is a small hand-written CSV reader: comma-separated fields,
double quotes around a field that contains a comma,
""for a literal quote inside one. Quoted fields do not span lines.
No measurement is shipped with this module. Which published data may enter
the tree is decided in issue #34; the one real dataset so far is in
validation/data/stopping/. Tests here use synthetic points generated from
this repository’s own models.
Every result is a pure function of the model and the dataset, computed in dataset order with sequential summation, so it is bitwise reproducible whatever the thread count of the caller.
Structs§
- Comparison
- Result of
compare. - Point
Residual - Model-versus-measurement residual at one point.
- Residual
Summary - Summary statistics of the relative residuals of a set of points.
- Skipped
Point - A point the model could not evaluate, with the model’s error. Such points are not in any statistic.
- Stopping
Dataset - A validated stopping dataset.
- Stopping
Point - One measured stopping point.
- System
Summary - Statistics for one ion–target system: same ion Z, same ion mass, same target as written.
Enums§
- Origin
- Where a point came from, when the file says so (the optional
origincolumn). - Target
- The target of a point: one element, or a compound given by its formula.
Constants§
- COLUMNS
- The column header row, in order. The units are part of the names
(
_ev,_amu,_ev_1e15_cm2) so a file in another unit cannot be read silently. - FORMAT_
VERSION - Value of the
formatheader key this loader reads. - OPTIONAL_
COLUMNS - The two optional trailing columns. They are accepted together or not at all.
- PLACEHOLDER_
DENSITY_ KG_ M3 - Mass density given to the
Materialbuilt for a compound target, kg/m³. It is a placeholder: under Bragg’s rule (W. H. Bragg and R. Kleeman, Phil. Mag. 10, 318 (1905)) the stopping cross section per atom does not depend on the density, and a dataset does not record one. ACompoundCorrectionused withcomparemust therefore not depend onMaterial::mass_density; it can identify the compound byMaterial::name, which is set to the formula as written in the file.
Functions§
- compare
- Compare
modelagainst every point ofdataset.