ThetaCalculatorScipy¶
-
class
gammapy.image.models.
ThetaCalculatorScipy
(dist, theta_max, normalize=False)[source]¶ Bases:
object
Same functionality as NumericalThetaCalculator, but uses
scipy.integrate.quad
andscipy.optimize.fsolve
instead.Notes: It is more precise than ThetaCalculator and doesn’t require you to think about which theta binning and range gives your desired precision. If you have to compute many thetas this can be quite slow because it is a root finding with nested integration.
Parameters: dist : callable
Probability distribution (probability per theta ^ 2)
theta_max : float
Integration range will be 0 .. theta_max ^ 2
normalize : bool
Normalize discretized distribution to 1?
Methods Summary
containment_fraction
(theta)containment_radius
(containment_fraction)Compute containment angle using the containment_fraction method plus numerical root finding. Methods Documentation