ModelFitConfig#

class lsst.multiprofit.ModelFitConfig(*args, **kw)#

Bases: Config

Configuration for model fitting.

Attributes Summary

eval_residual

Whether to evaluate the residual every iteration before the Jacobian, which can improve performance if most steps do not call the Jacobian function.

fit_linear_iter

The number of iterations to wait before performing a linear fit during optimization.

optimization_library

The optimization library to use when fitting (str, default 'scipy')

Methods Summary

validate()

Validate the Config, raising an exception if invalid.

Attributes Documentation

eval_residual#

Whether to evaluate the residual every iteration before the Jacobian, which can improve performance if most steps do not call the Jacobian function. Must be set to True if the optimizer does not always evaluate the residual first, before the Jacobian. (bool, default True)

fit_linear_iter#

The number of iterations to wait before performing a linear fit during optimization. Default 0 disables the feature. (int, default 0)

optimization_library#

The optimization library to use when fitting (str, default 'scipy')

Allowed values:

'pygmo'

Pygmo2

'scipy'

scipy.optimize

'None'

Field is optional

Methods Documentation

validate() None#

Validate the Config, raising an exception if invalid.

Raises#

lsst.pex.config.FieldValidationError

Raised if verification fails.

Notes#

The base class implementation performs type checks on all fields by calling their validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.