DistributionFunction

This class provides read-only views of tables that relate to the Cumulative Distribution Function (CDF) of a collision process. The CDF values are tabulated over an \(m \times n\) grid of values, which depend on the energies of the incoming and outgoing photons, \(\nu_i\) and \(\nu_f\), respectively. To map the support of \(\nu_f\) onto \((0,1)\), a logarithmic mapping is used, as the support depends on the incoming energy \(\nu_i\) (see the x attribute below).

Constructor

class DistributionFunction(*args, **kwargs)

Warning

Distribution function views should not be instantiated directly, but only from a MaterialRecord. Direct instantiation will result in a TypeError.

Attributes

DistributionFunction.energies_in: numpy.ndarray

The \(m\) energy values of the incoming photon (\(\nu_i\)), for which the CDF was pre-computed.

DistributionFunction.material: MaterialRecord

The collision’s target material.

DistributionFunction.process: str

A description of the interaction process.

DistributionFunction.values: numpy.ndarray

The \(n \times m\) table of pre-computed CDF values.

DistributionFunction.x: numpy.ndarray

The \(n\) mapped values for the energy \(\nu_f\) of the outgoing photon, given as

\[x = \frac{\ln(\nu_f/\nu_\text{min})}{\ln(\nu_\text{max}/\nu_\text{min})},\]

where \((\nu_\text{min}, \nu_\text{max})\) is the DCS support, depending on \(\nu_i\). See the energies_out() method below for the converse mapping.

Methods

DistributionFunction.__call__(energy_in, energy_out)

Returns interpolated CDF value(s) for energy_in (\(\nu_i\)) and energy_out (\(\nu_f\)). The latter can be specified as a numpy.ndarray.

DistributionFunction.energies_out(index)

Returns the \(m\) values of the outgoing photon energy (\(\nu_f\)) corresponding to the specified index for the incoming photon energy (\(\nu_i\)).