open-gamma-ray-astro / gamma-astro-data-formats

Data formats for gamma-ray astronomy
https://gamma-astro-data-formats.readthedocs.io
Creative Commons Attribution 4.0 International
29 stars 27 forks source link

Remove effective area as function of reco energy, fixes #137 #140

Closed maxnoe closed 4 years ago

maxnoe commented 4 years ago

This removes all mentions of effective area as a function of reconstructed energy as this is not possible to calculate.

The assumption of unity energy migration can of course still be done, but that changes nothing concerning the fact that effective area can only ever be expressed in bins of true, simulated energy.

It also gives a bit more context on what effective area actually means.

lmohrmann commented 4 years ago

This looks like a pretty reasonable request to me.

Maybe just to be sure: @adonath @registerrier - I think the effective area as a function of reconstructed energy (if present in AEFF FITS files) is never used in Gammapy. Can you confirm this?

registerrier commented 4 years ago

Indeed, effective area is always defined as a function of true energy in gammapy.

maxnoe commented 4 years ago

ctools is also pretty clear on this here: http://cta.irap.omp.eu/ctools/users/user_manual/irf_cta.html

In that notation, E' is reconstructed energy and E is true energy.

Pinging @jknodlseder

maxnoe commented 4 years ago

The instrument response functions provide a mathematical description that links the measured quantities of an event to the physical quantities of the incident photon.

This!

adonath commented 4 years ago

@MaxNoe No objections from my side, seems pretty clear and uncontroversial. I'm not sure what the motivation for this specification was in first place...maybe @TarekHC still knows?

Probably we should also adapt the example fits file and corresponding script? https://github.com/open-gamma-ray-astro/gamma-astro-data-formats/blob/master/source/irfs/full_enclosure/aeff/create_example_file.py

Internally in Gammapy we always use effective area in true energy and handle the case of no energy dispersion matrix equivalent to the unity one, exactly as you suggested in your initial post.

maxnoe commented 4 years ago

I thought I checked the example file and it only contained aeff vs true energy. Hmm, let me check again.

maxnoe commented 4 years ago

You are right, I'll update the examples

GernotMaier commented 4 years ago

I think this comes from the more classical codes which used instead of forward- or unfolding the simple correction method for energy reconstruction. This method uses A(E_rec), which is accurate enough for most applications.

maxnoe commented 4 years ago

This method uses A(E_rec)

I don't understand how you can properly define an effective area in versus estimated energy. How would that work?

GernotMaier commented 4 years ago

This is a method commonly called 'method of correction factors' in statistics books.

The correction factors are determined by MC in kind of exactly the same way we calculate effective areas: count the simulated events per bin (in true energy) and count the reconstructed events per bin (in reconstructed energy). This way the spillover from bin-to-bin is taken into account.

Of course it is jargon to call this A(E_rec).