Back to TotalFit Methods

Assigning and changing models in datasets

Dataset_set_active_model() method changes the model for a given dataset. When changing the model we invalidate existing fitting environment because if the number of parameters in the model changes then relation matrix and the lookup vectors become wrong. Therefore this method resets all fitting environment to prevent problems. After you changed the models you need to restore the links (relations between parameters) and generate new fitting environment. After that you need to set the parameters for datasets with new models and then you can restore the parameter values for other (unchanged) datasets from the their own storage (best_fit_parameters) using update_parameters_from_datasets() method.

 

For a specific usage see TotalFit.m