gammapy / gammapy-benchmarks

Performance benchmarks for Gammapy
BSD 3-Clause "New" or "Revised" License
4 stars 14 forks source link

tests with the interpolation method #141

Closed fabiopintore closed 1 year ago

fabiopintore commented 1 year ago

I've updated the notebook with the event sampling tests for energy-dependent sources. I realized that the interpolation method of the MapAxis and that used in interp_by_coord into LightCurveTemplateTemporalModel.evaluate can give wrong estimates of the model. The notebook shows 4 different tests:

The first two cases are those that provides the best results. @adonath @registerrier @AtreyeeS , please have a look at it.

adonath commented 1 year ago

Thanks @fabiopintore! I have not checked the results yet, but my first guess on the interpolation methods would be to use a log scaling for the energy axis, linear for the time axis and log scaling for the values. For the latter see https://github.com/gammapy/gammapy/blob/main/gammapy/maps/region/ndmap.py#L414

If you have not tried this yet, please include it as one of the options.