The top (largest) panel of the dialog is a series of filter icons, showing where your data are coming from, and what is being done to them before they are displayed. The first (leftmost) icon is called the datafile filter. It's not really a filter, since it has no input: it just hooks up to a datafile and provides data to subsequent filters, or to the plot window. The second panel is a high-pass filter: this is like a single-pole electronic RC filter. The third filter is a minimax filter. It throws out most of the data points, meaning that the plot will display faster, although it won't reflect the actual data as precisely. (The different filter types are explained in detail below.)
Notice that the high pass filter looks pushed in. This indicates that it is the current filter. The delete button deletes it. The insert button inserts a filter after it. The parameter panel, which is just below the filter panel, shows the parameters of the current filter. The high pass filter has one parameter, its cut-off frequency. In this example the cut-off frequency is 2 Hz (assuming that you have set the units of time to seconds). You can change the frequency by typing a new value in the text field and hitting return.
To make another filter the current filter, just click the mouse on it. The parameter panel below will rearrange to reflect the new current filter.
When you click Insert, the Filter Selection dialog box pops up:
xdatplot version 0.2 offers you a choice of 7 types of filters. To choose one, just double-click the mouse on it. It will be inserted after the current filter, becoming the new current filter. If this is the first such filter you've used, the parameters will be default values (which you can set; see customization). You can edit these parameters in the filter dialog.
The datafile filter
The first filter in the filter chain is always a datafile filter, if
you have a file open. It has one parameter: the pathname of the
datafile. Changing the name is equivalent to opening a new file in
the File Open... dialog box.
High-pass filters
The high-pass filter is a simple single-pole filter, like an RC
filter:
The high pass filter comes in two flavors, tau specified and frequency specified. These are identical, except that the parameter of the tau specified version is the time constant, while the parameter of the frequency-specified is the -3 decibel frequency. The relationship is tau = 1/(2 Pi f Sqrt[3]).
Low-pass filters
The low-pass filter is a simple single-pole filter, like an RC
filter:
The low pass filter comes in two flavors, tau specified and frequency specified. These are identical, except that the parameter of the tau specified version is the time constant, while the parameter of the frequency-specified is the -3 decibel frequency. The relationship is tau = Sqrt[3]/(2 Pi f).
The minimax filter
The minimax filter is for data compression. It replaces groups of
points with two points each, the minimum point in the group and the
maxmimum point in the group. (The order of the two points in the
output is that same as in the input.) This method of compression
ensures that the envelope of the plot will be unchanged. If the
number of input points is large relative to your display resolution,
the appearance of the plot will be unchanged. The minimax filter has
one parameter, N, the number of points in each group. Thus, for every
N points into the filter, 2 points come out, so the compression is
N/2.
The minimax filter is useful if you want a quick overview of a lot of data. It is even more useful for printing or exporting postscript or MIF files of a plot on a large time scale.
The minimax filter is most useful as the last filter in the chain. In other positions, it can cause some strange effects. (High pass filtering of minimaxed data, for instance, can cause brand-new peaks to appear.) You should also realize that, because some points are being discarded, the positions of marks will not be accurate when a minimax filter is in use.
The scale filter
The scale filter simply multiplies the data by a factor. It is
somewhat redundant with the V Gain fields of the units dialog,, but the scale factor can be
negative; V Gain can't.
The pick filter
The pick filter is xdatplot's kludge for looking at multichannel
files. The two parameters are Start, the number of the channel you
want to look at (0 for the first, 1 for the second, etc) (yes, I
program in C), and the second parameter is the total number of
channels.
The assumption behind the pick filter is that a 3-channel recording (for instance) contains the data for channels 0, 1, and 2 at time 0, and 0, 1, 2 at time 1, then 0, 1, 2 at time 2, etc. If you set Start to 0 and N to 3, it simply picks out points 0, 3, 6, ..., which under these assumptions will be channel zero. If you set Start to 1, it picks out 1, 4, 7, ..., which is channel 2.
Leon Avery (leon@eatworms.swmed.edu)