User Tools

Site Tools


This is an old revision of the document!

Program Flow

In the following the program flow of some important functions is sketched


  1. Read current state from the graphical user interface and check values.
  2. if “Set optical constants automatically is turned on”
    1. Read .db or .e files of each layer. If no file found display error message.
    2. if magnetization is turned on read .m files of each layer. If no file found display error message.
  3. Fill dielectric tensor with proper values of the diagonal and off-diagonal elements.
  4. Run script (“BeforeCalculation”)
  5. Calculate reflectivity
  6. 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.1399660435.txt.gz · Last modified: 2014/05/09 18:33 by macke