compute_ts_image¶
-
gammapy.detect.
compute_ts_image
(counts, background, exposure, kernel, mask=None, flux=None, method='root brentq', parallel=True, threshold=None)[source]¶ Compute TS image using different optimization methods.
Parameters: counts :
SkyImage
Counts image.
background :
SkyImage
Background image
exposure :
SkyImage
Exposure image
kernel :
astropy.convolution.Kernel2D
or 2Dndarray
Source model kernel.
flux : float (None)
Flux image used as a starting value for the amplitude fit.
method : str (‘root’)
The following options are available:
'root brentq'
(default)- Fit amplitude finding roots of the the derivative of the fit statistics. Described in Appendix A in Stewart (2009).
'root newton'
- TODO: document
'leastsq iter'
- TODO: document
parallel : bool (True)
Whether to use multiple cores for parallel processing.
threshold : float (None)
If the TS value corresponding to the initial flux estimate is not above this threshold, the optimizing step is omitted to save computing time.
Returns: images :
SkyImageList
Images (ts, niter, amplitude)
Notes
Negative \(TS\) values are defined as following:
\[\begin{split}TS = \left \{ \begin{array}{ll} -TS & : \textnormal{if} \ F < 0 \\ \ \ TS & : \textnormal{else} \end{array} \right.\end{split}\]Where \(F\) is the fitted flux amplitude.
References