Behaviour of `ExcessMapEstimator`
See original GitHub issueCurrently, the ExcessMapEstimator
behaves differently for MapDataset
and MapDatasetOnOff
.
In the first case, the npred
is taken as the background - ie, the background and the source models are both considered. In the second case, only the counts_off
and the background
are considered, and the counts from the source ignored.
This is quite confusing. We should enforce similar behaviour, and I think that the npred
should be considered in case of MapDatasetOnOff
as well. What do you think @registerrier @adonath ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Unify mask handling in Dataset methods and Estimators #3031
Here is the current behaviour: Dataset methods: ... ExcessMapEstimator : takes mask_safe into account, optionally the mask_fit as well ...
Read more >gammapy vX.Y.Z - assert_quantity_allclose
Assert all-close for astropy.units.Quantity objects. Requires that unit is identical, not just that quantities are allclose taking different units into account.
Read more >The Origin of Galactic TeV Gamma Ray Sources
The behaviour of a power law means the CR flux decreases rapidly as energy ... We utilise the ExcessMapEstimator class which calculates the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we should make things uniform with
SpectrumDatasetOnOff
where we have anpred_sig
that focuses only on the modelnpred
. And then indeed we could modifybackground
so that it returns the background taking into account the model and possibly add annpred
that would returnbackground + npred_sig
.Here is the conclusion / action items how to unify the behaviour:
SpectrumDatasetOnOff.backgroud
andMapDatasetOnOff.background
to return the expected (marginalised) background usingget_wstat_mu_bkg()
MapDatasetOnOff.npred_sig()
and modifyMapDatastOnOff.npred()
to add the background componentI would proposed to add an optional
mu_bkg
argument toWStatCountsStatistic
in a separate PR. I still need to make up my mind about the details…