srim.analysis

srim.analysis.implant_summary(df)

Summarize per-ion final positions the way SRIM does in the header of RANGE.txt.

The values reproduce srim.output.Range.summary (which SRIM computes from all ions) to within a percent or two; SRIM’s RANGE_3D.txt can lack a few ions.

Parameters:

df (pandas.DataFrame) – needs columns depth_A, y_A and z_A [Ang] (srim.output.Range3D.df)

Returns:

  • n_ions: number of ions

  • mean_depth_A: projected range, mean of depth_A

  • straggle_depth_A: projected straggling, sample standard deviation (ddof=1) of depth_A (nan for one ion)

  • lateral_range_A: mean of (|y| + |z|) / 2

  • lateral_straggle_A: sample standard deviation of the signed y and z values taken together (2N values, ddof=1). Agrees with SRIM’s RANGE.txt header within ~1 % on the reference data; SRIM’s exact formula is undocumented.

  • radial_range_A: mean of r = sqrt(y**2 + z**2)

  • radial_straggle_A: sample standard deviation of r

  • skewness, kurtosis: third and fourth standardized moments of depth_A (population form; kurtosis is 3 for a Gaussian)

Return type:

dict