Skip to content
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

Calculate sensitivity from event lists #29

Closed
maxnoe opened this issue Sep 11, 2020 · 6 comments · Fixed by #36
Closed

Calculate sensitivity from event lists #29

maxnoe opened this issue Sep 11, 2020 · 6 comments · Fixed by #36

Comments

@maxnoe
Copy link
Member

maxnoe commented Sep 11, 2020

I think it is required to calculate sensitivities from event lists, not from the IRFs, otherwise conditions on the number of events are not applicable.

This also directly rules out usage of the gammapy SensitivityEstimator.

@vuillaut
Copy link
Member

The condition can be satisfied prior to compute the IRFs (I think it is the case now).

@kosack
Copy link

kosack commented Sep 16, 2020

Can you explain what you mean by "calculating sensitivity from an event list"? Do you mean without binning it or generating an IRF? The only requirement is that the method used is the "CTA Official" one, which so far uses aperture photometry (meaning a theta^2 cut), rather than a likelihood, but that can be done from binned quantities, so no event list needed.

you only need a few inputs to make a sensitivity curve after you've optimized cuts, etc:

  • For each particle in ['gammas', 'electrons', 'protons']:
    1. a histogram of thrown events per energy (and other parameters if needed)
    2. a histogram of detected events (after cuts, including an angular cut) per energy
    3. an energy migration matrix (E_true to E_reco)
    4. a model spectrum for that particle species (e.g. the Fermi Electron spectrum if the species is 'electrons', or the CR spectrum for 'protons')

With that info, you can produce effective areas, and sensitivities.

That means the inputs are: binned spectra, E_migration + (not used here, but still necessary) PSF
And the outputs are A_eff for gammas + sensitivity.

@maxnoe
Copy link
Member Author

maxnoe commented Sep 16, 2020

you only need a few inputs to make a sensitivity curve after you've optimized cuts, etc

But you optimize the cuts for the best sensitivity, so you have to calculate it during cuts optimization.
The event lists are needed to create the histograms on the fly during the cut optimization and then in the end for the set of optimal cuts.

an energy migration matrix (E_true to E_reco)

For what is the energy migration matrix needed in the sensitivity? It does not enter anywhere afaik.

@kosack
Copy link

kosack commented Sep 21, 2020

Yes, but isn't that what is already done? Currently the code starts with event lists, optimizes and applies cuts, makes histograms, and then computes sensitivity. That should be broken into steps, and I think the sensitivity part only needs to work on histograms (the first steps of course need the event list). There is also the CTools method of computing sensitivity which does it by simulating event lists, but I guess that's not what you mean here? (http://cta.irap.omp.eu/ctools/users/reference_manual/cssens.html)

@maxnoe
Copy link
Member Author

maxnoe commented Sep 21, 2020

No, the actual sensitivity was calculated from the IRFS using a gammapy function.

Acutally, both was done, during the cut optimization, the sensitivity was calculated from the event lists / histograms. But the final sensitivity was calculated using this Guesstimator from gammapy that only uses IRFs as input.

@maxnoe
Copy link
Member Author

maxnoe commented Sep 25, 2020

Fixed in #36

@HealthyPear HealthyPear linked a pull request Sep 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants