This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation [2015/05/12 10:14] – macke | documentation [2016/03/30 09:33] (current) – macke | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Units ====== | ====== Units ====== | ||
- | The Maxwell equations are in principle | + | Maxwell' |
To be consistent use for: | To be consistent use for: | ||
Line 14: | Line 14: | ||
==== Incidence light ==== | ==== Incidence light ==== | ||
- | '' | + | '' |
- | type: decimal number | + | 1. argument: angle theta in degrees |
- | Desc: Theta angle of the incoming light in degrees | + | 2. argument: angle phi in degrees |
+ | return value: none | ||
+ | Desc: Set the incoming light direction | ||
- | '' | + | '' |
- | type: decimal number | + | 1. argument: |
- | Desc: Phi angle of the incoming light in degrees | + | return value: none |
- | + | ||
- | '' | + | |
- | type: Vec3 (only readable) | + | |
- | Desc: The current wavevector of the incoming light | + | |
- | + | ||
- | '' | + | |
- | type: decimal number | + | |
Desc: Energy of incoming light in eV | Desc: Energy of incoming light in eV | ||
- | + | ||
- | '' | + | |
- | type: string | + | '' |
- | valid values: | + | 1. argument: |
" | " | ||
" | " | ||
Line 39: | Line 34: | ||
Desc: Defines the polarization of the incoming light dependent in relation to the HK=0,0 scattering plane. | Desc: Defines the polarization of the incoming light dependent in relation to the HK=0,0 scattering plane. | ||
- | '' | + | '' |
- | type: string | + | 1. argument: |
- | valid values: | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
+ | 2. argument: Defines index of outgoing beam to define the scattering plane | ||
+ | Desc: Defines the polarization of the incoming light dependent on the defined scattering plane. | ||
+ | |||
+ | |||
+ | '' | ||
+ | | ||
+ | Desc: Returns the current wavevector of the incoming light | ||
+ | |||
+ | |||
+ | '' | ||
+ | 1. argument: | ||
" | " | ||
" | " | ||
Line 48: | Line 57: | ||
" | " | ||
Desc: Defines the polarization filter of the outgoing light. | Desc: Defines the polarization filter of the outgoing light. | ||
- | + | ||
- | '' | + | |
- | TODO | + | |
==== Main Functions ==== | ==== Main Functions ==== | ||
- | '' | + | '' |
- | | + | return value: nothing |
- | | + | Desc: Calculates the scattering matrices for the whole layer structure. It depends on almost all parameters given earlier and executes the main routine. |
==== Atom creation ==== | ==== Atom creation ==== | ||
- | '' | + | '' |
1. argument: real part of scattering factor (f1) | 1. argument: real part of scattering factor (f1) | ||
2. argument: imaginary part of scattering factor (f2) | 2. argument: imaginary part of scattering factor (f2) | ||
Line 66: | Line 73: | ||
Desc: Generates a energy-independent atom type | Desc: Generates a energy-independent atom type | ||
- | '' | + | '' |
1. argument: short element name like " | 1. argument: short element name like " | ||
return value: atom type | return value: atom type | ||
Desc: tries to find name.ff in order to load the scattering factor files or uses the internal database. | Desc: tries to find name.ff in order to load the scattering factor files or uses the internal database. | ||
- | '' | + | '' |
1. argument: short element name like " | 1. argument: short element name like " | ||
2. argument: defines the scattering for a certain momentum transfer q [Unit: A^-1] | 2. argument: defines the scattering for a certain momentum transfer q [Unit: A^-1] | ||
Line 77: | Line 84: | ||
Desc: tries to find name.ff in order to load the scattering factor files or uses the internal database. | Desc: tries to find name.ff in order to load the scattering factor files or uses the internal database. | ||
- | '' | + | '' |
1. argument: real part of scattering factor (f1) | 1. argument: real part of scattering factor (f1) | ||
2. argument: imagninary part of scattering factor (f2) | 2. argument: imagninary part of scattering factor (f2) | ||
Line 87: | Line 94: | ||
Desc: Generates a energy-independent atom type with magnetic contributions | Desc: Generates a energy-independent atom type with magnetic contributions | ||
- | '' | + | '' |
1. argument: filename of tabulated scattering factors | 1. argument: filename of tabulated scattering factors | ||
return value: atom type | return value: atom type | ||
Desc: Generates a energy-dependent atom type | Desc: Generates a energy-dependent atom type | ||
- | '' | + | '' |
1. argument: filename of tabulated scattering tensors | 1. argument: filename of tabulated scattering tensors | ||
return value: atom type | return value: atom type | ||
Line 100: | Line 107: | ||
- | '' | + | '' |
1. Argument: First unit cell vector in-plane | 1. Argument: First unit cell vector in-plane | ||
2. Argument: Second unit cell vector in-plane | 2. Argument: Second unit cell vector in-plane | ||
- | 3. Argument: unit cell length in z-direction. This is needed | + | 3. Argument: unit cell length in z-direction. This argument |
Desc: Sets the lattice parameters in 2D. Adds the mandatory reciprocal lattice vector (H,K)=(0,0) | Desc: Sets the lattice parameters in 2D. Adds the mandatory reciprocal lattice vector (H,K)=(0,0) | ||
| | ||
- | '' | + | '' |
- | '' | + | '' |
- | '' | + | '' |
| | ||
Desc: Returns the three reciprocal lattice vectors. | Desc: Returns the three reciprocal lattice vectors. | ||
- | '' | + | '' |
| | ||
Desc: return the number of reciprocal lattice vectors calculated. | Desc: return the number of reciprocal lattice vectors calculated. | ||
- | '' | + | '' |
1. Argument: Miller indice H of the reciprocal lattice vector | 1. Argument: Miller indice H of the reciprocal lattice vector | ||
2. Argument: Miller indice K of the reciprocal lattice vector | 2. Argument: Miller indice K of the reciprocal lattice vector | ||
Line 123: | Line 130: | ||
Desc: Adds a reciprocal lattice vector HK to the list of vector, which have to be calculated | Desc: Adds a reciprocal lattice vector HK to the list of vector, which have to be calculated | ||
- | '' | + | '' |
1. Argument: Radius in the reciprocal lattice space | 1. Argument: Radius in the reciprocal lattice space | ||
| | ||
Line 131: | Line 138: | ||
- | '' | + | '' |
1. Argument: number of slabs to create | 1. Argument: number of slabs to create | ||
2. Argument: thickness of each slab | 2. Argument: thickness of each slab | ||
| | ||
- | '' | + | '' |
1. Argument: add to the slab with index i | 1. Argument: add to the slab with index i | ||
2. Argument: the variable with the atom type | 2. Argument: the variable with the atom type | ||
Line 142: | Line 149: | ||
| | ||
- | '' | + | '' |
Desc: Describes the final film structure. These are basically comma seperated slab indices or variables defined in slabs.DefineCrystal | Desc: Describes the final film structure. These are basically comma seperated slab indices or variables defined in slabs.DefineCrystal | ||
| | ||
Line 153: | Line 160: | ||
| | ||
- | '' | + | '' |
1. argument: Variable name of this structure. Allowed signs: ' | 1. argument: Variable name of this structure. Allowed signs: ' | ||
2. argument: Crystal definition like in the function slabs.SetStructure | 2. argument: Crystal definition like in the function slabs.SetStructure | ||
Line 159: | Line 166: | ||
Desc: Defines a seperate crystal which can be used in the function slabs.SetStructure | Desc: Defines a seperate crystal which can be used in the function slabs.SetStructure | ||
- | '' | + | '' |
1. argument: Variable name of this structure. Allowed signs: ' | 1. argument: Variable name of this structure. Allowed signs: ' | ||
2. argument: Crystal definition like in the function slabs.SetStructure | 2. argument: Crystal definition like in the function slabs.SetStructure | ||
Line 165: | Line 172: | ||
Desc: Defines a slab of an unordered crystal. The crystal is reduced to a continuum with the correct optical constants | Desc: Defines a slab of an unordered crystal. The crystal is reduced to a continuum with the correct optical constants | ||
- | '' | + | '' |
1. argument: Variable name of this structure. Allowed signs: ' | 1. argument: Variable name of this structure. Allowed signs: ' | ||
2. argument: Crystal definition of the top crystal like in the function slabs.SetStructure | 2. argument: Crystal definition of the top crystal like in the function slabs.SetStructure | ||
Line 178: | Line 185: | ||
==== General Functions ==== | ==== General Functions ==== | ||
- | '' | + | '' |
| | ||
- | '' | + | '' |
| | ||
- | '' | + | '' |
| | ||
- | '' | + | '' |
return value: Vec3 | return value: Vec3 | ||
- | '' | + | '' |
return value: Vec3 | return value: Vec3 | ||
- | '' | + | '' |
return value: integer (-1 if error) | return value: integer (-1 if error) | ||
Desc: Calculates the angle theta for a fixed phi angle and given hkl triple. Variable l can be non-integer. Returns the index of the reciprocal lattice vector. | Desc: Calculates the angle theta for a fixed phi angle and given hkl triple. Variable l can be non-integer. Returns the index of the reciprocal lattice vector. | ||
a negative number of l means transmission whereas a positive number means reflection. The calculated angle theta is automatically set in the variable light.theta | a negative number of l means transmission whereas a positive number means reflection. The calculated angle theta is automatically set in the variable light.theta | ||
- | '' | + | '' |
return value: nothing | return value: nothing | ||
valid values: | valid values: | ||
Line 206: | Line 213: | ||
| | ||
- | '' | + | '' |
valid values: | valid values: | ||
| | ||
Line 213: | Line 220: | ||
| | ||
- | '' | + | '' |
valid values: | valid values: | ||
| | ||
Line 223: | Line 230: | ||
- | '' | + | '' |
Desc: Add current light configuration to queue | Desc: Add current light configuration to queue | ||
- | '' | + | '' |
Desc: Execute the current queue parallelized | Desc: Execute the current queue parallelized | ||
- | '' | + | '' |
Variable1: Index in the queue beginning from zero | Variable1: Index in the queue beginning from zero | ||
Desc: Activates a result of the queue. | Desc: Activates a result of the queue. | ||
- | '' | + | '' |
return value: Number of entries in the queue | return value: Number of entries in the queue | ||
- | '' | + | '' |
Desc: Clears the queue (Bug: Memory is not freed) | Desc: Clears the queue (Bug: Memory is not freed) | ||
==== Fitting functions ==== | ==== Fitting functions ==== | ||
- | '' | + | '' |
1. argument: initial value for number | 1. argument: initial value for number | ||
2. argument: stepsize of 1.arguement in first iteration . If unsure choose 0.1*initial_value. The value must not be zero! | 2. argument: stepsize of 1.arguement in first iteration . If unsure choose 0.1*initial_value. The value must not be zero! | ||
Line 247: | Line 254: | ||
4. argument: upper boundary for variable | 4. argument: upper boundary for variable | ||
- | '' | + | '' |
1. argument: Lua function which should return an error | 1. argument: Lua function which should return an error | ||
Desc: The function receives a list of parameters (array of numbers), and should return an error (number) | Desc: The function receives a list of parameters (array of numbers), and should return an error (number) | ||
- | '' | + | '' |
1. argument: Number of simplex iterations to perform | 1. argument: Number of simplex iterations to perform | ||