New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flux maps combination #5161
Flux maps combination #5161
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5161 +/- ##
=======================================
Coverage 94.46% 94.47%
=======================================
Files 235 235
Lines 35493 35566 +73
=======================================
+ Hits 33528 33600 +72
- Misses 1965 1966 +1 ☔ View full report in Codecov by Sentry. |
Hello @QRemy,
|
Yes I had that in mind but first we need to implement the stat_scan option on the ExcessMapEstimator and TSMapEstimator (at least so 2 other PRs). |
From the dev call, let's try to find a more explicit name for the function. It could be possibly an independent function rather than a classmethod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QRemy. This is nice. I have left some inline comments.
A general question is whether applying this to a regular FluxMaps
is safe or not. What use cases does this cover?
There is a merge conflict here. Can you rebase @QRemy ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QRemy ! I have some questions inline, but it is okay from my side
641bfc6
to
540082f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QRemy for the updates! No further comments
540082f
to
42a0536
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QRemy. Looks good to me.
I simply propose to call the function average_flux_maps
as this is more explicit. Joint flux map would rather be applied to flux maps extracted jointly from a group of datasets.Actually maybe stack
is even more clear as this is consistent with typical gammapy semantics.
Maybe |
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
Co-authored-by: Régis Terrier <regis.terrier@m4x.org>
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
Signed-off-by: Quentin Remy <quentin.remy@mpi-hd.mpg.de>
42a0536
to
3f54576
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @QRemy. Looks good!
Create a new
FluxMaps
by combining a list of flux maps with the same geometry.Under the gaussian error approximation the likelihood is given by the gaussian distribution. The product of gaussians is also a gaussian so can derive dnde, dnde_err, and ts for the combined map.