Home > Software > WinDaq Playback Software (WWB) > Forum > After using the moving average filter to generate a filtered channel, I notice that it has averaged data across event markers. This can introduce errors into the filtered data, so how can it be avoided?

After using the moving average filter to generate a filtered channel, I notice that it has averaged data across event markers. This can introduce errors into the filtered data, so how can it be avoided?

Mar 19, 2015
Andrew Tustison wrote
It will introduce errors if, for example, data in one trace varies between 1 and 2 while data in the adjacent trace varies between 5 and 6, then if the data is averaged across the event marker it will skew the max for the first trace too high and the min for the second trace too low. How can this be avoided?
Reply
3 Answers
Mar 20, 2015
DATAQ Support agent wrote
Event markers are not part of the data stream. So, their presence will have no impact on averaged data or an other calculation.
Mar 20, 2015
Ken agent wrote
To avoid the errors, separately filter each data segment starting with an acquisition start:

1. Filter the entire file, creating a channel with the errors that you mentioned. With Edit Compression set to 1, press Ctrl+Home to move to start of file and check Options Enable Time Marker. Click Options, Select Marker Display, and check "Samples from Marker". Press F8, click to highlight each acquisition start (Event # followed by a "*"), and click OK to go there. Write down each start Event # with its sample number (integer before "SMP (TM)") for use in combining filtered data segments into the original file.

2. Press F8. If the highlighted event marker is not an acquisition start, click to highlight the next acquisition start. Click OK to move to the start of a segment. Press F4 twice to move Time Marker to the start of the segment. Press F8 again and click the following acquisition start, and click OK to move there. If there is no following acquisition start, click Cancel and press Ctrl+End to move to end of file. Otherwise hold down the Shift key and press the left arrow key to move to the last sample in the previous segment.

3. Press Ctrl+V, make sure that "Visible channels only" is not checked, select format "8) CALC". For "File name:" enter the segment start sample number that you wrote down with a trailing "." for a null extension, and click Save to create a file from the segment and invoke Advanced CODAS on it. Filter the segment, using the same source and destination channel numbers and smoothing factor as in the original file. Exit Advanced CODAS.

4. Hold down Shift and press right arrow to move one sample right to the next acquisition start. Press Alt+M to invoke Advanced CODAS, press Enter to "Save All", and use Advanced CODAS (C)opy Channel to copy the filtered segment into the main file. Enter destination channel number in the original file and use that same number for the source channel. Enter the segment start sample number as the "start point in dest channel" and "source filename". Enter 0 for "start point in source channel". After the copy completes, exit Advanced CODAS. Upon return to WWB, observe that the averaged errors to the left of cursor have be corrected. If you are not at the end of the file, go to back to step 2.

5. Press F8 and move to each acquisition start to verify that the errors in the filtered destination channel have all been corrected. Check the destination directory to make sure that there is a null-extension file for each segment start point on your list, and delete those files.
Mar 20, 2015
Andrew Tustison wrote
Thanks for the quick response and the instructions, I will try it.