From 1b54437bdd124aa03ab19a8468ec82b1a4225bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Terrier?= Date: Mon, 18 Nov 2024 11:10:56 +0100 Subject: [PATCH] Backport PR #5576: Add `UniformPrior` and `GaussianPrior` in `gammapy.modeling.models __all__` --- gammapy/modeling/models/__init__.py | 3 +++ gammapy/modeling/models/prior.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gammapy/modeling/models/__init__.py b/gammapy/modeling/models/__init__.py index 7aebf58f91..560bfcc153 100644 --- a/gammapy/modeling/models/__init__.py +++ b/gammapy/modeling/models/__init__.py @@ -1,5 +1,6 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst """Built-in models in Gammapy.""" + from gammapy.utils.registry import Registry from .core import DatasetModels, Model, ModelBase, Models from .cube import ( @@ -109,6 +110,8 @@ "PowerLawSpectralModel", "PowerLawTemporalModel", "Prior", + "GaussianPrior", + "UniformPrior", "scale_plot_flux", "ScaleSpectralModel", "Shell2SpatialModel", diff --git a/gammapy/modeling/models/prior.py b/gammapy/modeling/models/prior.py index 3cbf3b56c4..5e94cc7bd5 100644 --- a/gammapy/modeling/models/prior.py +++ b/gammapy/modeling/models/prior.py @@ -1,12 +1,13 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst """Priors for Gammapy.""" + import logging import numpy as np import astropy.units as u from gammapy.modeling import PriorParameter, PriorParameters from .core import ModelBase -__all__ = ["GaussianPrior", "UniformPrior"] +__all__ = ["GaussianPrior", "UniformPrior", "Prior"] log = logging.getLogger(__name__)