Running the fit

Navigation:  Automated parameter fitting > Step-by-step example >

Running the fit

Previous pageReturn to chapter overviewNext page

Finally we can start the fit pressing the 'Start fit' button in the optimization window:

 

optimize7

 

It will be useful to keep the comparison of the spectra and the values of the fit parameters visible on the screen.

While doing the fit, your PC will be blocked almost completely, and you should patiently do something else while the computer works for you.

If one of the parameters changes the properties of one of the extended Mie scatterers, the Mie computation is done automatically before the SPRAY simulaton is started. This can cause a significant amount of additional computational effort - you can see the Mie program window flashing up from time to time in the background.

 

After a long time, the fit algorithm will stop by itself. However, you can press the 'Stop fit' button anytime. In this case, SPRAY will finish the current iteration of the fit, load the optimized fit parameters and re-do the simulation a last time with the best parameters. The fit is finished when you get the message 'Fit finished!' in the main window.

 

optimize16

 

Note that the quality and the progress of the fit depends on the 'noise level' of the simulation: If you take too many rays per spectral point, the optimization will take a very long time. If the number of rays is too small the noise level is too high, and the optimization will be difficult in the final stages, because the best values of the parameters may not lead to the smallest deviation between simulation and experiment. You have to experiment a little in order to find the most efficient balance between speed and quality.

Finally you should not forget to save the SPRAY configuration with the optimized parameters.