Fit Parameter Initialization

There are two fit parameter initialization methods:

SPEX_FIT_FIRSTINT_METHOD - sets parameters for first interval in the series of intervals selected for fitting.
The following parameters are set (unless spex_fit_init_params_only is set to 1, see below):
fit_comp_params, fit_comp_minima, fit_comp_maxima, fit_comp_free_mask, fit_comp_spectrum, fit_comp_model
Choices are:
default - Use program defaults for each function component
current - Leave all parameters at their current setting
fn - Use parameters from interval n. Use final fitted values from interval n for fit_comp_params
sn - Use parameters from interval n. Use starting values from interval n for fit_comp_params


SPEX_FIT_START_METHOD - sets parameters for subsequent (after first) intervals in the series of intervals selected for fitting.
The following parameters are set (unless spex_fit_init_params_only is set to 1, see below):
same list as above, as well as erange, uncertainty, # iterations (except for default method)
Choices are:
default - Use program defaults for each function component
previous_int - Use values most recently fit interval. Use final fitted value for fit_comp_params
previous_start - Use values most recently fit interval. Use starting value for fit_comp_params
previous_iter - Use values from earlier fit on each interval. Use final fitted values from the previous iteration for fit_comp_params. If no earlier fit done, leave all parameters at current settings.

Note: If spex_fit_start_method is set to previous_iter, it applies to the first interval as well, and spex_fit_firstint_method is ignored.

SPEX_FIT_INIT_PARAMS_ONLY - If set, transer only the fit parameter values to the current interval being fit (which will be set based on your selections for first and subsequent interval initialization method.
If 0 (default), then transer min, max, free, erange, uncertainty, #iter and fit parameter values.