Procedures Details | <Prev Next> |
General mathematical expressions can be used in
several contexts, such as expressing constraints in least squares
fitting, and Custom
Population Functions or Custom Transition Functions.
Each context has some specific variables introduced, but the same
logic is otherwise used for all expressions:
int(a) |
Integer part of a; number is closer
to zero than a (or equal to a). |
frac(a) |
a - int(a) |
% |
modulus operator: a % b = frac(a/b)*b |
mod(a,b) |
a % b except if a < 0
in which case b-frac(|a|/b)*b is used. |
pi |
3.14159... |
min(a,b,c...) |
The minimum value of all the arguments |
max(a,b,c...) | The maximum value of all the arguments |
poly(x,a0,a1,a2...) | a0+a1.x+a2.x2+... |
lor(x,l) |
Lorenztian function with FWHM l. |
gau(x,g) |
Gaussian function with FWHM g. |
voigt(x,l,g) |
Voigt profile at offset x from the
line centre. l is the FWHM of the Lorenztian
component, g of the Gaussian. |
air(s) |
Air wavelength/nm given vacuum wavenumber s/cm-1.
The refractive index is taken from from B Edlen, Metrologia,
2, 71 (1966). |
vac(l) |
Vacuum wavenumber/cm-1 given air
wavelength in nm. |
atan2(x,y) |
atan(x/y), but with a -π...π result
range. |
threej(j1,m1,j2,m2,j3,m3) |
Wigner 3-j function |
cg(j1,m1,j2,m2,j3,m3) |
Clebsch-Gordan coefficient = (-1)j1-j2+m3(2j3+1)½threej(j1,m1,j2,m2,j3,-m3) |
sixj(j1,j2,j3,j4,j5,j6) |
Wigner 6-j function |
ninej(j11,j12,j13,j21,j22,j23,j31,j32,j33) |
Wigner 9-j function |
a0 |
Bohr radius/m |
c |
Speed of light |
ee |
Charge on the electron |
ep |
Permittivity of a vacuum |
ge |
g value for an electron |
gg |
Gravitational Constant |
f |
Faraday Constant |
k |
Boltzmann Constant |
l |
Avagadro's Number |
r |
Gas Constant |
h |
Planck constant |
hc |
h/2π |
me |
mass of electron |
mn |
mass of neutron |
mp |
mass of proton |
mub |
Bohr magneton |
mun |
nuclear magneton |
rydberg |
Rydberg constant/m-1 |
u |
Atomic mass unit/kg |
A nDebug flag is available in each object that uses an expression. If non zero, that the values of all the variables and the value of the function on each evaluation will be written to the log window. The value specifies the number of times this is done; use View, Clear Cache to reset the count if necessary. Negative values have special interpretation: