neg_log_likelihood#
- ctapipe.image.pixel_likelihood.neg_log_likelihood(image, prediction, spe_width, pedestal, prediction_safety=20.0)[source]#
 Safe implementation of the poissonian likelihood implementation, adaptively switches between the full solution and the gaussian approx depending on the prediction. Prediction safety parameter determines cross over point between the two solutions.
- Parameters:
 - image: ndarray
 Pixel amplitudes from image (\(s\)).
- prediction: ndarray
 Predicted pixel amplitudes from model (\(μ\)).
- spe_width: ndarray
 Width of single p.e. peak (\(σ_γ\)).
- pedestal: ndarray
 Width of pedestal (\(σ_p\)).
- prediction_safety: float
 Decision point to choose between poissonian likelihood and gaussian approximation.
- Returns:
 - ndarray