Sandbox

From SCCN
Jump to: navigation, search

Edit this page

This "sandbox" page is to allow you to carry out experiments. Please feel free to try your skills at formatting here. If you want to learn more about how to edit a wiki, please read this introduction or the tutorial at Wikipedia.

To edit, click here or "edit" at the top of the page, make your changes in the dialog box, and click the "Save page" button when you are finished. Please refrain from adding material that is any way offensive, that is copyrighted, or that is at all libelous.


Content added here will not stay permanently; this page is cleared regularly. Click here to reset the sandbox.

Testing Area

the 'Basic FIR filter (new)' should NOT give 8251 points as default value for 1-100Hz (ends of passband, not cutoff! see UI!) bandpass with fs=500. There must be something wrong. Here it defaults to 1651 points. Please, recheck and confirm whether you can replicate this behavior. In case yes, please send the output of eegh.

Speed: The firfilt-plugin does not use filtfilt to get zero-phase but shifts by group delay. So, the data are only filtered once with the 'new' function. Additionally, filtfilt seems not to be multi-threading capable. The new function use just plain filter function and can thus make use of multiple CPU cores with recent MATLAB versions.

Ripples: are defined by the window function. Both, Hamming for new and old (fir1 not firls based!), so no difference.

Filter length: defines the filters transition band width. This makes a practical difference in almost all cases. The impact can appear to be low, as you observed, in some special cases when the transition band goes below 0Hz/DC. However, this has usually adverse side effects as e.g. reduced attenuation at DC and is recommended only if you really know exactly what you do. Try to play around with different transition band widths in the windowed sinc function of the plugin to get a feeling for the filter length and frequency responses.

The default estimate of the old 'legacy' function is based on a wrong formula applied incorrectly. It appears to give a reasonable value for highpass (and bandpass) filters but at the cost of applying a wrong cutoff frequency (deviating from the value given in the UI and different for firls and fir1, thus additionally breaking backward compatibility). It is complete non-sense for lowpass filters. To be honest, I completely lack any understanding why the errors are still there after being known for more than 6 years and having a working alternative also for about 6 years. This kind of problems has a considerable impact on the reputation of EEGLAB in the community. I indeed got some interesting comments in this direction in response to the Frontiers paper on filtering.

Personal tools
SCCN Toolboxes