Open zblz opened 9 years ago
@zblz – now that Sherpa is open, we'll start using it heavily in Gammapy.
@kingj90 will work on gammapy.spectrum
... we should try to find a way to avoid duplicating spectral model classes and functionality in gammapy
and naima
.
@cdeil - definitely, we should not duplicate this. I did a few enhancements on the sherpa models in naima so that they are easier to code (base classes for each particle distribution and then a subclass for emission process) but this is not meant to be exposed to the user. I was not planning on developing this further than the thin wrappers in place in the near future, so if you have a plan for a better sherpa model framework we could use that with the naima models as well.
@joleroi, @adonath and I were discussing this briefly today. I think a factory function or some other Sherpa model generator would be nice. If it's more that 20 lines of code / significant effort, one should first look at https://saba.readthedocs.io/ That was a GSoC project and had input from both Astropy and Sherpa devs. I haven't looked in detail what they do or if it's suitable for our needs.
From the radiative and functional models, create a sherpa model automagically, e.g.:
All parameter fields, etc, should be populated programatically from the given models.