Download Here - CCP

Transcript
3.15.2
Functions
The maths parser in EPOCH has the following functions
• abs(a) - Absolute value.
• floor(a) - Convert real to integer rounding down.
• ceil(a) - Convert real to integer rounding up.
• nint(a) - Convert real to integer rounding to nearest integer.
• sqrt(a) - Square root.
• sin(a) - Sine.
• cos(a) - Cosine.
• tan(a) - Tangent.
• asin(a) - Arcsine.
• acos(a) - Arccosine.
• atan(a) - Arctangent.
• sinh(a) - Hyperbolic sine.
• cosh(a) - Hyperbolic cosine.
• tanh(a) - Hyperbolic tangent.
• exp(a) - Exponential.
• loge(a) - Natural logarithm.
• log10(a) - Base-10 logarithm.
• log base(a,b) - Base-b logarithm.
• gauss(x, x0 , w) - Calculate a Gaussian profile in variable x centred on x0 with a characteristic width
2
w. f (x) = exp
√ (−((x − x0 )/w) ). In this expression the full width at half maximum is given by
f whm = 2w ln 2
• supergauss(x, x0 , w, n) - This is identical to “gauss” except it takes a fourth parameter, n, which
is the power to raise the exponential argument to.
• semigauss(t, A, A0 , w) - Calculate a semi Gaussian profile in variable t with maximum amplitude
A, amplitude at t = 0 A0 and width w. The parameter A0 is used to calculate t0 , the point at
which the Gaussian reaches its maximum value. For t less than t0 the profile is Gaussian and for
t greater than t0 it is the constant A.
p
t0 = w − ln (A0 /A)
(
A exp (−((t − t0 )/w)2 ), t < t0
f (t) =
A,
otherwise
• interpolate(interp var,....,n pairs) - Linear interpolation function, explained later.
• if(a,b,c) - Conditional function. If a != 0 the function returns b, otherwise the function returns c.
49