documentation:program_flow
Program Flow
In the following the program flow of some important functions is sketched
Reflectivity
Read current state from the graphical user interface and check values.
if “Set optical constants automatically is turned on”
Read .db or .e files of each layer. If no file found display error message.
if magnetization is turned on read .m files of each layer. If no file found display error message.
Fill dielectric tensor with proper values of the diagonal and off-diagonal elements.
Run script (“BeforeCalculation”)
Calculate reflectivity
Apply post modifications
Calculation of the error for each dataset
Check if fit flag is set, otherwise return
Make a private copy of the dataset
Apply qz-shift, energy-shift, scaling and translation to the datasets energy table and qz table.
Apply post-modifications to the dataset.
Check, which type of dataset this is. This depends on the data in the dataset. The priority is reflectivity > asymmetry > Rp and Rm. Separate datasets if you want to calculate the different curves.
Calculate the corresponding curve for the same datapoints as the measurement. (This is equivalent to the “use dataset points for simulatio”
Calculate Chi^2 between dataset and simulation.
Energy scan
Show Delta and Beta Spectra
Script Execute
documentation/program_flow.txt · Last modified: 2014/05/09 18:34 by macke