Skip to main content

Module dataset

Module dataset 

Source
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 quantity bragg_cross_section_per_atom returns.
  • Every row needs a non-empty method and citation; a row without one is rejected with its line number (see docs/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.
PointResidual
Model-versus-measurement residual at one point.
ResidualSummary
Summary statistics of the relative residuals of a set of points.
SkippedPoint
A point the model could not evaluate, with the model’s error. Such points are not in any statistic.
StoppingDataset
A validated stopping dataset.
StoppingPoint
One measured stopping point.
SystemSummary
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 origin column).
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 format header 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 Material built 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. A CompoundCorrection used with compare must therefore not depend on Material::mass_density; it can identify the compound by Material::name, which is set to the formula as written in the file.

Functions§

compare
Compare model against every point of dataset.