Git Product home page Git Product logo

Comments (1)

registerrier avatar registerrier commented on September 25, 2024

The issue most likely comes from the way we compute stacked acceptances.

Reminder, for excess calculation with ON-OFF data:

  • for a single dataset we have $N_{excess}$ and $\alpha$:
    $$N_{excess} = N_{ON} - \alpha N_{OFF} $$
  • with $\alpha = \frac{Acc_{ON}}{Acc_{OFF}}$ the ratio of ON and OFF acceptances
  • to guarantee correct number of excess when stacking one has to compute an $N_{OFF}$-weighted $\alpha$, such that:

$$ \sum_i N_{excess,i} = \sum_i N_{ON,i} - \bar{\alpha} \sum_i{N_{OFF,i}}$$

  • with:
    $$\bar{\alpha} = \frac{\sum_i \alpha_i N_{OFF,i}}{\sum_i N_{OFF,i}}$$

Usage in Gammapy

  • This principle is applied :
    • when stacking ON-OFF datasets
    • when computing the correlated maps in ExcessMapEstimator

A caveat

  • this does not say what to do with the ON and OFF acceptances, in Gammapy we assume that the stacked acceptances are:
    $$\bar{A}cc_{ON} = 1 \quad \text and \quad \bar{A}cc_{OFF} = \frac{1}{\bar{\alpha}}$$
  • This choice is problematic as it removes all information on where the events actually come from
  • We should instead stack $Acc$ to represent the sum of acceptances taking into account the safe mask:

$$ \bar{A}cc_{ON} = \sum_i Acc_{i} \times \epsilon_i $$

  • and
    $$\bar{A}cc_{OFF} = \sum_i Acc_{i}\ \epsilon_i \times \frac{\sum_i N_{OFF,i}}{\sum_i \alpha_i N_{OFF,i}}$$

from gammapy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.