After a fit finishes, each of the following tasks happens:
Best fit values and error bars are stored for each GDS object defining a guess parameter.
Final values are stored for each GDS object defining a def parameter.
All after parameters are evaluated.
The residual of the fit is calculated.
The statistics of the fit, including χ², reduced χ², R-factor, and all correlations between guess parameters are stored in the Fit object.
All path parameters are evaluated and stored in the Path objects.
The fit's “happiness” (see the next section for details) is evaluated.
All GDS parameters flagged for automatoic annotation are annotated.
All of that is a detailed way of saying that every object involved in the fit is ready to be used for useful and interesting chores after the fit. All Data and Path objects are ready to be plotted. The fit can be saved a Fit serialization. Column data files can be exported. A log file can be written. Any of the chores can happen with confidence that every thing is completely up-t0-date with the results of the fit.
Picking up from the example of the multiple data set fit, the following example demonstrates how to perform several of the common after-fit chores that might be part of a fitting script. The previous example demonstrated how to make an interesting plot using the two data sets and their fits.
- ### ... picking up at line 61 of the previous example ...
- ## do the fit $fit -> fit;
- ## write a log file my ($header, $footer) = ('', '');
- $fit -> logfile("cufit.log", $header, $footer);
- $fit -> freeze(file=>"cu_temperature.dpj");
- $data[0]->save("fit", "cu_10K.fit");
- $data[0]->save("fit", "cu_150K.fit");
- $fit -> interview;