cta-observatory / pyirf

Python IRF builder
https://pyirf.readthedocs.io/en/stable/
MIT License
15 stars 25 forks source link

energy_dispersion_to_migration doesn't produce a matrix as if starting directly from the events #272

Open HealthyPear opened 9 months ago

HealthyPear commented 9 months ago

When calling energy_dispersion_to_migration on a normalized energy dispersion histogram (right) I get a different result than building the migration matrix directly from the data (center)

the right plot is a crosscheck with gammapy to_edisp_kernel, but in that case, one needs to choose a FoV offset angle (in this case I put 0 deg), but the first 2 plots have all offsets.

image

One culprit seems to be at least the fact that this function was not updated after #268

I suggest also improving the current units test to compare the 2 histograms.

maxnoe commented 9 months ago

I think this will be due to the energy_dispersion_to_migration function not being updated after the recent fix for the edisp normalization, see #250