gammapy / gammapy

A Python package for gamma-ray astronomy
https://gammapy.org
BSD 3-Clause "New" or "Revised" License
223 stars 193 forks source link

A generalised 1D model #5377

Open AtreyeeS opened 1 month ago

AtreyeeS commented 1 month ago

During the last coding sprint, @cgalelli and I tried to implement a generalised 1D model to

  1. Avoid code duplication between temporal and spectral models
  2. Enable an easy API for fitting other parameters, eg, phase, frequency, etc

I have an example notebook here: https://github.com/AtreyeeS/test_notebooks/blob/master/general_model.ipynb (there is some ugly jugglery in the integral function, but there should be more elegant solutions with bumpy)

I think this works, and we might consider implementing it for 2.0

MRegeard commented 1 month ago

Thank you @AtreyeeS and @cgalelli, I had something similar in mind and did a prototype to fit phases. We definitely want this for 2.0 and you can count me in to help implement it.