gammapy_plugin.utils package¶
Submodules¶
gammapy_plugin.utils.astromodels_functions module¶
- class gammapy_plugin.utils.astromodels_functions.Exp_cutoff_powerlaw_gammapy(**kwargs)[source]¶
Bases:
Function1Ddescription :
A exp cutoff function.
- latex :
$Kleft(frac{x}{piv}right)^{-index}exp{-(lambda x)^alpha}$
parameters :
- K :
desc : Normalization initial value : 1e-11 is_normalization : True transformation : log10 min : 1e-30 max : 1e5
- piv :
desc : Pivot (keep this fixed) initial value : 1 fix : yes
- index :
desc : index initial value : 2.0
- lambda_ :
desc : curvature (= 1/xc) initial value : 0.1
- alpha :
desc : alpha initial value : 1 fix : yes
- static info()¶
- class gammapy_plugin.utils.astromodels_functions.Log_parabola_gammapy(**kwargs)[source]¶
Bases:
Function1Ddescription :
A log-parabolic function, same parametrization as Gammapy
- latex :
$Kleft(frac{x}{piv}right)^{-alpha-betalog{left(frac{x}{piv}right)}}$
parameters :
- K :
desc : Normalization initial value : 1e-11 is_normalization : True transformation : log10 min : 1e-30 max : 1e5
- piv :
desc : Pivot (keep this fixed) initial value : 1 fix : yes
alpha :
desc : index initial value : 2.0
beta :
desc : curvature initial value : 1.0
- static info()¶
gammapy_plugin.utils.gammapy_parser module¶
- gammapy_plugin.utils.gammapy_parser.parameter_to_gammapy_dict(para)[source]¶
Converts a astromodel parameter to a dict able to be read in as a gammapy parameter.
- Parameters:
para (Parameter) – astromodel paramter
- Returns:
dict
- Return type:
dict
- gammapy_plugin.utils.gammapy_parser.parse_gammapy_model(gp_model, dataset_name='empty')[source]¶
Returns dict of astromodels parameters with all parameters from the passed gammapy model.
- Parameters:
gp_model (ModelBase) – gammapy model
dataset_name (str) – name of the dataset the model is associated to defaults to empty
- Return type:
dict