Filter FD Tool - nickcounts/MDRT GitHub Wiki
FilterFdTool()
This tool is intended to simplify the post-processing of noisy (or large and unwieldy) sensor data. It may be run as a stand-alone tool for manipulating MDRT data files, or launched from the MDRT interface.
How to use the filter tool
Most users will use this tool as part of MDRT's suite of data processing options. When launched from MDRT, the tool will launch with whatever FD has been selected in the MDRT FD Selection Dropdown. When launched from the Matlab command line using filterFdTool
, the tool will open with a simple dummy signal as shown below:
The GUI has several controls available to the user.
NOTE the beta release (v0.4.5) only implements "Smooth Data" and the other options have no effect.
- Gaussian Window Size (points) By updating the slider or textbox, you change the size of the Gaussian distribution used to weight the smoothing function. Values in the middle of the window are weighted most heavily.
- Units: points
- How many "data points" are in the gaussian weight array.
- Units: points
- Time Average Window (seconds) By updating the slider or textbox, you change the size of the window used to calculate the moving average.
- Units: seconds
- How much time the sliding average uses at each step. (Calculated using Data Sample Rate)
- Units: seconds
- Data Sample Rate (Hz) By updating this slider or textbox you set the sample rate of the original data. This information is used to determine how many data points are used by the moving average window. The initial value is an estimate based on the total duration of the data and the number of samples in the data. NOTE It is not recommended to modify this value unless you know that the estimated value is incorrect.
- Units: Hz
- The number of samples per second in your data.
- Units: Hz
Smoothing your data
The standard pan and zoom tools are available so you can check the details of your original and filtered signals. As you drag the sliders (or update the values in the textboxes) the filtered signal will update live.
Additional Information
Loading and Saving
The Load and Save buttons use the MDRT configuration information if available to make a guess as to what folder and filename to load/save.
Filtered files will have "filtered" appended to their name and metadata information for clarity when using the review tool.
The v0.4.5 tool does not automatically re-index the data set after saving a filtered file.
Bugs:
There is a known bug in the v0.4.5 release where loading a data file with fewer points than the default gaussian window size (100) will cause the tool to crash.
Function documentation for command line use:
Valid function calls:
- filterFdTool( fullFileString ) Launches the tool and attempts to load the file specified by fullFileString.
fullFileString
is a char array that is a complete and valid path to a file.- if
fullFileString
points to an invalid file, the tool should launch and open a Select File dialog.
- filterFdTool( ) Launches the tool with dummy data.
From the function's help file:
Launches a GUI tool for data smoothing and filtering
filterFdTool() Launches the tool in demo mode with dummy data.
filterFdTool(fullFile) launches the tool and loads the contents
of fullFile.
This tool is designed to work with data files produced by
MDRT. Data files will contain a structure 'fd' which
contains a timeseries 'ts'.