User Tools

Site Tools


documentation:program_flow

Program Flow

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

Reflectivity

  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

  1. Check if fit flag is set, otherwise return
  2. Make a private copy of the dataset
  3. Apply qz-shift, energy-shift, scaling and translation to the datasets energy table and qz table.
  4. Apply post-modifications to the dataset.
  5. 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.
  6. Calculate the corresponding curve for the same datapoints as the measurement. (This is equivalent to the “use dataset points for simulatio”
  7. 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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki