Template Function lsst::afw::math::minimize(lsst::afw::math::Function1<ReturnT> const&, std::vector<double> const&, std::vector<double> const&, std::vector<double> const&, std::vector<double> const&, std::vector<double> const&, double)

Function Documentation

template<typename ReturnT>
FitResults lsst::afw::math::minimize(lsst::afw::math::Function1<ReturnT> const &function, std::vector<double> const &initialParameterList, std::vector<double> const &stepSizeList, std::vector<double> const &measurementList, std::vector<double> const &varianceList, std::vector<double> const &xPositionList, double errorDef)

Find the minimum of a function(x)

Uses the Minuit fitting package with a standard definition of chiSq (see MinimizerFunctionBase1).

Return

true if minimum is valid, false otherwise

Parameters
  • function: function(x) to be minimized

  • initialParameterList: initial guess for parameters

  • stepSizeList: step size for each parameter; use 0.0 to fix a parameter

  • measurementList: measured values

  • varianceList: variance for each measurement

  • xPositionList: x position of each measurement

  • errorDef: what is this?

To do:

  • Document stepSizeList better

  • Document errorDef

  • Compute stepSize automatically? (if so, find a different way to fix parameters)

Exceptions
  • lsst::pex::exceptions::InvalidParameterError: if any input vector is the wrong length