We close this example with a demonstration of color optimization. Every integral quantity that is just a number can be used as a fit target. Instead of minimizing the deviation between simulations and experiments CODE can also vary the fit parameters to achieve certain target values for integral quantities.
Here the goal is to achieve a certain color in reflection while achieving a 'Light transmittance' of 0.9 and an emitted power of 0.0010 W/cm2. Load the last configuration (tu1_ex1_step5.wcd). Check that there are 3 fit parameters: The thickness of the top BiOx layer (30 nm), that of the silver layer (10 nm) and the bottom BiOx layer thickness (30 nm). Open the list of integral quantities and change the settings the following way (switching the Optimize column entry from On to Off is done by F4):
Then press Start in the main window to begin the optimization of the fit parameters. The squared difference of each integral value whose setting in the 'Optimize' column is 'On' contributes to the deviation, multiplied by the factor defined in the 'Weight' column. After a while the desired color coordinates are achieved (which is not possible in every case, of course):
You can look up in the fit parameter list which thickness values you should produce:
See the configuration tu1_ex1_step6.wcd.