Fetching the Goodness of FitΒΆ
The Goodness of Fit is evaluated for the target source region using
get_ts_target and
get_goodness_of_fit_stats.
The different Fit Statistic function used for the different types of Datasets input are mentioned in the Gammapy documentation and are:
- cash
Used for dataset containing Poisson data with background model.
- wstat
Used for dataset containing Poisson data with background measurement.
- chi2
Used for FluxPointsDataset read from a file like in a Gammapy example where the pre-computed flux points are used to perform the likelihood fit, when no convolution with IRFs are needed.
get_ts_target uses the above Fit Statistic functions,
to get the test statistic for the best fit and the max fit for the target source
region in the provided joint datasets object.
For more general information follow the Gammapy documentation