InverseDistribution
This class provides read-only views of tables that relate to the inverse of the Cumulative Density Function (CDF) of a collision process, i.e. energy values of the outgoing photon (\(\nu_f\)). The inverse CDF values are tabulated over an \(m \times n\) grid of values, which depend on the energy of the incoming photons (\(\nu_i\)) and the CDF values (in \((0,1)\)).
Constructor
- class InverseDistribution(*args, **kwargs)
Warning
Inverse CDF views should not be instantiated directly, but only from a
MaterialRecord. Direct instantiation will result in a
TypeError.
Attributes
- InverseDistribution.cdf: numpy.ndarray
The \(n\) CDF values of the collision process, for which the outgoing photon energy (\(\nu_f\)) was pre-computed.
- InverseDistribution.energies: numpy.ndarray
The \(m\) energy values of the incoming photon (\(\nu_i\)), for which the inverse CDF was pre-computed.
- InverseDistribution.material: MaterialRecord
The collision’s target material.
- InverseDistribution.values: numpy.ndarray
The \(n \times m\) table of pre-computed inverse CDF values, i.e. outgoing photon energies (\(\nu_f\)).
- InverseDistribution.weights: numpy.ndarray
The \(n \times m\) table of pre-computed sampling weights, in case of an inverse collision process, or
Noneotherwise.
Methods
- InverseDistribution.__call__(energy, cdf)
Returns interpolated inverse CDF value(s) for the specified incoming energy (\(\nu_i\)) and cdf value(s). The latter can be a
numpy.ndarray.