reboost.math package¶
Submodules¶
reboost.math.functions module¶
- reboost.math.functions.piecewise_linear_activeness(distances, fccd_in_mm, dlf)¶
Piecewise linear HPGe activeness model.
Based on:
\[\begin{split}f(d) = \begin{cases} 0 & \text{if } d < f*l, \\ \frac{x-f*l}{f - f*l} & \text{if } t \leq d < f, \\ 1 & \text{otherwise.} \end{cases}\end{split}\]Where:
d: Distance to surface,
l: Dead layer fraction, the fraction of the FCCD which is fully inactive
f: Full charge collection depth (FCCD).
In addition, any distance of np.nan (for example if the calculation was not performed for some steps) is assigned an activeness of one.
- Parameters:
- Returns:
a
VectorOfVectorsorArrayof the activeness- Return type:
Array
- reboost.math.functions.vectorised_active_energy(distances, edep, fccd, dlf)¶
Energy after piecewise linear HPGe activeness model vectorised over FCCD or dead layer fraction.
Based on the same linear activeness function as
piecewise_linear_activeness(). However, this function vectorises the calculation to provide a range of output energies varying the fccd or dead layer fraction. Either fccd or dlf can be a list. This adds an extra dimension to the output, with the same length as the input fccd or dlf list.- Parameters:
distances (Array) – the distance from each step to the detector surface. Can be either a awkward array, or a LGDO VectorOfVectors . The computation is performed for each element and the first dimension is preserved, a new dimension is added vectorising over the FCCD or DLF.
edep (Array) – the energy for each step.
dlf (float | list) – the fraction of the FCCD which is fully inactive, can be a list.
- Returns:
Activeness for each set of parameters
- Return type:
reboost.math.stats module¶
- reboost.math.stats.apply_energy_resolution(energies, channels, tcm_tables, reso_pars, reso_func)¶
Apply the energy resolution sampling to an array with many channels.
- reboost.math.stats.gaussian_sample(mu, sigma, *, seed=None)¶
Generate samples from a gaussian.
Based on:
\[y_i \sim \mathcal{N}(\mu_i,\sigma_i)\]where $y_i$ is the output, $x_i$ the input (mu) and $sigma$ is the standard deviation for each point.
- reboost.math.stats.get_resolution(energies, channels, tcm_tables, reso_pars, reso_func)¶
Get the resolution for each energy.