Wednesday, Nov 25th 16h30
- Remove
BackgroundModel
and handle the case withSkyModel(spatial_model=TemplateSpatialModel(), apply_irf={"edisp": False, "psf": False, "exposure": False})
The problem is, that the latter case is possibly anyway, but untestedt and it's unclear whether it already works. - Rename to e.g.
DataModel
, but then the caseSkyModel(spatial_model=TemplateSpatialModel(), apply_irf={"edisp": False, "psf": False, "exposure": False})
m should probably be forbidden...
- Right now we rely on
.npred_background()
inMapDataset.to_image()
,MapDataset.to_spectrum_dataset()
etc, This is non ideal, as it requires redefining and re-setting model parameters, e.g. https://github.com/gammapy/gammapy/blob/master/gammapy/estimators/flux.py#L164 - There are a few possible options:
- Rely on
.background
instead and reset the model as a whole - Rely on
.background
and copy (?) over the model, while adpating the dataset name for theFoVBackgroundModel
- Rely on
.npred_background
and reset theFoVBackgroundModel
?
- Rely on
- Methods like
Model.select_region()
,Models.to_template_spatial_model(geom=)
, could be useful and are simple to implement...