GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GOptimizerPar Class Reference

Optimizer parameter class. More...

#include <GOptimizerPar.hpp>

Inheritance diagram for GOptimizerPar:
GBase GModelPar

Public Member Functions

 GOptimizerPar (void)
 Void constructor. More...
 
 GOptimizerPar (const std::string &name, const double &value)
 Parameter constructor. More...
 
 GOptimizerPar (const std::string &name, const double &factor, const double &scale)
 Parameter constructor. More...
 
 GOptimizerPar (const GOptimizerPar &par)
 Copy constructor. More...
 
virtual ~GOptimizerPar (void)
 Destructor. More...
 
GOptimizerParoperator= (const GOptimizerPar &par)
 Assignment operator. More...
 
double value (void) const
 Return parameter value. More...
 
double error (void) const
 Return parameter error. More...
 
double gradient (void) const
 Return parameter gradient. More...
 
double min (void) const
 Return parameter minimum boundary. More...
 
double max (void) const
 Return parameter maximum boundary. More...
 
void value (const double &value)
 Set parameter value. More...
 
void error (const double &error)
 Set parameter error. More...
 
void gradient (const double &gradient)
 Set parameter gradient. More...
 
void min (const double &min)
 Set minimum parameter boundary. More...
 
void max (const double &max)
 Set maximum parameter boundary. More...
 
void range (const double &min, const double &max)
 Set minimum and maximum parameter boundaries. More...
 
const double & factor_value (void) const
 Return parameter factor value. More...
 
const double & factor_error (void) const
 Return parameter factor error. More...
 
const double & factor_gradient (void) const
 Return parameter factor gradient. More...
 
const double & factor_min (void) const
 Return parameter minimum factor boundary. More...
 
const double & factor_max (void) const
 Return parameter maximum factor boundary. More...
 
const double & scale (void) const
 Return parameter scale. More...
 
void factor_value (const double &value)
 Set parameter value factor. More...
 
void factor_error (const double &error)
 Set parameter factor error. More...
 
void factor_gradient (const double &gradient) const
 Set parameter factor gradient. More...
 
void factor_min (const double &min)
 Set minimum parameter boundary factor. More...
 
void factor_max (const double &max)
 Set maximum parameter boundary factor. More...
 
void factor_range (const double &min, const double &max)
 Set minimum and maximum parameter boundary factors. More...
 
void scale (const double &scale)
 Set scale factor. More...
 
bool has_min (void) const
 Signal if parameter has minimum boundary. More...
 
bool has_max (void) const
 Signal if parameter has maximum boundary. More...
 
bool has_factor_min (void) const
 Signal if parameter has minimum factor boundary. More...
 
bool has_factor_max (void) const
 Signal if parameter has maximum factor boundary. More...
 
bool has_range (void) const
 Signal if parameter has minimum and maximum boundaries. More...
 
void remove_min (void)
 Removes minimum boundary. More...
 
void remove_max (void)
 Removes maximum boundary. More...
 
void remove_factor_min (void)
 Removes minimum factor boundary. More...
 
void remove_factor_max (void)
 Removes maximum factor boundary. More...
 
void remove_range (void)
 Removes minimum and maximum boundary. More...
 
bool is_free (void) const
 Signal if parameter is free. More...
 
bool is_fixed (void) const
 Signal if parameter is fixed. More...
 
bool has_grad (void) const
 Signal if parameter gradient is computed analytically. More...
 
void free (void)
 Free a parameter. More...
 
void fix (void)
 Fix a parameter. More...
 
void has_grad (const bool &grad)
 Set gradient property. More...
 
void clear (void)
 Clear parameter. More...
 
GOptimizerParclone (void) const
 Clone parameter. More...
 
std::string classname (void) const
 Return class name. More...
 
const std::string & name (void) const
 Return parameter name. More...
 
const std::string & unit (void) const
 Return parameter unit. More...
 
void name (const std::string &name)
 Set parameter name. More...
 
void unit (const std::string &unit)
 Set parameter unit. More...
 
void autoscale (void)
 Autoscale parameter. More...
 
std::string print (const GChatter &chatter=NORMAL) const
 Print parameter information. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GOptimizerPar &par)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

std::string m_name
 Parameter name. More...
 
std::string m_unit
 Parameter unit. More...
 
double m_factor_value
 Parameter factor value. More...
 
double m_factor_error
 Uncertainty in parameter factor value. More...
 
double m_factor_min
 Parameter minimum factor value. More...
 
double m_factor_max
 Parameter maximum factor value. More...
 
double m_factor_gradient
 Function factor gradient. More...
 
double m_scale
 Parameter scaling (true = factor * scale) More...
 
bool m_free
 Parameter is free. More...
 
bool m_has_factor_min
 Parameter has minimum factor boundary. More...
 
bool m_has_factor_max
 Parameter has maximum factor boundary. More...
 
bool m_has_grad
 Parameter has analytic gradient. More...
 

Detailed Description

Optimizer parameter class.

This class implements a function parameter for the optimizer. A function parameter is a numerical value that is used to describe a function.

A function parameter has the following attributes:

  • value gives the numerical value of the parameter
  • error gives the statistical uncertainty in the parameter value
  • gradient gives the gradient of a function with respect to the parameter
  • min gives the minimum value that the parameter can take
  • max gives the maximum value that the parameter can take

The parameter attributes are set and retrieved using the value(), error(), gradient(), min() and max() methods, respectively. Furthermore, the range() method is used to simultaneously set the minimum and maximum value of a parameter.

The minimum and maximum values are optional, and existence of these attributes is tested using the has_min() and has_max() methods, respectively. The minimum value, maximum value are removed using the remove_min() and remove_max() methods. Simultaneous removal of minimum and maximum values is done using the remove_range() method.

Each parameter has furthermore the following properties:

  • free specifies whether the parameter should be fitted
  • grad specifies whether the parameter gradient is computed analytically (true) or numerically (false)

The parameter property free is set using the free() and fix() methods and it is retrieved using the is_free() and is_fixed() methods. The attribute grad is set and retrieved using the has has_grad() methods.

Each function parameter is factorized into a factor and a scale term. The GOptimizerPar class stores the factors and the scale factor has data members, and the true values are computed using the following relations:

value    = m_factor_value    * m_scale
error    = m_factor_error    * m_scale
gradient = m_factor_gradient * m_scale
min      = m_factor_min      * m_scale for m_scale > 0
           m_factor_max      * m_scale otherwise
max      = m_factor_max      * m_scale for m_scale > 0
           m_factor_min      * m_scale otherwise

The factor and scale terms can be set and retrieved using the factor_value(), factor_error(), factor_gradient(), factor_min(), factor_max() and scale() methods.

Definition at line 91 of file GOptimizerPar.hpp.

Constructor & Destructor Documentation

GOptimizerPar::GOptimizerPar ( void  )

Void constructor.

Definition at line 61 of file GOptimizerPar.cpp.

References init_members().

Referenced by clone().

GOptimizerPar::GOptimizerPar ( const std::string &  name,
const double &  value 
)

Parameter constructor.

Parameters
[in]nameParameter name.
[in]valueParameter value.

Constructs a parameter from a parameter name and a parameter value.

The parameter is auto-scaled, which for a value that differs from zero sets the scale factor to value and the factor_value to unity. For a value of zero, the scale factor will be set to unity and the factor_value will be set to value.

Definition at line 84 of file GOptimizerPar.cpp.

References init_members(), m_factor_value, m_name, m_scale, name(), and value().

GOptimizerPar::GOptimizerPar ( const std::string &  name,
const double &  factor,
const double &  scale 
)

Parameter constructor.

Parameters
[in]nameParameter name.
[in]factorParameter value factor.
[in]scaleParameter scaling (non-zero value).
Exceptions
GException::invalid_argumentSacle factor of 0 specified.

Constructs a parameter from a parameter name, value factor and scale factor. The scale factor needs to be a non-zero value. If the scale factor is zero, an exception is thrown.

Definition at line 121 of file GOptimizerPar.cpp.

References G_CONSTRUCT, init_members(), m_factor_value, m_name, m_scale, name(), and scale().

GOptimizerPar::GOptimizerPar ( const GOptimizerPar par)

Copy constructor.

Parameters
[in]parFunction parameter.

Definition at line 150 of file GOptimizerPar.cpp.

References copy_members(), and init_members().

GOptimizerPar::~GOptimizerPar ( void  )
virtual

Destructor.

Definition at line 166 of file GOptimizerPar.cpp.

References free_members().

Member Function Documentation

void GOptimizerPar::autoscale ( void  )

Autoscale parameter.

Sets the value factor to unity and the scale factor to the real value of the parameter. The method will also adjust the error factor and gradient factor, as well as the minimum and maximum factors if they exist.

The method does nothing if the actual value factor is zero.

Definition at line 566 of file GOptimizerPar.cpp.

References scale(), and value().

Referenced by GModelSky::eflux_error(), and GModelSky::flux_error().

std::string GOptimizerPar::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GOptimizerPar").

Implements GBase.

Definition at line 192 of file GOptimizerPar.hpp.

void GOptimizerPar::clear ( void  )
virtual

Clear parameter.

Resets parameter to a clean initial state.

Implements GBase.

Definition at line 220 of file GOptimizerPar.cpp.

References free_members(), and init_members().

Referenced by GModelSpectralTablePar::init_members(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GModelTemporalLightCurve::init_members(), GModelSpatialRadialRing::init_members(), GCTAModelRadialProfile::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GCTAModelSkyCube::init_members(), GModelSpatialRadial::init_members(), GModelSpatialDiffuseMap::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), and GSPIModelDataSpace::setup_pars().

GOptimizerPar * GOptimizerPar::clone ( void  ) const
virtual

Clone parameter.

Returns
Pointer to deep copy of parameter.

Implements GBase.

Definition at line 238 of file GOptimizerPar.cpp.

References GOptimizerPar().

Referenced by GOptimizerPars::append(), GOptimizerPars::insert(), and GOptimizerPars::set().

void GOptimizerPar::copy_members ( const GOptimizerPar par)
protected

Copy class members.

Parameters
[in]parModel parameter.

Definition at line 684 of file GOptimizerPar.cpp.

References m_factor_error, m_factor_gradient, m_factor_max, m_factor_min, m_factor_value, m_free, m_has_factor_max, m_has_factor_min, m_has_grad, m_name, m_scale, and m_unit.

Referenced by GOptimizerPar(), and operator=().

double GOptimizerPar::error ( void  ) const
inline

Return parameter error.

Returns
Parameter error.

Returns the parameter error. The parameter error is computed by multiplying the error factor by the scale factor. By definition, the error is a positive number, hence the method returns the absolute value of the internally computed error.

Definition at line 224 of file GOptimizerPar.hpp.

References abs(), m_factor_error, and m_scale.

Referenced by factor_error(), and print().

void GOptimizerPar::error ( const double &  error)

Set parameter error.

Parameters
[in]errorParameter error.

Sets the parameter error. The method stores the error factor which is obtained by dividing the error by the scale factor.

Definition at line 275 of file GOptimizerPar.cpp.

References factor_error(), and m_scale.

const double & GOptimizerPar::factor_error ( void  ) const
inline

Return parameter factor error.

Returns
Parameter factor error.

Returns the parameter factor error.

Definition at line 298 of file GOptimizerPar.hpp.

References m_factor_error.

Referenced by GModelSky::eflux_error(), error(), and GModelSky::flux_error().

void GOptimizerPar::factor_error ( const double &  error)
inline

Set parameter factor error.

Parameters
[in]errorParameter factor error.

Sets the parameter factor error.

Definition at line 385 of file GOptimizerPar.hpp.

References error(), and m_factor_error.

void GOptimizerPar::factor_gradient ( const double &  gradient) const
inline

Set parameter factor gradient.

Parameters
[in]gradientParameter factor gradient.

Sets the parameter factor gradient.

Definition at line 400 of file GOptimizerPar.hpp.

References gradient(), and m_factor_gradient.

const double & GOptimizerPar::factor_max ( void  ) const
inline

Return parameter maximum factor boundary.

Returns
Maximum parameter factor boundary.

Returns the maximum parameter factor boundary.

Definition at line 340 of file GOptimizerPar.hpp.

References m_factor_max.

Referenced by GModelSky::eflux_error(), factor_range(), factor_value(), GModelSky::flux_error(), GObservation::model_grad(), GObservation::npred_grad(), GModelPar::read(), and GModelPar::write().

void GOptimizerPar::factor_max ( const double &  max)

Set maximum parameter boundary factor.

Parameters
[in]maxMaximum parameter boundary factor.
Exceptions
GException::invalid_argumentMaximum parameter boundary factor smaller than value factor.

Sets the maximum boundary factor of the parameter. The method makes sure that the maximum is not smaller than the actual value factor. Otherwise, an exception is thrown.

Definition at line 460 of file GOptimizerPar.cpp.

References G_FACTOR_VALUE, m_factor_max, m_factor_value, m_has_factor_max, max(), and gammalib::str().

const double & GOptimizerPar::factor_min ( void  ) const
inline

Return parameter minimum factor boundary.

Returns
Minimum parameter factor boundary.

Returns the minimum parameter factor boundary.

Definition at line 326 of file GOptimizerPar.hpp.

References m_factor_min.

Referenced by GModelSky::eflux_error(), factor_range(), factor_value(), GModelSky::flux_error(), GObservation::model_grad(), GObservation::npred_grad(), GModelPar::read(), and GModelPar::write().

void GOptimizerPar::factor_min ( const double &  min)

Set minimum parameter boundary factor.

Parameters
[in]minMinimum parameter boundary factor.
Exceptions
GException::invalid_argumentMinimum parameter boundary factor larger than value factor.

Sets the minimum boundary factor of the parameter. The method makes sure that the minimum is not larger than the actual value factor. Otherwise, an exception is thrown.

Definition at line 429 of file GOptimizerPar.cpp.

References G_FACTOR_VALUE, m_factor_min, m_factor_value, m_has_factor_min, min(), and gammalib::str().

void GOptimizerPar::factor_range ( const double &  min,
const double &  max 
)

Set minimum and maximum parameter boundary factors.

Parameters
[in]minMinimum parameter boundary factor.
[in]maxMaximum parameter boundary factor.

Sets the minimum and maximum parameter boundary factors. The method calls the factor_min() and factor_max() methods which perform validity checking of the arguments.

Definition at line 489 of file GOptimizerPar.cpp.

References factor_max(), and factor_min().

Referenced by GModelSpectralTable::load_par().

void GOptimizerPar::factor_value ( const double &  value)

Set parameter value factor.

Parameters
[in]valueValue factor.
Exceptions
GException::invalid_argumentParameter value outside [min,max] boundaries.

Sets the value factor of the parameter. The method makes sure that none of the boundaries is violated. Otherwise, exceptions are thrown.

Definition at line 389 of file GOptimizerPar.cpp.

References factor_max(), factor_min(), G_FACTOR_VALUE, has_factor_max(), has_factor_min(), m_factor_value, gammalib::str(), and value().

void GOptimizerPar::fix ( void  )
inline
void GOptimizerPar::free ( void  )
inline

Free a parameter.

Frees a parameter for optimization. The parameter shall be fitted in a parameter optimization process.

Definition at line 614 of file GOptimizerPar.hpp.

References m_free.

Referenced by GModelSpectralBins::append(), GModelSpectralNodes::append(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GCTAModelRadialProfile::init_members(), GModelSpatialRadialRing::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GModelSpatialElliptical::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralBins::insert(), GModelSpectralNodes::insert(), GModelSpectralTable::load_par(), GModelSpatialComposite::read(), GModelPar::read(), and GSPIModelDataSpace::setup_pars().

void GOptimizerPar::free_members ( void  )
protected

Delete class members.

Definition at line 708 of file GOptimizerPar.cpp.

Referenced by clear(), operator=(), and ~GOptimizerPar().

double GOptimizerPar::gradient ( void  ) const
inline

Return parameter gradient.

Returns
Parameter gradient.

Returns the parameter gradient. The parameter gradient is computed by dividing the gradient factor by the scale factor. The method returns zero in case that the scale factor is zero.

Definition at line 240 of file GOptimizerPar.hpp.

References m_factor_gradient, and m_scale.

Referenced by GModelSpatialComposite::append(), GCTAModelSpatialGaussSpectrum::eval(), GCTAModelSpatialMultiplicative::eval(), GModelSpectralMultiplicative::eval(), GModelSpectralExponential::eval(), factor_gradient(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GModelTemporalLightCurve::init_members(), GCTAModelRadialProfile::init_members(), GModelSpatialRadialRing::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GModelSpatialRadial::init_members(), GCTAModelSkyCube::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialDiffuseMap::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), and GSPIModelDataSpace::setup_pars().

void GOptimizerPar::gradient ( const double &  gradient)

Set parameter gradient.

Parameters
[in]gradientParameter gradient.

Sets the parameter gradient. The method stores the gradient factor which is obtained by multiplying gradient by the scale factor.

Definition at line 294 of file GOptimizerPar.cpp.

References factor_gradient(), and m_scale.

bool GOptimizerPar::has_factor_max ( void  ) const
inline

Signal if parameter has maximum factor boundary.

Returns
True if parameter has maximum factor boundary, false otherwise.

Signals if the parameter has a maximum factor boundary.

Definition at line 457 of file GOptimizerPar.hpp.

References m_has_factor_max.

Referenced by factor_value(), and GModelPar::write().

bool GOptimizerPar::has_factor_min ( void  ) const
inline

Signal if parameter has minimum factor boundary.

Returns
True if parameter has minimum factor boundary, false otherwise.

Signals if the parameter has a minimum factor boundary.

Definition at line 443 of file GOptimizerPar.hpp.

References m_has_factor_min.

Referenced by factor_value(), and GModelPar::write().

bool GOptimizerPar::has_grad ( void  ) const
inline

Signal if parameter gradient is computed analytically.

Returns
True if parameter is gradient is computed analytically, false otherwise.

Signals if the parameter gradient is computed analytically. This property is used in the function optimization process to identify parameters for which gradients need to be computed numerically.

Definition at line 601 of file GOptimizerPar.hpp.

References m_has_grad.

Referenced by GModelSpatialComposite::append(), GModelSpectralBins::append(), GModelSpectralNodes::append(), GResponse::convolve(), GResponse::edisp_kerns::edisp_kerns(), GModelData::eval(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GCTAModelRadialProfile::init_members(), GModelTemporalLightCurve::init_members(), GModelSpatialRadialRing::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GModelSpatialRadial::init_members(), GCTAModelSkyCube::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialDiffuseMap::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralBins::insert(), GModelSpectralNodes::insert(), GCTAResponseCube::irf_radial(), GModelSpectralTable::load_par(), GCOMModelDRBPhibarNodes::read(), GCOMModelDRBPhibarBins::read(), GModelSpectralNodes::read(), GModel::read_scales(), GSPIModelDataSpace::setup_pars(), GModelSky::signal_analytical_gradients(), and GResponse::size_edisp_vector().

void GOptimizerPar::has_grad ( const bool &  grad)
inline

Set gradient property.

Parameters
[in]gradGradient flag

Sets the gradient property of the parameter. If grad is set to true, the parameter gradient will be computed analytically by the method that evaluates the function. If false, the gradients needs to be computed numerically.

Definition at line 646 of file GOptimizerPar.hpp.

References m_has_grad.

bool GOptimizerPar::has_max ( void  ) const
inline

Signal if parameter has maximum boundary.

Returns
True if parameter has maximum boundary, false otherwise.

Signals if the parameter has a maximum boundary.

Definition at line 429 of file GOptimizerPar.hpp.

References m_has_factor_max, m_has_factor_min, and m_scale.

Referenced by GModelSpectralTable::create_par_table(), GModelSky::eflux_error(), GModelSky::flux_error(), GObservation::model_grad(), GObservation::npred_grad(), print(), and GModelPar::read().

bool GOptimizerPar::has_min ( void  ) const
inline

Signal if parameter has minimum boundary.

Returns
True if parameter has minimum boundary, false otherwise.

Signals if the parameter has a minimum boundary.

Definition at line 415 of file GOptimizerPar.hpp.

References m_has_factor_max, m_has_factor_min, and m_scale.

Referenced by GModelSpectralTable::create_par_table(), GModelSky::eflux_error(), GModelSky::flux_error(), GObservation::model_grad(), GObservation::npred_grad(), print(), and GModelPar::read().

bool GOptimizerPar::has_range ( void  ) const
inline

Signal if parameter has minimum and maximum boundaries.

Returns
True if parameter has minimum and maximum boundaries, false otherwise.

Signals if the parameter has a minimum and a maximum boundary.

Definition at line 472 of file GOptimizerPar.hpp.

References m_has_factor_max, and m_has_factor_min.

void GOptimizerPar::init_members ( void  )
protected
bool GOptimizerPar::is_fixed ( void  ) const
inline

Signal if parameter is fixed.

Returns
True if parameter is fixed, false otherwise.

Signals if the parameter is fixed, i.e. that it shall NOT be fitted in a parameter optimization process.

Definition at line 584 of file GOptimizerPar.hpp.

References m_free.

Referenced by GModelSpectralTable::create_par_table(), and GObservations::likelihood::hessian().

bool GOptimizerPar::is_free ( void  ) const
inline

Signal if parameter is free.

Returns
True if parameter is free, false otherwise.

Signals if the parameter is free, i.e. that it shall be fitted in a parameter optimization process.

Definition at line 569 of file GOptimizerPar.hpp.

References m_free.

Referenced by GResponse::convolve(), GResponse::edisp_kerns::edisp_kerns(), GModelSky::eflux_error(), GModelSpatialDiffuseConst::eval(), GCOMModelDRM::eval(), GModelSpatialRadialGauss::eval(), GModelSpatialDiffuseMap::eval(), GModelTemporalConst::eval(), GModelSpectralBins::eval(), GModelSpectralConst::eval(), GModelSpectralTable::eval(), GCTAModelSkyCube::eval(), GSPIModelDataSpace::eval(), GModelSpectralFunc::eval(), GCTAModelSpatialLookup::eval(), GModelTemporalLightCurve::eval(), GModelSpectralGauss::eval(), GModelSpatialDiffuseCube::eval(), GModelSpectralPlaw::eval(), GModelData::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralLogParabola::eval(), GModelSpectralBrokenPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralPlawPhotonFlux::eval(), GModelSpectralPlawEnergyFlux::eval(), GModelTemporalPhaseCurve::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GResponse::eval_prob(), GResponse::eval_probs(), GModelSky::flux_error(), GObservation::has_gradient(), GCTAResponseCube::irf_radial(), GObservation::model(), GObservation::model_grad(), GCTAOnOffObservation::N_bgd(), GCTAOnOffObservation::N_gamma(), GObservation::npred_grad(), GModelSky::signal_analytical_gradients(), GResponse::size_edisp_vector(), and GModelPar::write().

double GOptimizerPar::max ( void  ) const
inline
void GOptimizerPar::max ( const double &  max)

Set maximum parameter boundary.

Parameters
[in]maxMaximum parameter boundary.
Exceptions
GException::invalid_argumentMaximum parameter boundary is smaller than the parameter value

Sets the maximum parameter boundary.

Definition at line 351 of file GOptimizerPar.cpp.

References G_MAX, m_factor_max, m_factor_min, m_has_factor_max, m_has_factor_min, m_scale, gammalib::str(), and value().

void GOptimizerPar::min ( const double &  min)

Set minimum parameter boundary.

Parameters
[in]minMinimum parameter boundary.
Exceptions
GException::invalid_argumentMinimum parameter boundary is larger than the parameter value

Sets the minimum parameter boundary.

Definition at line 314 of file GOptimizerPar.cpp.

References G_MIN, m_factor_max, m_factor_min, m_has_factor_max, m_has_factor_min, m_scale, gammalib::str(), and value().

const std::string & GOptimizerPar::name ( void  ) const
inline

Return parameter name.

Returns
Parameter name.

Returns the parameter name.

Definition at line 661 of file GOptimizerPar.hpp.

References m_name.

Referenced by GModelSpectralTablePars::append(), GCTAModelSpatialMultiplicative::append(), GModelSpatialComposite::append(), GModelSpectralComposite::append(), GModelSpectralMultiplicative::append(), GModelSpectralBins::append(), GModelSpectralNodes::append(), GObservation::computed_gradient(), GResponse::convolve(), GModelSpectralTable::create_par_table(), GResponse::edisp_kerns::edisp_kerns(), GModelSpectralTable::energy_scale(), GModelSpectralTable::eval(), GResponse::eval_prob(), GResponse::eval_probs(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialEllipticalDisk::GModelSpatialEllipticalDisk(), GModelSpatialEllipticalGauss::GModelSpatialEllipticalGauss(), GModelSpatialEllipticalGeneralGauss::GModelSpatialEllipticalGeneralGauss(), GModelSpatialPointSource::GModelSpatialPointSource(), GModelSpatialRadialDisk::GModelSpatialRadialDisk(), GModelSpatialRadialGauss::GModelSpatialRadialGauss(), GModelSpatialRadialGeneralGauss::GModelSpatialRadialGeneralGauss(), GModelSpatialRadialRing::GModelSpatialRadialRing(), GModelSpatialRadialShell::GModelSpatialRadialShell(), GModelSpectralBrokenPlaw::GModelSpectralBrokenPlaw(), GModelSpectralConst::GModelSpectralConst(), GModelSpectralExpInvPlaw::GModelSpectralExpInvPlaw(), GModelSpectralExpPlaw::GModelSpectralExpPlaw(), GModelSpectralLogParabola::GModelSpectralLogParabola(), GModelSpectralPlaw::GModelSpectralPlaw(), GModelSpectralPlawEnergyFlux::GModelSpectralPlawEnergyFlux(), GModelSpectralPlawPhotonFlux::GModelSpectralPlawPhotonFlux(), GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw(), GModelSpectralSuperExpPlaw::GModelSpectralSuperExpPlaw(), GOptimizerPar(), GObservation::has_gradient(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GCTAModelRadialProfile::init_members(), GModelSpatialRadialRing::init_members(), GModelTemporalLightCurve::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GCTAModelSkyCube::init_members(), GModelSpatialRadial::init_members(), GModelSpatialDiffuseMap::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralTablePars::insert(), GModelSpectralBins::insert(), GModelSpectralNodes::insert(), GModelSpatialRadial::is_celestial(), GModelSpatialPointSource::is_celestial(), GModelSpatialElliptical::is_celestial(), GObservation::model(), GCTAOnOffObservation::N_gamma(), name(), GModelSpectralTablePar::print(), print(), GModelSpatialRadialProfileGauss::read(), GCOMModelDRM::read(), GCTAModelSpatialGradient::read(), GModelSpatialDiffuseConst::read(), GCOMModelDRBPhibarBins::read(), GCOMModelDRBPhibarNodes::read(), GModelTemporalConst::read(), GCTAModelRadialGauss::read(), GCTAModelRadialPolynom::read(), GModelSpatialRadialGauss::read(), GCTAModelRadialProfile::read(), GModelSpatialRadialDisk::read(), GModelSpatialRadialGeneralGauss::read(), GModelSpectralBins::read(), GModelTemporalLightCurve::read(), GModelSpatialRadialRing::read(), GCTAModelSpatialLookup::read(), GModelSpatialEllipticalDisk::read(), GModelSpectralTable::read(), GModelSpectralConst::read(), GModelSpatialEllipticalGauss::read(), GModelSpatialEllipticalGeneralGauss::read(), GModelSpatialElliptical::read(), GModelSpectralFunc::read(), GModelSpectralGauss::read(), GModelSpectralPlaw::read(), GModelSpatialRadialShell::read(), GModelSpectralExpPlaw::read(), GModelSpectralLogParabola::read(), GModelSpectralBrokenPlaw::read(), GModelSpectralSuperExpPlaw::read(), GModelSpectralExpInvPlaw::read(), GModelTemporalPhaseCurve::read(), GModelSpectralPlawEnergyFlux::read(), GModelSpectralPlawPhotonFlux::read(), GModelSpectralNodes::read(), GModelSpectralSmoothBrokenPlaw::read(), GModel::read_scales(), GCTAModelSkyCube::read_xml_spatial(), GModel::scale(), GModelSpectralTablePars::set(), GSPIModelDataSpace::setup_pars(), GModelSky::signal_analytical_gradients(), GResponse::size_edisp_vector(), GModelSpatialRadialProfileGauss::write(), GCOMModelDRM::write(), GCTAModelSpatialGradient::write(), GModelSpatialComposite::write(), GModelSpatialDiffuseConst::write(), GCOMModelDRBPhibarNodes::write(), GCOMModelDRBPhibarBins::write(), GCTAModelSpatialMultiplicative::write(), GModelTemporalConst::write(), GModelSpectralComposite::write(), GCTAModelRadialGauss::write(), GModelSpectralMultiplicative::write(), GModelSpatialDiffuseMap::write(), GModelSpatialRadialGauss::write(), GCTAModelRadialProfile::write(), GModelSpatialRadialDisk::write(), GModelSpatialRadialGeneralGauss::write(), GCTAModelSpatialLookup::write(), GModelSpectralBins::write(), GModelTemporalLightCurve::write(), GModelSpatialRadialRing::write(), GModelSpatialEllipticalDisk::write(), GModelSpatialEllipticalGauss::write(), GModelSpectralConst::write(), GModelSpectralTable::write(), GModelSpatialEllipticalGeneralGauss::write(), GModelSpatialElliptical::write(), GModelSpatialPointSource::write(), GModelSpatialRadial::write(), GModelSpatialDiffuseCube::write(), GModelSpectralFunc::write(), GModelSpectralGauss::write(), GModelSpectralPlaw::write(), GModelSpatialRadialShell::write(), GModelSpectralExpPlaw::write(), GModelSpectralLogParabola::write(), GModelSpectralBrokenPlaw::write(), GModelSpectralExpInvPlaw::write(), GModelSpectralSuperExpPlaw::write(), GModelTemporalPhaseCurve::write(), GModelSpectralPlawEnergyFlux::write(), GModelSpectralPlawPhotonFlux::write(), GModelSpectralNodes::write(), GModelSpectralSmoothBrokenPlaw::write(), and GCTAModelSkyCube::write_xml_spatial().

void GOptimizerPar::name ( const std::string &  name)
inline

Set parameter name.

Parameters
[in]nameParameter name.

Sets the parameter name.

Definition at line 689 of file GOptimizerPar.hpp.

References m_name, and name().

GOptimizerPar & GOptimizerPar::operator= ( const GOptimizerPar par)

Assignment operator.

Parameters
[in]parFunction parameter.
Returns
Function parameter.

Definition at line 188 of file GOptimizerPar.cpp.

References copy_members(), free_members(), and init_members().

Referenced by GModelPar::operator=().

std::string GOptimizerPar::print ( const GChatter chatter = NORMAL) const
virtual

Print parameter information.

Parameters
[in]chatterChattiness.
Returns
String with parameter information.

Implements GBase.

Definition at line 590 of file GOptimizerPar.cpp.

References error(), has_max(), has_min(), m_free, m_has_grad, m_scale, m_unit, max(), min(), name(), gammalib::parformat(), SILENT, gammalib::str(), and value().

void GOptimizerPar::remove_factor_max ( void  )
inline

Removes maximum factor boundary.

Removes maximum factor boundary from the parameter.

Definition at line 538 of file GOptimizerPar.hpp.

References m_factor_max, and m_has_factor_max.

Referenced by GModelPar::read().

void GOptimizerPar::remove_factor_min ( void  )
inline

Removes minimum factor boundary.

Removes minimum factor boundary from the parameter.

Definition at line 524 of file GOptimizerPar.hpp.

References m_factor_min, and m_has_factor_min.

Referenced by GModelPar::read().

void GOptimizerPar::remove_max ( void  )
inline

Removes maximum boundary.

Removes maximum boundary from the parameter.

Definition at line 504 of file GOptimizerPar.hpp.

References m_factor_max, m_factor_min, m_has_factor_max, m_has_factor_min, and m_scale.

Referenced by GModelSpatialComposite::read().

void GOptimizerPar::remove_min ( void  )
inline

Removes minimum boundary.

Removes minimum boundary from the parameter.

Definition at line 484 of file GOptimizerPar.hpp.

References m_factor_max, m_factor_min, m_has_factor_max, m_has_factor_min, and m_scale.

Referenced by GModelSpatialComposite::read().

void GOptimizerPar::remove_range ( void  )
inline

Removes minimum and maximum boundary.

Removes minimum and maximum boundary from the parameter.

Definition at line 552 of file GOptimizerPar.hpp.

References m_has_factor_max, and m_has_factor_min.

Referenced by GModelSpectralTable::GModelSpectralTable().

const double & GOptimizerPar::scale ( void  ) const
inline

Return parameter scale.

Returns
Parameter scale factor.

Returns the parameter scale factor.

Definition at line 371 of file GOptimizerPar.hpp.

References m_scale.

Referenced by GModelSpatialComposite::append(), autoscale(), GModelSpatialDiffuseConst::eval(), GCOMModelDRM::eval(), GCTAModelSpatialGradient::eval(), GModelTemporalConst::eval(), GModelSpatialDiffuseMap::eval(), GModelSpatialRadialGauss::eval(), GModelSpectralBins::eval(), GModelSpectralTable::eval(), GModelSpectralConst::eval(), GCTAModelRadialGauss::eval(), GCTAModelSkyCube::eval(), GSPIModelDataSpace::eval(), GCTAModelSpatialLookup::eval(), GModelSpectralFunc::eval(), GModelTemporalLightCurve::eval(), GModelSpatialDiffuseCube::eval(), GModelSpectralGauss::eval(), GModelSpectralPlaw::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralLogParabola::eval(), GModelSpectralBrokenPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralPlawEnergyFlux::eval(), GModelSpectralPlawPhotonFlux::eval(), GModelTemporalPhaseCurve::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GResponse::eval_prob(), GResponse::eval_probs(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpectralTable::GModelSpectralTable(), GOptimizerPar(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GModelSpatialRadialRing::init_members(), GModelTemporalLightCurve::init_members(), GCTAModelRadialProfile::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GCTAModelSkyCube::init_members(), GModelSpatialRadial::init_members(), GModelSpatialDiffuseMap::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralTable::load_par(), GCTAOnOffObservation::N_gamma(), scale(), GSPIModelDataSpace::setup_pars(), and GModelSpatialRadialGauss::update().

void GOptimizerPar::scale ( const double &  scale)

Set scale factor.

Parameters
[in]scaleScale factor.
Exceptions
GException::invalid_argumentSacle factor of 0 specified.

Sets the scale factor of the parameter. All parameter attributes are rescaled accordingly.

An exception is thrown if a scale factor of 0 is specified.

Definition at line 513 of file GOptimizerPar.cpp.

References G_SCALE, m_factor_error, m_factor_gradient, m_factor_max, m_factor_min, m_factor_value, m_has_factor_max, m_has_factor_min, m_scale, and scale().

const std::string & GOptimizerPar::unit ( void  ) const
inline

Return parameter unit.

Returns
Parameter unit.

Returns the parameter unit.

Definition at line 675 of file GOptimizerPar.hpp.

References m_unit.

Referenced by GModelSpectralBins::append(), GModelSpectralNodes::append(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialRadialProfileGauss::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GModelSpatialRadialRing::init_members(), GModelTemporalLightCurve::init_members(), GCTAModelRadialProfile::init_members(), GModelSpatialRadial::init_members(), GModelSpatialElliptical::init_members(), GModelSpatialPointSource::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralBins::insert(), GModelSpectralNodes::insert(), GCOMModelDRBPhibarBins::read(), GCOMModelDRBPhibarNodes::read(), GCTAModelRadialPolynom::read(), GModelSpectralNodes::read(), and unit().

void GOptimizerPar::unit ( const std::string &  unit)
inline

Set parameter unit.

Parameters
[in]unitParameter unit.

Sets the parameter unit.

Definition at line 704 of file GOptimizerPar.hpp.

References m_unit, and unit().

double GOptimizerPar::value ( void  ) const
inline

Return parameter value.

Returns
Parameter value.

Returns the parameter value. The parameter value is computed by multiplying the value factor by the scale factor.

Definition at line 207 of file GOptimizerPar.hpp.

References m_factor_value, and m_scale.

Referenced by GModelSpatialRadialProfileDMEinasto::alpha(), GModelSpatialRadialProfileDMZhao::alpha(), GModelSpectralBins::append(), GModelSpectralNodes::append(), autoscale(), GModelSpatialRadialProfileDMZhao::beta(), GModelSpectralSmoothBrokenPlaw::beta(), GModelSpectralBrokenPlaw::breakenergy(), GModelSpectralSmoothBrokenPlaw::breakenergy(), GCTAModelRadialProfile::core(), GModelSpectralTable::create_par_table(), GModelSpectralLogParabola::curvature(), GModelSpectralExpPlaw::cutoff(), GModelSpectralSuperExpPlaw::cutoff(), GModelSpectralExpInvPlaw::cutoff(), GCTAModelSpatialGradient::detx_gradient(), GCTAModelSpatialGradient::dety_gradient(), GModelSpatialElliptical::dir(), GModelSpatialRadial::dir(), GModelSpatialPointSource::dir(), GModelSpectralBins::eflux(), GModelSpectralConst::eflux(), GModelSpectralGauss::eflux(), GModelSpectralPlaw::eflux(), GModelSpectralExpPlaw::eflux(), GModelSpectralBrokenPlaw::eflux(), GModelSpectralExpInvPlaw::eflux(), GModelSpectralSuperExpPlaw::eflux(), GModelSpectralPlawPhotonFlux::eflux(), GModelSpectralPlawEnergyFlux::eflux(), GModelSpectralPlawPhotonFlux::emax(), GModelSpectralPlawEnergyFlux::emax(), GModelSpectralPlawPhotonFlux::emin(), GModelSpectralPlawEnergyFlux::emin(), GModelSpatialDiffuseConst::eval(), GCOMModelDRM::eval(), GCTAModelSpatialGradient::eval(), GModelSpatialDiffuseMap::eval(), GModelTemporalConst::eval(), GModelSpectralBins::eval(), GModelSpatialEllipticalDisk::eval(), GModelSpectralConst::eval(), GModelSpectralTable::eval(), GCTAModelSkyCube::eval(), GSPIModelDataSpace::eval(), GModelSpectralFunc::eval(), GCTAModelSpatialLookup::eval(), GModelSpectralGauss::eval(), GModelSpatialDiffuseCube::eval(), GModelTemporalLightCurve::eval(), GModelSpectralPlaw::eval(), GModelSpectralExpPlaw::eval(), GModelSpectralLogParabola::eval(), GModelSpectralBrokenPlaw::eval(), GModelSpectralExpInvPlaw::eval(), GModelSpectralSuperExpPlaw::eval(), GModelSpectralPlawEnergyFlux::eval(), GModelSpectralPlawPhotonFlux::eval(), GModelTemporalPhaseCurve::eval(), GModelSpectralSmoothBrokenPlaw::eval(), GModelTemporalPhaseCurve::f0(), GModelTemporalPhaseCurve::f1(), GModelTemporalPhaseCurve::f2(), factor_value(), GModelSpectralBins::flux(), GModelSpectralConst::flux(), GModelSpatialDiffuseConst::flux(), GModelSpectralGauss::flux(), GModelSpectralPlaw::flux(), GModelSpatialDiffuseMap::flux(), GModelSpectralExpPlaw::flux(), GModelSpectralBrokenPlaw::flux(), GModelSpatialDiffuseCube::flux(), GModelSpectralExpInvPlaw::flux(), GModelSpectralSuperExpPlaw::flux(), GModelSpectralPlawEnergyFlux::flux(), GModelSpectralPlawPhotonFlux::flux(), GModelSpatialRadialProfileDMZhao::gamma(), GCTAModelRadialPolynom::GCTAModelRadialPolynom(), GModelSpatialDiffuseConst::GModelSpatialDiffuseConst(), GModelSpatialDiffuseCube::GModelSpatialDiffuseCube(), GModelSpatialDiffuseMap::GModelSpatialDiffuseMap(), GModelSpatialPointSource::GModelSpatialPointSource(), GModelSpectralBrokenPlaw::GModelSpectralBrokenPlaw(), GModelSpectralConst::GModelSpectralConst(), GModelSpectralExpInvPlaw::GModelSpectralExpInvPlaw(), GModelSpectralExpPlaw::GModelSpectralExpPlaw(), GModelSpectralFunc::GModelSpectralFunc(), GModelSpectralGauss::GModelSpectralGauss(), GModelSpectralLogParabola::GModelSpectralLogParabola(), GModelSpectralPlaw::GModelSpectralPlaw(), GModelSpectralPlawEnergyFlux::GModelSpectralPlawEnergyFlux(), GModelSpectralPlawPhotonFlux::GModelSpectralPlawPhotonFlux(), GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw(), GModelSpectralSuperExpPlaw::GModelSpectralSuperExpPlaw(), GModelSpectralTable::GModelSpectralTable(), GModelTemporalConst::GModelTemporalConst(), GModelTemporalLightCurve::GModelTemporalLightCurve(), GOptimizerPar(), GModelSpatialRadialProfileDMEinasto::halo_distance(), GModelSpatialRadialProfileDMBurkert::halo_distance(), GModelSpatialRadialProfileDMZhao::halo_distance(), GModelSpectralBins::index(), GModelSpectralPlaw::index(), GModelSpectralExpPlaw::index(), GModelSpectralLogParabola::index(), GModelSpectralExpInvPlaw::index(), GModelSpectralPlawPhotonFlux::index(), GModelSpectralPlawEnergyFlux::index(), GModelSpectralBrokenPlaw::index1(), GModelSpectralSuperExpPlaw::index1(), GModelSpectralSmoothBrokenPlaw::index1(), GModelSpectralBrokenPlaw::index2(), GModelSpectralSuperExpPlaw::index2(), GModelSpectralSmoothBrokenPlaw::index2(), GModelSpatialRadialProfileGauss::init_members(), GCOMModelDRM::init_members(), GModelSpatialRadialProfileDMBurkert::init_members(), GModelSpatialRadialProfileDMEinasto::init_members(), GCTAModelSpatialGradient::init_members(), GModelTemporalConst::init_members(), GModelSpatialRadialProfileDMZhao::init_members(), GModelSpatialDiffuseConst::init_members(), GCTAModelRadialGauss::init_members(), GModelSpatialRadialGauss::init_members(), GModelSpatialRadialDisk::init_members(), GModelSpatialRadialGeneralGauss::init_members(), GModelSpatialRadialRing::init_members(), GCTAModelRadialProfile::init_members(), GModelTemporalLightCurve::init_members(), GModelSpectralConst::init_members(), GModelSpatialEllipticalGeneralGauss::init_members(), GCTAModelSkyCube::init_members(), GModelSpatialDiffuseMap::init_members(), GCTAModelSpatialLookup::init_members(), GModelSpatialElliptical::init_members(), GModelSpectralGauss::init_members(), GModelSpatialRadialShell::init_members(), GModelSpectralTable::init_members(), GModelSpectralPlaw::init_members(), GModelSpectralBins::init_members(), GModelSpectralFunc::init_members(), GModelSpectralExpPlaw::init_members(), GModelSpectralLogParabola::init_members(), GModelSpectralBrokenPlaw::init_members(), GModelSpatialDiffuseCube::init_members(), GModelSpectralExpInvPlaw::init_members(), GModelSpectralSuperExpPlaw::init_members(), GModelSpectralPlawPhotonFlux::init_members(), GModelSpectralPlawEnergyFlux::init_members(), GModelTemporalPhaseCurve::init_members(), GModelSpectralSmoothBrokenPlaw::init_members(), GModelSpectralBins::insert(), GModelSpectralNodes::insert(), GModelSpectralExpInvPlaw::inverse_cutoff(), GModelSpatialRadialProfileDMBurkert::mass_density(), GModelSpatialRadialProfileDMEinasto::mass_density(), GModelSpatialRadialProfileDMZhao::mass_density(), max(), GModelSpectralGauss::mc(), GModelSpectralExpPlaw::mc(), GModelSpectralLogParabola::mc(), GModelSpectralExpInvPlaw::mc(), GModelSpectralSuperExpPlaw::mc(), GCTAModelSpatialGradient::mc_max_value(), GModelTemporalLightCurve::mc_update(), GModelSpectralBins::mc_update(), GModelSpectralGauss::mean(), min(), GModelTemporalPhaseCurve::mjd(), GCTAOnOffObservation::N_gamma(), GModelTemporalConst::norm(), GModelTemporalLightCurve::norm(), GModelSpectralTable::norm(), GModelSpectralGauss::norm(), GCTAModelSpatialLookup::norm(), GModelSpectralFunc::norm(), GModelTemporalPhaseCurve::norm(), GCTAModelSkyCube::npred(), GModelTemporalPhaseCurve::phase(), GModelSpectralPlaw::pivot(), GModelSpectralExpPlaw::pivot(), GModelSpectralLogParabola::pivot(), GModelSpectralExpInvPlaw::pivot(), GModelSpectralSuperExpPlaw::pivot(), GModelSpectralSmoothBrokenPlaw::pivot(), GModelSpatialElliptical::posangle(), GModelSpectralPlaw::prefactor(), GModelSpectralExpPlaw::prefactor(), GModelSpectralLogParabola::prefactor(), GModelSpectralBrokenPlaw::prefactor(), GModelSpectralExpInvPlaw::prefactor(), GModelSpectralSuperExpPlaw::prefactor(), GModelSpectralSmoothBrokenPlaw::prefactor(), print(), GModelSpatialRadialProfileGauss::profile_value(), GModelSpatialRadialProfileDMBurkert::profile_value(), GModelSpatialRadialProfileDMEinasto::profile_value(), GModelSpatialRadialProfileDMZhao::profile_value(), GModelSpatialRadialDisk::radius(), GModelSpatialRadialGeneralGauss::radius(), GModelSpatialRadialRing::radius(), GModelSpatialRadialShell::radius(), GModelSpatialComposite::read(), GModelSpectralBins::read(), GModelSpectralLogParabola::read(), GModelPar::read(), GModelSpectralNodes::read(), GModelSpatialRadialGeneralGauss::ridx(), GModelSpatialEllipticalGeneralGauss::ridx(), GModel::scale(), GModelSpatialRadialProfileDMEinasto::scale_density(), GModelSpatialRadialProfileDMBurkert::scale_density(), GModelSpatialRadialProfileDMZhao::scale_density(), GModelSpatialRadialProfileDMZhao::scale_radius(), GModelSpatialRadialProfileDMEinasto::scale_radius(), GModelSpatialRadialProfileDMBurkert::scale_radius(), GModelSpatialElliptical::semimajor(), GModelSpatialElliptical::semiminor(), GModelSpatialRadialGauss::set_region(), GModelSpatialRadialDisk::set_region(), GModelSpatialRadialGeneralGauss::set_region(), GModelSpatialRadialShell::set_region(), GSPIModelDataSpace::setup_pars(), GModelSpatialRadialProfileGauss::sigma(), GCTAModelRadialGauss::sigma(), GModelSpatialRadialGauss::sigma(), GModelSpectralGauss::sigma(), GCTAModelRadialProfile::tail(), GModelSpatialRadialProfileGauss::theta_max(), GModelSpatialRadialProfileDMZhao::theta_max(), GModelSpatialRadialProfileDMEinasto::theta_max(), GModelSpatialRadialProfileDMBurkert::theta_max(), GModelSpatialRadialProfileDMBurkert::theta_min(), GModelSpatialRadialProfileDMEinasto::theta_min(), GModelSpatialRadialProfileDMZhao::theta_min(), GModelSpectralTable::update(), GModelSpectralPlaw::update_eval_cache(), GModelSpectralExpPlaw::update_eval_cache(), GModelSpectralLogParabola::update_eval_cache(), GModelSpectralBrokenPlaw::update_eval_cache(), GModelSpectralSuperExpPlaw::update_eval_cache(), GModelSpectralExpInvPlaw::update_eval_cache(), GModelSpectralSmoothBrokenPlaw::update_eval_cache(), GModelSpectralLogParabola::update_mc_cache(), GModelSpectralBrokenPlaw::update_mc_cache(), GModelSpatialDiffuseConst::value(), GModelSpatialDiffuseMap::value(), GModelSpectralConst::value(), GModelSpatialDiffuseCube::value(), GModelTemporalPhaseCurve::value(), GCTAModelRadialProfile::width(), GModelSpatialRadialRing::width(), GModelSpatialRadialShell::width(), and GModelSpectralLogParabola::write().

void GOptimizerPar::value ( const double &  value)

Set parameter value.

Parameters
[in]valueParameter value.

Sets the parameter value. The method stores the value factor which is obtained by dividing the value by the scale factor.

The method calls factor_value() for assigning the value factor, and this method will verify that the value lies within the specified boundaries.

Definition at line 256 of file GOptimizerPar.cpp.

References factor_value(), and m_scale.

Member Data Documentation

double GOptimizerPar::m_factor_error
protected

Uncertainty in parameter factor value.

Definition at line 174 of file GOptimizerPar.hpp.

Referenced by copy_members(), error(), factor_error(), init_members(), GModelPar::read(), scale(), and GModelPar::write().

double GOptimizerPar::m_factor_gradient
mutableprotected

Function factor gradient.

Definition at line 177 of file GOptimizerPar.hpp.

Referenced by copy_members(), factor_gradient(), gradient(), init_members(), and scale().

double GOptimizerPar::m_factor_max
protected

Parameter maximum factor value.

Definition at line 176 of file GOptimizerPar.hpp.

Referenced by copy_members(), factor_max(), init_members(), max(), min(), remove_factor_max(), remove_max(), remove_min(), and scale().

double GOptimizerPar::m_factor_min
protected

Parameter minimum factor value.

Definition at line 175 of file GOptimizerPar.hpp.

Referenced by copy_members(), factor_min(), init_members(), max(), min(), remove_factor_min(), remove_max(), remove_min(), and scale().

double GOptimizerPar::m_factor_value
protected
bool GOptimizerPar::m_free
protected

Parameter is free.

Definition at line 179 of file GOptimizerPar.hpp.

Referenced by copy_members(), fix(), free(), init_members(), is_fixed(), is_free(), and print().

bool GOptimizerPar::m_has_factor_max
protected
bool GOptimizerPar::m_has_factor_min
protected
bool GOptimizerPar::m_has_grad
protected

Parameter has analytic gradient.

Definition at line 182 of file GOptimizerPar.hpp.

Referenced by copy_members(), has_grad(), init_members(), and print().

std::string GOptimizerPar::m_name
protected

Parameter name.

Definition at line 171 of file GOptimizerPar.hpp.

Referenced by copy_members(), GOptimizerPar(), init_members(), name(), GModelPar::read(), and GModelPar::write().

double GOptimizerPar::m_scale
protected
std::string GOptimizerPar::m_unit
protected

Parameter unit.

Definition at line 172 of file GOptimizerPar.hpp.

Referenced by copy_members(), init_members(), print(), and unit().


The documentation for this class was generated from the following files: