|
|
|
|
Version 1.0 |
|
Optical Spectroscopy Markup Language |
Core Library
This is preliminary version subject to change
The core library gathers all the basic constants and mathematical functions needed to construct
complex spectroscopic models. Peak functions such as the gaussian and lorentzian
functions, several absorption profiles corresponding to microscopic mechanisms of absorption,
a few classic base lines, sequences and other miscellaneous functions are also present
in this library.
Numbers and Constants
Random
The random token represents a pseudorandom number generator that returns real numbers
between 0.0 and 1.0 in a equidistributed way.
<apply>
<function name="random"/>
</apply>
Pi
The pi token represents the pi constant : 3.14159265....
<constant name="pi"/>
E
The e token represents the exponential value of 1.0 : 2.7182818....
<constant name="e"/>
Ln-2
The ln-2 token represents the natural logarithm of 2.0 : 0.6931471....
<constant name="ln-2"/>
Ln-10
The ln-10 token represents the natural logarithm of 10.0 : 2.3025850....
<constant name="ln-10"/>
Operators
top
Opposite
The opposite token represents the opposite operator. It returns the opposite of its
complex argument value.
<apply>
<function name="opposite"/>
<link> a </link>
</apply>
Returns - a.
<apply>
<function name="opposite"/>
<number> 1.0 </number>
</apply>
Returns -1.0.
top
Inverse
The inverse token represents the inverse operator. It returns the inverse of its
complex argument value.
<apply>
<function name="inverse"/>
<link> a </link>
</apply>
Returns 1/a.
<apply>
<function name="inverse"/>
<number> 2.0 </number>
</apply>
Returns 0.5.
top
Plus
The plus token represents the binary plus operator. It returns the sum of its two
complex argument values.
<apply>
<function name="plus"/>
<link> a </link>
<link> b </link>
</apply>
Returns a + b.
<apply>
<function name="plus"/>
<number> 1.0 </number>
<number type="complex"> 2.0 </sep> 1.0 </number>
</apply>
Returns 3.0 + i.
top
Minus
The minus token represents the binary minus operator. It returns the difference of its
two complex argument values.
<apply>
<function name="minus"/>
<link"> a </link>
<link"> b </link>
</apply>
Returns a - b.
<apply>
<function name="minus"/>
<link"> x </link>
<number type="complex"> 1.0 </sep> 1.0 </number>
</apply>
Returns x - 1.0 - i.
top
Times
The times token represents the binary times operator. It returns the product of its
two complex argument values.
<apply>
<function name="times"/>
<link"> a </link>
<link"> b </link>
</apply>
Returns ab.
<apply>
<function name="times"/>
<number"> 3.0 </number>
<number type="complex"> 1.0 </sep> 2.0 </number>
</apply>
Returns 3.0 + 6.0 i.
top
Divide
The divide token represents the binary times operator. It returns the quotient of its
two complex argument values.
<apply>
<function name="divide"/>
<link"> a </link>
<link"> b </link>
</apply>
Returns a/b.
<apply>
<function name="divide"/>
<number type="complex"> 1.0 </sep> 2.0 </number>
<number"> 2.0 </number>
</apply>
Returns 0.5 + i.
top
I-Plus
The i-plus token represents the binary imaginary-plus operator. It returns the
sum of its first complex argument value and i times the second complex argument value.
<apply>
<function name="i-plus"/>
<link> a </link>
<link> b </link>
</apply>
Returns a + b i.
<apply>
<function name="plus"/>
<number type="complex"> 2.0 </sep> 1.0 </number>
<number> 1.0 </number>
</apply>
Returns 2.0 + 2.0 i.
top
I-Minus
The i-minus token represents the binary imaginary-minus operator. It returns the
difference of its first complex argument value and i times the second complex argument value.
<apply>
<function name="i-minus"/>
<link"> a </link>
<link"> b </link>
</apply>
Returns a - b i.
<apply>
<function name="i-minus"/>
<number type="complex"> 5.0 </sep> 3.0 </number>
<number type="complex"> 1.0 </sep> 2.0 </number>
</apply>
Returns 7.0 + 2.0 i.
top
I-Times
The i-times token represents the unary imaginary-times operator. It returns the
product of i and its complex argument value.
<apply>
<function name="i-times"/>
<link"> a </link>
</apply>
Returns i a.
<apply>
<function name="i-times"/>
<number type="complex"> 4.0 </sep> 3.0 </number>
</apply>
Returns -3.0 + 4.0 i.
top
Sum
The sum token represents the n-ary sum operator. It returns the
sum of its n complex argument values.
<apply>
<function name="sum"/>
<link"> a </link>
<link"> b </link>
<link"> c </link>
</apply>
Returns a + b + c.
<apply>
<function name="sum"/>
<number> 1.0 </number>
<number> 2.0 </number>
<number> 3.0 </number>
</apply>
Returns 6.0.
top
Product
The product token represents the n-ary product operator. It returns the
product of its n complex argument values.
<apply>
<function name="product"/>
<link"> a </link>
<link"> b </link>
<link"> c </link>
</apply>
Returns abc.
<apply>
<function name="product"/>
<number> 4.0 </number>
<number> 5.0 </number>
<number> 6.0 </number>
</apply>
Returns 120.0.
top
Mean
The mean token represents the n-ary mean operator. It returns the
average of its n complex argument values.
<apply>
<function name="mean"/>
<link"> a </link>
<link"> b </link>
<link"> c </link>
</apply>
Returns (a + b + c)/3.
<apply>
<function name="mean"/>
<number> 7.0 </number>
<number> 8.0 </number>
<number> 9.0 </number>
</apply>
Returns 8.0.
top
If-Else
The if-else token represents the conditional operator. It returns the
first complex argument value if the condition is true, the second complex argument value
otherwise.
<apply>
<function name="if-else"/>
<apply>
<function name="lower-than"/>
<link> x </link>
<number> 100.0 </number>
</apply>
<link> a </link>
<link> b </link>
</apply>
Returns a if x is lower than 100.0 and b otherwise.
top
Equal
The equal token represents the = operator. It returns true (1.0) if the
first complex argument value is equal to the second argument value, false (0.0) otherwise.
<apply>
<function name="equal"/>
<link> a </link>
<link> b </link>
</apply>
Returns 1.0 if a is equal to b, 0.0 otherwise.
top
Lower-Than
The lower-than token represents the < operator. It returns true (1.0) if the
first real argument value is strictly lower than the second real argument value, false (0.0) otherwise.
<apply>
<function name="lower-than"/>
<link> a </link>
<link> b </link>
</apply>
Returns 1.0 if a is strictly lower than b, 0.0 otherwise.
top
Greater-Than
The greater-than token represents the > operator. It returns true (1.0) if the
first real argument value is strictly greater than the second real argument value, false (0.0) otherwise.
<apply>
<function name="greater-than"/>
<link> a </link>
<link> b </link>
</apply>
Returns 1.0 if a is strictly greater than b, 0.0 otherwise.
top
Include
The include token represents the include operator. It returns true (1.0) if the
first real argument value is included in the interval whose limits are given by the second
and third real argument values, false (0.0) otherwise.
<apply>
<function name="include"/>
<link> x </link>
<link> a </link>
<link> b </link>
</apply>
Returns 1.0 if x is included in the interval [a,b], 0.0 otherwise.
Elementary Functions
top
Abs
The abs token represents the abs complex function. It returns the magnitude of
the complex number z = x + i y, |z|= (x2 + y2)1/2.
<apply>
<function name="abs"/>
<link> z </link>
</apply>
Returns abs(z) = |z|.
top
Arg
The arg token represents the arg complex function. It returns the argument of
the complex number z, arg(z), where -pi < arg(z) <= pi.
<apply>
<function name="arg"/>
<link> z </link>
</apply>
Returns arg(z).
top
Conjugate
The conjugate token represents the conjugate complex function. It returns
the complex conjugate of the complex number z = x + i y, z* = x - i y.
<apply>
<function name="conjugate"/>
<link> z </link>
</apply>
Returns conjugate(z) = z*.
top
Real
The real token represents the real complex function. It returns
the real part of the complex number z = x + i y, x.
<apply>
<function name="real"/>
<link> z </link>
</apply>
Returns real(z) = x.
top
Imag
The imag token represents the imaginary complex function. It returns
the imaginary part of the complex number z = x + i y, y.
<apply>
<function name="imag"/>
<link> z </link>
</apply>
Returns imag(z) = y.
top
Norm
The norm token represents the norm complex function. It returns the squared magnitude of
the complex number z = x + i y, |z|2 = (x2 + y2).
<apply>
<function name="norm"/>
<link> z </link>
</apply>
Returns norm(z) = |z|2.
top
Sqr
The sqr token represents the complex square function. It returns the complex square of
the complex number z = x + i y, z2.
<apply>
<function name="sqr"/>
<link> z </link>
</apply>
Returns sqr(z) = z2.
top
Sqrt
The sqrt token represents the complex square root function. It returns the complex square root of
the complex number z = x + i y, z1/2.
<apply>
<function name="sqrt"/>
<link> z </link>
</apply>
Returns sqrt(z) = z1/2.
top
Ln
The ln token represents the complex natural logarithm function. It returns the complex
natural logarithm (base e) of the complex number z. The branch cut is the negative real axis.
<apply>
<function name="ln"/>
<link> z </link>
</apply>
Returns ln(z).
top
Log
The log token represents the complex base-10 logarithm function. It returns the complex
logarithm (base 10) of the complex number z.
<apply>
<function name="log"/>
<link> z </link>
</apply>
Returns log(z).
top
Exp
The exp token represents the complex exponential function. It returns the complex
exponential of the complex number z.
<apply>
<function name="exp"/>
<link> z </link>
</apply>
Returns exp(z).
top
Cos
The cos token represents the complex cosine function. It returns the complex
cosine of the complex number z, cos(z) = (exp(iz) + exp(-iz))/2.
<apply>
<function name="cos"/>
<link> z </link>
</apply>
Returns cos(z).
top
Sin
The sin token represents the complex sine function. It returns the complex
sine of the complex number z, sin(z) = (exp(iz) - exp(-iz))/(2i).
<apply>
<function name="sin"/>
<link> z </link>
</apply>
Returns sin(z).
top
Tan
The tan token represents the complex tangent function. It returns the complex
tangent of the complex number z, tan(z) = sin(z)/cos(z).
<apply>
<function name="tan"/>
<link> z </link>
</apply>
Returns tan(z).
top
Cot
The cot token represents the complex cotangent function. It returns the complex
cotangent of the complex number z, cot(z) = 1/tan(z).
<apply>
<function name="cot"/>
<link> z </link>
</apply>
Returns cot(z).
top
Csc
The csc token represents the complex cosecant function. It returns the complex
cosecant of the complex number z, csc(z) = 1/sin(z).
<apply>
<function name="csc"/>
<link> z </link>
</apply>
Returns csc(z).
top
Sec
The sec token represents the complex secant function. It returns the complex
secant of the complex number z, sec(z) = 1/cos(z).
<apply>
<function name="sec"/>
<link> z </link>
</apply>
Returns sec(z).
top
Acos
The acos token represents the complex arccosine function. It returns the complex
arccosine of the complex number z, acos(z).
<apply>
<function name="acos"/>
<link> z </link>
</apply>
Returns acos(z).
top
ASin
The asin token represents the complex arcsine function. It returns the complex
arcsine of the complex number z, asin(z).
<apply>
<function name="asin"/>
<link> z </link>
</apply>
Returns asin(z).
top
Atan
The atan token represents the complex arctangent function. It returns the complex
arctangent of the complex number z, atan(z).
<apply>
<function name="atan"/>
<link> z </link>
</apply>
Returns atan(z).
top
Acot
The acot token represents the complex arccotangent function. It returns the complex
arccotangent of the complex number z, acot(z) = atan(1/z).
<apply>
<function name="acot"/>
<link> z </link>
</apply>
Returns acot(z).
top
Acsc
The acsc token represents the complex arccosecant function. It returns the complex
arccosecant of the complex number z, acsc(z) = asin(1/z).
<apply>
<function name="acsc"/>
<link> z </link>
</apply>
Returns acsc(z).
top
Asec
The sec token represents the complex arcsecant function. It returns the complex
arcsecant of the complex number z, asec(z) = acos(1/z).
<apply>
<function name="asec"/>
<link> z </link>
</apply>
Returns asec(z).
top
Cosh
The cosh token represents the complex hyperbolic cosine function. It returns the complex
hyperbolic cosine of the complex number z, cosh(z) = (exp(z) + exp(-z))/2.
<apply>
<function name="cosh"/>
<link> z </link>
</apply>
Returns cosh(z).
top
Sinh
The sinh token represents the complex hyperbolic sine function. It returns the complex
hyperbolic sine of the complex number z, sinh(z) = (exp(z) - exp(-z))/2.
<apply>
<function name="sinh"/>
<link> z </link>
</apply>
Returns sinh(z).
top
Tanh
The tanh token represents the complex hyperbolic tangent function. It returns the complex
hyperbolic tangent of the complex number z, tanh(z) = sinh(z)/cosh(z).
<apply>
<function name="tanh"/>
<link> z </link>
</apply>
Returns tanh(z).
top
Coth
The coth token represents the complex hyperbolic cotangent function. It returns the complex
hyperbolic cotangent of the complex number z, coth(z) = 1/tanh(z).
<apply>
<function name="coth"/>
<link> z </link>
</apply>
Returns coth(z).
top
Csch
The csch token represents the complex hyperbolic cosecant function. It returns the complex
hyperbolic cosecant of the complex number z, csch(z) = 1/sinh(z).
<apply>
<function name="csch"/>
<link> z </link>
</apply>
Returns csch(z).
top
Sech
The sech token represents the complex hyperbolic secant function. It returns the complex
hyperbolic secant of the complex number z, sech(z) = 1/cosh(z).
<apply>
<function name="sech"/>
<link> z </link>
</apply>
Returns sech(z).
top
Acosh
The acosh token represents the complex inverse hyperbolic cosine function.
It returns the complex inverse hyperbolic cosine of the complex number z,
acosh(z) = ln(z + sqrt(z*z - 1.0)).
<apply>
<function name="acosh"/>
<link> z </link>
</apply>
Returns acosh(z).
top
Asinh
The asinh token represents the complex inverse hyperbolic sine function.
It returns the complex inverse hyperbolic sine of the complex number z,
asinh(z) = ln(z + sqrt(z*z + 1.0)).
<apply>
<function name="asinh"/>
<link> z </link>
</apply>
Returns asinh(z).
top
Atanh
The atanh token represents the complex inverse hyperbolic tangent function.
It returns the complex inverse hyperbolic tangent of the complex number z,
atanh(z) = 0.5*ln((1.0 + z)/(1.0 - z)).
<apply>
<function name="atanh"/>
<link> z </link>
</apply>
Returns atanh(z).
top
acoth
The coth token represents the complex inverse hyperbolic cotangent function.
It returns the complex inverse hyperbolic cotangent of the complex number z,
acoth(z) = 0.5*log((z + 1.0)/(z - 1.0)).
<apply>
<function name="acoth"/>
<link> z </link>
</apply>
Returns acoth(z).
top
Acsch
The acsch token represents the complex inverse hyperbolic cosecant function.
It returns the complex inverse hyperbolic cosecant of the complex number z,
acsch(z) = ln(1.0/z + sqrt(1.0 + 1.0/(z*z))).
<apply>
<function name="acsch"/>
<link> z </link>
</apply>
Returns acsch(z).
top
Asech
The asech token represents the complex inverse hyperbolic secant function.
It returns the complex inverse hyperbolic secant of the complex number z,
asech(z) = ln(1.0/z + sqrt(1.0/(z*z) - 1.0)).
<apply>
<function name="asech"/>
<link> z </link>
</apply>
Returns asech(z).
top
Pow
The pow token represents the complex power function. It returns the complex
number z to the power n (integer), pow(z) = zn.
<apply>
<function name="pow"/>
<link> z </link>
<number type="integer"> 4 </number>
</apply>
Returns z4.
top
Pow-z
The pow token represents the complex power function. It returns the complex
number z to the power y, pow(z) = zy.
<apply>
<function name="pow-z"/>
<link> z </link>
<number> 5.25 </number>
</apply>
Returns z5.25.
Base Lines
top
Segment-Line
The segment-line token represents the segment line function. It returns the
result of a linear interpolation between the 2 points of a point-list collection that surround
the abscissa x, segment-line(x).
<apply>
<function name="segment-line"/>
<link> x </link>
<apply>
<sequence name="point-list"/>
<apply>
<element name="point"/>
<number> 0.0 </number>
<number> 1.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 0.5 </number>
<number> 2.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 1.0 </number>
<number> 0.1 </number>
</apply>
</apply>
</apply>
if x = 0.25 returns segment-line(0.25) = 1.5.
if x = 0.75 returns segment-line(0.75) = 0.95.
top
Polynomial-Line
The polynomial-line token represents the polynomial line function. It returns the
result for the abscissa x of a polynomial interpolation throughout the points of a point-list
collection.
<apply>
<function name="polynomial-line"/>
<link> x </link>
<apply>
<sequence name="point-list"/>
<apply>
<element name="point"/>
<number> 0.0 </number>
<number> 1.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 0.5 </number>
<number> 2.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 1.0 </number>
<number> 0.1 </number>
</apply>
</apply>
</apply>
Returns polynomial-line(x).
top
Cubic-Spline
The cubic-spline token represents the cubic spline function. It returns the
result for the abscissa x of a cubic spline interpolation throughout the points of a point-list
collection.
<apply>
<function name="cubic-spline"/>
<link> x </link>
<apply>
<sequence name="point-list"/>
<apply>
<element name="point"/>
<number> 0.0 </number>
<number> 1.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 0.5 </number>
<number> 2.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 1.0 </number>
<number> 0.1 </number>
</apply>
</apply>
</apply>
Returns cubic-spline(x).
Peak Functions
top
Gaussian
The gaussian token represents the gaussian function. It returns the
result of the following expression : gaussian(x, A, Xc, w) = A exp(-4 ln2 ((x-Xc)/w)2)
<apply>
<function name="gaussian"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 40.0 </number>
</apply>
Returns gaussian(x, 2.0, 1000.0, 40.0)
top
Lorentzian
The lorentzian token represents the lorentzian function. It returns the
result of the following expression : lorentzian(x, A, Xc, w) = A/(1 + 4 ((x-Xc)/w)2)
<apply>
<function name="lorentzian"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 40.0 </number>
</apply>
Returns lorentzian(x, 2.0, 1000.0, 40.0)
top
Voigt
The voigt token represents the voigt function. It returns the
result of the following expression :
Where A is the amplitude, xc the center, gamaG the FWHM of
the gaussian and gamaL the FWHM of lorentzian.
<apply>
<function name="voigt"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 40.0 </number>
<number> 10.0 </number>
</apply>
Returns voigt(x, 2.0, 1000.0, 40.0, 10.0)
top
PearsonVII
The pearsonVII token represents the pearsonVII function. It returns the
result of the following expression :
<apply>
<function name="pearsonVII"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 40.0 </number>
<number> 6.0 </number>
</apply>
Returns pearsonVII(x, 2.0, 1000.0, 40.0, 6.0)
top
Sgl
The sgl token represents a mixing of gaussian and lorentzian functions. It returns the
result of the following expression : sgl(x, A, Xc, w, f) = f gaussian(x, A, Xc, w) + (1-f) lorentzian(x, A, Xc, w)
<apply>
<function name="sgl"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 40.0 </number>
<number> 0.5 </number>
</apply>
Returns sgl(x, 2.0, 1000.0, 40.0, 0.5)
top
Laplace
The sgl token represents the laplace functions. It returns the
result of the following expression :
<apply>
<function name="laplace"/>
<link> x </link>
<number> 2.0 </number>
<number> 1000.0 </number>
<number> 20.0 </number>
<number> 10.0 </number>
</apply>
Returns laplace(x, 2.0, 1000.0, 20.0, 10.0)
Absorption Profiles
top
Phonon-3p
The phonon-3p token represents the 3 paramaters phonon function. It returns the
result of the following expression :
<apply>
<function name="phonon-3p"/>
<link> x </link>
<number> 0.5 </number>
<number> 1000.0 </number>
<number> 10.0 </number>
</apply>
Returns phonon-3p(x, 0.5, 1000.0, 10.0)
top
Phonon-4p
The phonon-4p token represents the 4 paramaters phonon function. It returns the
result of the following expression :
<apply>
<function name="phonon-4p"/>
<link> x </link>
<number> 1000.0 </number>
<number> 10.0 </number>
<number> 1020.0 </number>
<number> 10.0 </number>
</apply>
Returns phonon-4p(x, 1000.0, 10.0, 1020.0, 10.0)
top
Phonon-anharmonic
The phonon-anaharmonic token represents an anharmonic version of the phonon
function. It returns the result of the following expression :
<apply>
<function name="phonon-anharmonic"/>
<link> x </link>
<number> 0.5 </number>
<number> 1000.0 </number>
<number> 100.0 </number>
</apply>
Returns phonon-anharmonic(x, 0.5, 1000.0, 100.0)
top
Phonon-anharmonic-i
The phonon-anaharmonic-i token represents an anharmonic version of the phonon
function. It returns the result of the following expression :
<apply>
<function name="phonon-anharmonic-i"/>
<link> x </link>
<number> 0.5 </number>
<number> 1000.0 </number>
<number> 100.0 </number>
</apply>
Returns phonon-anharmonic-i(x, 0.5, 1000.0, 100.0)
top
Drude
The drude token represents the drude absorption profile. It returns the result of
the following expression :
<apply>
<function name="drude"/>
<link> x </link>
<number> 1000.0 </number>
<number> 100.0 </number>
</apply>
Returns drude(x, 1000.0, 100.0)
top
Plasmon
The plasmon token represents the absorption profile induced by a plasmon.
It returns the result of the following expression :
<apply>
<function name="plasmon"/>
<link> x </link>
<number> 1000.0 </number>
<number> 20.0 </number>
<number> 100.0 </number>
</apply>
Returns plasmon(x, 1000.0, 20.0, 100.0)
top
debye
The debye token represents the Debye absorption profile.
It returns the result of the following expression :
<apply>
<function name="debye"/>
<link> x </link>
<number> 1000.0 </number>
<number> 100.0 </number>
</apply>
Returns debye(x, 1000.0, 100.0)
Sequences - Elements
top
Number-List
The number-list token constructs a container for number elements. This container
stores an indefinite number of values that constitute arguments for special functions.
<apply>
<sequence name="number-list"/>
<number> 0.0 </number>
<number> 1.0 </number>
<number> 2.0 </number>
<number> 3.0 </number>
</apply>
top
Point-List
The point-list token constructs a container for point elements. This container
stores an indefinite number of points that constitute arguments for special functions such as the
base lines functions.
<apply>
<sequence name="point-list"/>
<apply>
<element name="point"/>
<number> 0.0 </number>
<number> 1.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 1.0 </number>
<number> 2.0 </number>
</apply>
<apply>
<element name="point"/>
<number> 2.0 </number>
<number> 3.0 </number>
</apply>
</apply>
top
Point
The point token is a representation of a (x, y) point. This token is the unique element that
can appear in a point-list sequence.
<apply>
<element name="point"/>
<number> 0.0 </number>
<number> 1.0 </number>
</apply>
top
Dual-List
The dual-list token constructs a container for dual elements. This container
stores an indefinite number of dual elements that can constitute arguments for special functions.
<apply>
<sequence name="dual-list"/>
<apply>
<element name="dual"/>
<link> E1 </number>
<link> d1 </link>
</apply>
<apply>
<element name="dual"/>
<link> E2 </link>
<number> 0.1 </number>
</apply>
<apply>
<element name="dual"/>
<number> 2.5 </number>
<number> 0.05 </number>
</apply>
</apply>
top
Dual
The dual token is a container for 2 arguments. This token is the unique element that
can appear in a dual-list sequence.
<apply>
<element name="dual"/>
<link> E </link>
<number> 1.0 </number>
</apply>
|