Back to TotalFit Methods

generate_fitting_environment()

Fitting of all data loaded in the TotalFit object requires to combine all their individual model parameters into one total ALL-PARAMETER vector. Corresponding lookup vectors are also composed to relate position in the all-parameter vector with corresponding parameter in each individual dataset. To generate total vector of all parameters and corresponding lookup vectors one needs to run generate_fitting_environment().

The total vector of model parameters and the lookup vectors are important devices in handling multiple models. All-parameters vector accomodates all the parameters of the models while the lookup vectors for each dataset keep track where each parameter is positioned in the all-parameter vector. The all-parameter vector is not used for fitting directly but rather serves as an ordered storage device. It will be split into variable and constant components for fitting and re-assembled back aftewards. Lookup vectors will again be used to extract adjusted dataset-specific parameter sets.

TECHNICAL NOTE: The all-parameter vector has a length equal to total number of parameters of all active models. If all the parameters are independent - all positions of all-parameter vector are used. Otherwise, some positions are related to multiple parameters and other corresponding positions are ignored).

 

For a specific usage see TotalFit.m