Pixel likelihood calculation¶
ctapipe.image.pixel_likelihood Module¶
Class for calculation of likelihood of a pixel expectation, given the pixel amplitude, the level of noise in the pixel and the photoelectron resolution. This calculation is taken from [denaurois2009].
The likelihood is essentially a poissonian convolved with a gaussian, at low signal a full possonian approach must be adopted, which requires the sum of contibutions over a number of potential contributing photoelectrons (which is slow). At high signal this simplifies to a gaussian approximation.
The full and gaussian approximations are implemented, in addition to a general purpose implementation, which tries to intellegently switch between the two. Speed tests are below:
neg_log_likelihood_approx(image, prediction, spe, ped) 29.8 µs per loop
neg_log_likelihood_numeric(image, prediction, spe, ped) 93.4 µs per loop
neg_log_likelihood(image, prediction, spe, ped) 59.9 µs per loop
TODO:¶
Need to implement more tests, particularly checking for error states
Additional terms may be useful to add to the likelihood
Functions¶

Calculate negative log likelihood for telescope. 

Calculate likelihood of prediction given the measured signal, full numerical integration from [denaurois2009]. 

Safe implementation of the poissonian likelihood implementation, adaptively switches between the full solution and the gaussian approx depending on the prediction. 

Calculation of the mean likelihood for a give expectation value of pixel intensity in the gaussian approximation. 

Calculation of the mean likelihood for a give expectation value of pixel intensity using the full numerical integration. 

Simple chisquared statistic from Le Bohec et al 2008 