Macros: Baseline

Baseline is a simple correction where a line is subtracted from a wave.

The most common baseline correction involves calculating a linear function that will satisfy two values in Y wave at positions specifies by a user. A simpler variety uses a single reference point and applies scalar offset to the entire spectrum. In both cases reference values can be obtained from a single value in the wave or by averaging together a range of values (frame).

User can specify reference positions by either point number P or x value X - calculations are identical. The choice between point-based and value-based baselines depends on user. For evenly-spaced calibrations both are interchangeable. For uneven calibration (such as random time sampling) value-based approach should be used.

    Point-based baseline macro (BLine2D_Points) needs to know three parameters:
  • two base points
  • half-frame, which tells macro over what range to average points
  • a wave to apply baseline to
Since point number is a discrete value, you should use only integer numbers for point referece, otherwise it may be truncated.

Value-based baseline macro (BLine2D_Values) in addition will need a wave specifying X values for chosen Y wave. If base value x does not correspond to an exact value in X wave, base value y will be calculated by interpolation from two exact y- and y+ values at points x- and x+ that are closest to the specified value x.

A particular form of baseline macro (BLine2D_Window_Points) applies baseline to all waves plotted in the top window. This form will get both names of waves and corresponding X waves (BLine2D_Window_Points) from the graph itself.

Currently only a point-based basine macro (BLineMatrix_Points) can be applied to a matrix. This limitation is because Igor curretlu does not have right iterpolation function for multidimensional waves. For matrises baseline is calculated only for columns (dimension 0) for practial reason, although it can be calculated for rows just as well.

The base offset -style calculations are identical to the two-point base line style, except that corresponding macros take a single reference point, not two.

 

Comments