Macro Language: Calculation Commands

fg <axis> <min> <max> <steps> <expr>

Generate a function with the given parameters.
<axis>: The target axis (1 = X axis, 2 = Y axis)
<min>, <max>: The range for the new generated function.
<steps>: Number of steps for the the function.
<expr>: Expression which defines the function.

bcalc <buffer1> <operator> <buffer2>

Performs basic calculations between two buffers. This work also for buffers with different X axis and different numbers of data points. Only the overlapping area will be processed and missing points will be interpolated.
<operator>: + - * /

calc <data> <expr> <BUFFER>

Performs a calculation on the data in the buffers.
<data>: The target axis (1 = X values, 2 = Y values, 3 = X error, 4 = Y error)
<expr>: Expression which defines the calculation.

swapxy <BUFFER>

This function swaps the X and Y values. Error values will also be swapped if available.

normx <ref1> <ref2> <new1> <new2> <BUFFER>

This function manipulates the buffers by stretching or shrinking along the X axis. The specified reference points in the data are changed in such a way that the ref1 value becomes the new1 value and the ref2 value becomes the new2 value.

normy <ref1> <ref2> <new1> <new2> <BUFFER>

This function manipulates the buffers by stretching or shrinking along the Y axis. The specified reference points in the data are changed in such a way that the ref1 value becomes the new1 value and the ref2 value becomes the new2 value.

movex <from> <to> <BUFFER>

This function moves the buffers on the X axis.

movey <from> <to> <BUFFER>

This function moves the buffers on the Y axis.

cutoutsidex <min> <max> <BUFFER>

These function deletes all data points in the buffers which are not in the X range between min and max

cutinsidex <min> <max> <BUFFER>

These function deletes all data points in the buffers which are in the X range between min and max

cutoutsidey <min> <max> <BUFFER>

These function deletes all data points in the buffers which are not in the Y range between min and max

cutinsidey <min> <max> <BUFFER>

These function deletes all data points in the buffers which are in the Y range between min and max

calcint <min> <max> <BUFFER>

Integrates the buffers and add the result to the comment field. The result of the last integration is stored in the variable integral.

linreg <min> <max> <BUFFER>

Perform a linear regression between min and max. The result of the last regression will be stored in the variables rega, regb and regr.

logreg <min> <max> <BUFFER>

Perform a logarithmic regression between min and max. The result of the last regression will be stored in the variables rega, regb and regr.

expreg <min> <max> <BUFFER>

Perform a exponential regression between min and max. The result of the last regression will be stored in the variables rega, regb and regr.

linbg <a> <b> <BUFFER>

Perform a linear background subtraction (y=y+a+bx)

splinefit <use exclude> <exclude min> <exclude max> <corr mode> <corr factor> <corr func> <sigma mode> <sigma value> <order> <minmax> <derivative> <points> <BUFFER>

Performs a spline fit. For a detailed description of the parameters click here.
<use exclude>: Boolean value. If true use the exclude range.
<exclude min>, <exclude max>: Defines the exclude range.
<corr mode>: The correlation mode (0=ignore, 1=detect, 2=manual)
<corr factor>: Used for the manual correlation mode option.
<corr func>: Assumed correlation function (0=exponential, 1=gaussian, 2=linear, 3=sinc)
<sigma mode>: Info on errors In Y (0=none, 1=from error data, 2=fixed value, 3=significant digits)
<sigma value>: Used for the 'fixed value' and 'significant digits' options.
<order>: The spline order.
<minmax>: Boolean value. If true buffers for minima and maxima will be generated.
<derivative>: Boolean value. If true a buffer for the derivative will be generated.
<points>: Number of points for the spline result and derivative buffers.
<BUFFER>: The buffers witch should be spline fitted.

smooth <factor> <BUFFER>

This functions uses factor as the effective smooth width and performs a least square smooth to reduce the noise on the buffer.

fftsmooth <factor> <BUFFER>

This functions uses factor as the effective smooth width and performs a FFT based smooth to reduce the noise on the buffer (see sources).

datareduction <n> <BUFFER>

Sometimes it is useful to reduce a large number of data points which consist mainly of noise to a more practical amount of points. This function takes n points, builds the average, and replaces the n points with the new one.

spline <points> <strength> <BUFFER>

This function calculates a nonparametric cubic spline interpolation (see sources).
<points>: Defines the number of points which should be calculated for each interval.
<strength>: Defines the strength of the interpolation. 2 is in most cases a god choice.

fft <windowing> <BUFFER>

Performs a Fast Fourier Transform and generates a new buffer with the result.
<windowing>: 1=none, 2=Hanning, 3=Welch, 4=Parzen

diff <interval> <BUFFER>

Differentiate the buffers and generate new buffers with the result data (see sources).

integrate <BUFFER>

Integrates buffers and generate new buffers with the result data.

setxval <BUFFER> <index> <value>

Set X value at the given index of the buffers.

setyval <BUFFER> <index> <value>

Set Y value at the given index of the buffers.

setxeval <BUFFER> <index> <value>

Set X error value at the given index of the buffers.

setyeval <BUFFER> <index> <value>

Set Y error value at the given index of the buffers.

xpssatsub <anode> <BUFFER>

Performs a X-ray satellite subtraction for the given buffers
<anode>: 0=Mg, 1=Al

shirleybg <xstart> <ystart> <xend> <yend> <BUFFER>

performs a Shirley background subtraction for the given buffers