LogParabola2SpectralModel#
- class gammapy.modeling.models.LogParabola2SpectralModel[source]#
Bases:
SpectralModelSpectral log parabola model defined such as the energy scale of the exponent and the reference energy can be different.
For more information see Log parabola 2 spectral model.
- Parameters:
See also
Attributes Summary
A model parameter.
A model parameter.
A model parameter.
Spectral energy distribution peak energy (
Quantity).A model parameter.
A model parameter.
Methods Summary
evaluate(energy, amplitude, reference, ...)Evaluate the model (static function).
from_log10(amplitude, reference, alpha, ...)Construct from \(log_{10}\) parametrization.
Attributes Documentation
- alpha#
A model parameter.
Note that the parameter value has been split into a factor and scale like this:
value = factor x scale
Users should interact with the
value,quantityorminandmaxproperties and consider the fact that there is afactorandscalean implementation detail.That was introduced for numerical stability in parameter and error estimation methods, only in the Gammapy optimiser interface do we interact with the
factor,factor_minandfactor_maxproperties, i.e. the optimiser “sees” the well-scaled problem.- Parameters:
- namestr
Name.
- valuefloat or
Quantity Value.
- scalefloat, optional
Scale (sometimes used in fitting).
- unit
Unitor str, optional Unit. Default is “”.
- minfloat, str or
quantity, optional Minimum (sometimes used in fitting). If
None, set tonumpy.nan. Default is None.- maxfloat, str or
quantity, optional Maximum (sometimes used in fitting). Default is
numpy.nan.- frozenbool, optional
Frozen (used in fitting). Default is False.
- errorfloat, optional
Parameter error. Default is 0.
- scan_minfloat, optional
Minimum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_maxfloat, optional
Maximum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_n_values: int, optional
Number of values to be used for the parameter scan. Default is 11.
- scan_n_sigmaint, optional
Number of sigmas to scan. Default is 2.
- scan_values: `numpy.array`, optional
Scan values. Overwrites all the scan keywords before. Default is None.
- scale_method{‘scale10’, ‘factor1’, None}, optional
Method used to set
factorandscale. Default is “scale10”.- interp{“lin”, “sqrt”, “log”}, optional
Parameter scaling to use for the scan. Default is “lin”.
- prior
Prior, optional Prior set on the parameter. Default is None.
- amplitude#
A model parameter.
Note that the parameter value has been split into a factor and scale like this:
value = factor x scale
Users should interact with the
value,quantityorminandmaxproperties and consider the fact that there is afactorandscalean implementation detail.That was introduced for numerical stability in parameter and error estimation methods, only in the Gammapy optimiser interface do we interact with the
factor,factor_minandfactor_maxproperties, i.e. the optimiser “sees” the well-scaled problem.- Parameters:
- namestr
Name.
- valuefloat or
Quantity Value.
- scalefloat, optional
Scale (sometimes used in fitting).
- unit
Unitor str, optional Unit. Default is “”.
- minfloat, str or
quantity, optional Minimum (sometimes used in fitting). If
None, set tonumpy.nan. Default is None.- maxfloat, str or
quantity, optional Maximum (sometimes used in fitting). Default is
numpy.nan.- frozenbool, optional
Frozen (used in fitting). Default is False.
- errorfloat, optional
Parameter error. Default is 0.
- scan_minfloat, optional
Minimum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_maxfloat, optional
Maximum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_n_values: int, optional
Number of values to be used for the parameter scan. Default is 11.
- scan_n_sigmaint, optional
Number of sigmas to scan. Default is 2.
- scan_values: `numpy.array`, optional
Scan values. Overwrites all the scan keywords before. Default is None.
- scale_method{‘scale10’, ‘factor1’, None}, optional
Method used to set
factorandscale. Default is “scale10”.- interp{“lin”, “sqrt”, “log”}, optional
Parameter scaling to use for the scan. Default is “lin”.
- prior
Prior, optional Prior set on the parameter. Default is None.
- beta#
A model parameter.
Note that the parameter value has been split into a factor and scale like this:
value = factor x scale
Users should interact with the
value,quantityorminandmaxproperties and consider the fact that there is afactorandscalean implementation detail.That was introduced for numerical stability in parameter and error estimation methods, only in the Gammapy optimiser interface do we interact with the
factor,factor_minandfactor_maxproperties, i.e. the optimiser “sees” the well-scaled problem.- Parameters:
- namestr
Name.
- valuefloat or
Quantity Value.
- scalefloat, optional
Scale (sometimes used in fitting).
- unit
Unitor str, optional Unit. Default is “”.
- minfloat, str or
quantity, optional Minimum (sometimes used in fitting). If
None, set tonumpy.nan. Default is None.- maxfloat, str or
quantity, optional Maximum (sometimes used in fitting). Default is
numpy.nan.- frozenbool, optional
Frozen (used in fitting). Default is False.
- errorfloat, optional
Parameter error. Default is 0.
- scan_minfloat, optional
Minimum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_maxfloat, optional
Maximum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_n_values: int, optional
Number of values to be used for the parameter scan. Default is 11.
- scan_n_sigmaint, optional
Number of sigmas to scan. Default is 2.
- scan_values: `numpy.array`, optional
Scan values. Overwrites all the scan keywords before. Default is None.
- scale_method{‘scale10’, ‘factor1’, None}, optional
Method used to set
factorandscale. Default is “scale10”.- interp{“lin”, “sqrt”, “log”}, optional
Parameter scaling to use for the scan. Default is “lin”.
- prior
Prior, optional Prior set on the parameter. Default is None.
- default_parameters = <gammapy.modeling.parameter.Parameters object>#
- e_peak#
Spectral energy distribution peak energy (
Quantity).This is the peak in E^2 x dN/dE and is given by:
\[E_{Peak} = E_{0} \exp{ (2 - \alpha) / (2 * \beta)}\]
- escale#
A model parameter.
Note that the parameter value has been split into a factor and scale like this:
value = factor x scale
Users should interact with the
value,quantityorminandmaxproperties and consider the fact that there is afactorandscalean implementation detail.That was introduced for numerical stability in parameter and error estimation methods, only in the Gammapy optimiser interface do we interact with the
factor,factor_minandfactor_maxproperties, i.e. the optimiser “sees” the well-scaled problem.- Parameters:
- namestr
Name.
- valuefloat or
Quantity Value.
- scalefloat, optional
Scale (sometimes used in fitting).
- unit
Unitor str, optional Unit. Default is “”.
- minfloat, str or
quantity, optional Minimum (sometimes used in fitting). If
None, set tonumpy.nan. Default is None.- maxfloat, str or
quantity, optional Maximum (sometimes used in fitting). Default is
numpy.nan.- frozenbool, optional
Frozen (used in fitting). Default is False.
- errorfloat, optional
Parameter error. Default is 0.
- scan_minfloat, optional
Minimum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_maxfloat, optional
Maximum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_n_values: int, optional
Number of values to be used for the parameter scan. Default is 11.
- scan_n_sigmaint, optional
Number of sigmas to scan. Default is 2.
- scan_values: `numpy.array`, optional
Scan values. Overwrites all the scan keywords before. Default is None.
- scale_method{‘scale10’, ‘factor1’, None}, optional
Method used to set
factorandscale. Default is “scale10”.- interp{“lin”, “sqrt”, “log”}, optional
Parameter scaling to use for the scan. Default is “lin”.
- prior
Prior, optional Prior set on the parameter. Default is None.
- reference#
A model parameter.
Note that the parameter value has been split into a factor and scale like this:
value = factor x scale
Users should interact with the
value,quantityorminandmaxproperties and consider the fact that there is afactorandscalean implementation detail.That was introduced for numerical stability in parameter and error estimation methods, only in the Gammapy optimiser interface do we interact with the
factor,factor_minandfactor_maxproperties, i.e. the optimiser “sees” the well-scaled problem.- Parameters:
- namestr
Name.
- valuefloat or
Quantity Value.
- scalefloat, optional
Scale (sometimes used in fitting).
- unit
Unitor str, optional Unit. Default is “”.
- minfloat, str or
quantity, optional Minimum (sometimes used in fitting). If
None, set tonumpy.nan. Default is None.- maxfloat, str or
quantity, optional Maximum (sometimes used in fitting). Default is
numpy.nan.- frozenbool, optional
Frozen (used in fitting). Default is False.
- errorfloat, optional
Parameter error. Default is 0.
- scan_minfloat, optional
Minimum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_maxfloat, optional
Maximum value for the parameter scan. Overwrites scan_n_sigma. Default is None.
- scan_n_values: int, optional
Number of values to be used for the parameter scan. Default is 11.
- scan_n_sigmaint, optional
Number of sigmas to scan. Default is 2.
- scan_values: `numpy.array`, optional
Scan values. Overwrites all the scan keywords before. Default is None.
- scale_method{‘scale10’, ‘factor1’, None}, optional
Method used to set
factorandscale. Default is “scale10”.- interp{“lin”, “sqrt”, “log”}, optional
Parameter scaling to use for the scan. Default is “lin”.
- prior
Prior, optional Prior set on the parameter. Default is None.
- tag = ['LogParabola2SpectralModel', 'lp2']#
Methods Documentation
- static evaluate(energy, amplitude, reference, alpha, beta, escale)[source]#
Evaluate the model (static function).
- classmethod from_log10(amplitude, reference, alpha, beta, escale)[source]#
Construct from \(log_{10}\) parametrization.
- __init__(**kwargs)#
- classmethod __new__(*args, **kwargs)#