Module gwy :: Class NLFitPreset
[show private | hide private]
[frames | no frames]

Class NLFitPreset


Method Summary
  get_formula()
Gets function formula of preset (with Pango markup).
  get_nparams()
Return the number of parameters of preset.
  get_param_name(param)
Gets the name of a fitting parameter of a fitter preset.
  get_param_units(param, siunit_x, siunit_y)
Derives the SI unit of a fitting parameter from the units of abscissa and ordinate.
  UNIMPLEMENTED_fit(fitter, n_dat, x, y, params, err, fixed_param)
Performs a nonlinear fit with a preset.
  UNIMPLEMENTED_get_value(x, params, fres)
Calculates preset function value in a single point with given parameters.
  UNIMPLEMENTED_guess(n_dat, x, y, params, fres)
Performs initial parameter estimate for a NL fitter.

Method Details

get_formula()

Gets function formula of preset (with Pango markup).
Returns:
The preset function formula.

get_nparams()

Return the number of parameters of preset.
Returns:
The number of function parameters.

get_param_name(param)

Gets the name of a fitting parameter of a fitter preset.

The name may contain Pango markup.
Parameters:
param - A parameter number. (int)
Returns:
The name of parameter @param.

get_param_units(param, siunit_x, siunit_y)

Derives the SI unit of a fitting parameter from the units of abscissa and ordinate.
Parameters:
param - A parameter number. (int)
siunit_x - SI unit of abscissa. (SIUnit)
siunit_y - SI unit of ordinate. (SIUnit)
Returns:

A newly created SIUnit with the units of the parameter @param. If the units of @param are not representable as SIUnit, the result is unitless (i.e. it will be presented as a mere number).

Since: 2.5

UNIMPLEMENTED_fit(fitter, n_dat, x, y, params, err, fixed_param)

Performs a nonlinear fit with a preset.

See gwy_math_nlfit_fit_full() for details.
Parameters:
fitter - A Marquardt-Levenberg nonlinear fitter already initialized for preset's function, or NULL. (NLFitter*)
n_dat - The number of data points (number of items in x and y). (int)
x - Abscissa points. (const-gdouble*)
y - Ordinate points. (const-gdouble*)
params - Initial parameter estimate (the number of parameters depends on the fitted preset and it can be obtained with gwy_nlfit_preset_get_nparams()). (gdouble*)
err - Array to store parameter errros to, may be NULL. (gdouble*)
fixed_param - Which parameters should be treated as fixed (set corresponding element to True for them). May be NULL if all parameters are variable. (const-gboolean*)
Returns:
Either fitter itself, or a newly created fitter if it was NULL.

UNIMPLEMENTED_get_value(x, params, fres)

Calculates preset function value in a single point with given parameters.
Parameters:
params - Preset parameter values. (const-gdouble*)
fres - Set to True if succeeds, False on failure. (gboolean*)
Returns:
The function value.

UNIMPLEMENTED_guess(n_dat, x, y, params, fres)

Performs initial parameter estimate for a NL fitter.

The initial estimate method depends on the function used. There is no absolute guarantee of quality, however if the data points approximately match the fitted function the fit will typically converge from the returned estimate.
Parameters:
n_dat - The number of data points (number of items in x and y). (int)
x - Abscissa points. (const-gdouble*)
y - Ordinate points. (const-gdouble*)
params - The array to fill with estimated parameter values. It has to be at least gwy_nlfit_preset_get_nparams() long. (gdouble*)
fres - Set to True if succeeds, False on failure. (gboolean*)

Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 http://epydoc.sf.net