[ Japanese Page is HERE. ]
Original software written in Igor Pro macro language is supplied in plane-text format. The procedures can be used by copying & pasting to the procedre window of Igor.
[ erfci.txt ]
The inverse function x=erfci(y) for the complementary error function y=erfc(x).
[ VoigtPoppeWijers.txt ]
The "scaled complex complementary error function" (Faddeeva function) :
wofz(z)=exp(-z*z)*erfc(-i*z) |
The Voigt function:
fVoigtPoppeWijers(x,GamL,GamG) |
Faddeeva function:
wofz(z) |
Refer to [G.P.M.Poppe & C.M.J.Wijers, ACM Trans.Math.Software, 16, 38-46 (1990)].
The macro creates the abscissa and weights of Gauss-Legendre integral with arbitrary number of sampling points.
The waves for the abscissa: xGL[0..n0*(n0+1)/2-1] and weights: wGL[0..n0*(n0+1)/2-1] are created by executing the macro GauLegInit(n0).
The i-th element from the n sampling points (n <= n0) is referred as
xGL[n*(n-1)/2+i-1] and wGL[n*(n-1)/2+i-1] |
Example: n-point Gauss-Legendre integral of a function f(x) from alpha to beta is calculated by
ans = 0;
i = 0;
do
x = alpha + (beta-alpha) * xGL[n*(n-1)/2+i];
ans = ans + wGL[n*(n-1)/2+i] * f(x);
i = i + 1;
while (i < n);
ans = (beta - alpha) * ans;
[ GaussHermite.txt ]
The macro creates the abscissa and weights of the Gauss-Hermite integral with
arbitrary number of sampling points.
The waves for the abscissa: xGH[0..n0*(n0+1)/2-1] and weights: wGH[0..n0*(n0+1)/2-1] are created by executing the macro GauHerInit(n0).
[ Thorkildsen.txt ]
Rapid alghorithm to evaluate transmittance (reciproal of absorption correction factor) of cylinder, applying Gauss-Legendre quadrature to the formula of Thorkildsen & Larsen.
Over 1,000 times faster than the method described in “International
Tables for Crystallography”.
[ AbsorptionCorrection.txt ]
Collection of macros to calculate transmittance (reciprocal of absorption correction factor) of cylinder and sphere.
[ PanelCromerLiberman.txt ]
GUI inteface (control panel) for using the macro:
“Cromer Liberman macros for Igor Pro for atomic form factors” developed by Jan Ilavsky.
Mass attenuation coefficient μ / ρ and dispersion corrections Δf1, Δf2 are displayed by entering the wavelength or photon energy of the x-ray.
Note: the name of the procedure window should be different from “PanelCromerLiberman”.
(Updated May 13, 2012).
[ niceNum2Str.txt ]
String function, creates a string of valid figures with the error expressed as integer in parenthesis, from input numerical value and error.
Example:
Descriptions in Igor macro | results |
---|---|
niceNum2Str(15345.5413,235.1543) | 15300(200) |
niceNum2Str(15345.5413,134.1543) | 15350(130) |
niceNum2Str(15345.5413,1.1543) | 15345.5(12) |
niceNum2Str(15345.5413,0.0543) | 15345.54(5) |
niceNum2Str(15345.5413,0.0143) | 15345.541(14) |
Updated: May 13, 2012