exosim.tools.pixelsNonLinearityFromCorrection#
Classes#
This tools helps the user to find the pixel non-linearity coefficients to as inputs for ExoSim, |
Module Contents#
- class PixelsNonLinearityFromCorrection(options_file, output=None, show_results=True)[source]#
Bases:
exosim.tools.pixelsNonLinearity.PixelsNonLinearityThis tools helps the user to find the pixel non-linearity coefficients to as inputs for ExoSim, starting from the measurable pixel non-linearity correction.
In fact, the detector non linearity model, is usually written as polynomial such as
\[Q_{det} = Q \bigtriangleup (1 + \sum_i a_i \cdot Q^i)\]where \(Q_{det}\) is the charge read by the detector, and \(Q\) is the ideal count, as \(Q = \phi_t\), with \(\phi\) being the number of electrons generated and \(t\) being the elapsed time. In the equation above, \(\bigtriangleup\) is the operator used to defined the relation between \(Q_{det}\) and \(Q\), which depends on the definition of the coefficients \(a_i\) (see also equation below).
However, it is usually the inverse operation that is known, as it’s coefficients are measurable empirically:
\[Q ={Q_{det}}\bigtriangledown ( b_1 + \sum_{i=2} b_i \cdot Q_{det}^i)\]Where \(\bigtriangledown\) is the inverse operator of \(\bigtriangleup\). Depending on the way the non linearity is estimated, the operator can either be a division (\(\div\)) or a multiplication (\(\times\)). If not specified, a division is assumed.
The \(b_i\) correction coefficients should be listed in the configuration file using the pnl_coeff keyword in increasing alphabetical order: pnl_coeff_a for \(b_1\), pnl_coeff_b for \(b_2\), pnl_coeff_c for \(b_3\), pnl_coeff_d for \(b_4\), pnl_coeff_e for \(b_5\) and so on. The user can list any number of correction coefficients, and they will be automatically parsed. Please, note that using this notation, \(b_1\) is not forced to be the unity.
This class will restrieve the \(a_i\) coefficients, starting from the the indicated \(b_i\). The results are the coefficients for a 4-th order polynomial:
\[Q_{det} = Q \cdot (a_1 + a_2 \cdot Q + a_3 \cdot Q^2 + a_4 \cdot Q^3 + a_5 \cdot Q^4)\]However, each pixel is different, and therefore, this class also produces a map of the coefficient for each pixel. Each coefficient is normally distributed around the mean value, with a standard deviation indicated in the configuration. If no standard deviation is indicated, the coefficients are assumed to be constant.
The code output is a map of \(a_i\) coefficients for each pixel, which can be injected into
ApplyPixelsNonLinearity.- Variables:
- Parameters:
Examples
>>> import exosim.tools as tools >>> >>> results = tools.PixelsNonLinearityFromCorrection(options_file='tools_input_example.xml', >>> output='output_pnl_map.h5')