Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Docs example how to translate model? #9

@cdeil

Description

@cdeil

@nocturnalastro - First of all - thank you for this Sherpa - Astropy bridge!

I presume you have some machinery to translate between Sherpa and Astropy models?

The current docs only talk about SpectrumFitter and never about the model on the Sherpa side?
http://saba.readthedocs.io/en/latest/index.html

Could you write up some info (maybe with a code example) how this works?
I.e. show the attributes and structure of the models on each side with an example and explain how the (fully auto?) translation works?

Some background: In Gammapy we currently have a mix of models that are Astropy, Sherpa and independent, and some code to translate to Sherpa to fit them, e.g. here:
https://github.com/gammapy/gammapy/blob/master/gammapy/spectrum/models.py#L246
It's a bit of a mess and the implementation isn't good.
One option would be that we implement all models using Astropy (mainly because it's a core dependency of Gammapy, not everyone has Sherpa) and use your bridge for fitting with Sherpa.

I plan to look at what you've built here and try it out in the coming days / weeks.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions