Prior#
- class gammapy.modeling.models.Prior(**kwargs)[source]#
Bases:
ModelBase
Prior base class.
Attributes Summary
Frozen status of a model, True if all parameters are frozen.
Prior parameters as a
PriorParameters
object.Weight mulitplied to the prior when evaluated.
Methods Summary
__call__
(value)Call evaluate method.
copy
(**kwargs)Deep copy.
freeze
()Freeze all parameters.
from_dict
(data, **kwargs)Get prior parameters from dictionary.
from_parameters
(parameters, **kwargs)Create model from parameter list.
reassign
(datasets_names, new_datasets_names)Reassign a model from one dataset to another.
to_dict
([full_output])Create dictionary for YAML serialisation.
unfreeze
()Restore parameters frozen status to default.
Attributes Documentation
- covariance#
- default_parameters = <gammapy.modeling.parameter.Parameters object>#
- frozen#
Frozen status of a model, True if all parameters are frozen.
- parameters#
Prior parameters as a
PriorParameters
object.
- parameters_unique_names#
- type#
- weight#
Weight mulitplied to the prior when evaluated.
Methods Documentation
- copy(**kwargs)#
Deep copy.
- freeze()#
Freeze all parameters.
- classmethod from_parameters(parameters, **kwargs)#
Create model from parameter list.
- Parameters:
- parameters
Parameters
Parameters for init.
- parameters
- Returns:
- model
Model
Model instance.
- model
- reassign(datasets_names, new_datasets_names)#
Reassign a model from one dataset to another.
- Parameters:
- datasets_namesstr or list
Name of the datasets where the model is currently defined.
- new_datasets_namesstr or list
Name of the datasets where the model should be defined instead. If multiple names are given the two list must have the save length, as the reassignment is element-wise.
- Returns:
- model
Model
Reassigned model.
- model
- unfreeze()#
Restore parameters frozen status to default.