<div dir="ltr">In addition to the last questions: <div>4) What should the Max passband deviation be 0.001 or 0.0001?</div><div>5) What should the transition bandwith be? 3.6 or 5.0?</div><div><br></div><div>Best,</div><div><br></div><div>Eric</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 3:07 PM, Eric HG <span dir="ltr"><<a href="mailto:erichg2013@gmail.com" target="_blank">erichg2013@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andreas and Makoto,<div><br></div><div>Thank you very much for your responses! I've been trying to adapt the function for windowed sinc FIR filter as you suggested with Kaiser as window type (Widmann et al. 2015):</div><div><br></div><div>EEG = pop_firws(EEG, 'fcutoff', [1 70], 'ftype', 'bandpass', 'wtype', 'kaiser', 'warg', 5.65326, 'forder', 1812, 'minphase', 0);</div><div><br></div><div>However, I have some questions about the use:</div><div>1) Is this the best way to use a FIR filter?</div><div>2) Is there any way to estimate the "Kaiser window beta" ('warg') without using the GUI?</div><div>3) Is there a way to estimate the filter order ('forder') without using the GUI?</div><div><br></div><div>Best,</div><div><br></div><div>Eric</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 2, 2015 at 8:02 PM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Eric,<span><div><br></div><div>> The only major difference is that you define passband edges in pop_eegfiltnew but half amplitude (-6 dB) cutoffs in the windowed sinc filter.<br></div><div><br></div></span><div>For details, see below.</div><div><a href="https://cloud.github.com/downloads/widmann/firfilt/firfilt.pdf" target="_blank">https://cloud.github.com/downloads/widmann/firfilt/firfilt.pdf</a><br></div><div><a href="http://sccn.ucsd.edu/wiki/Firfilt_FAQ" target="_blank">http://sccn.ucsd.edu/wiki/Firfilt_FAQ</a><br></div><div><br></div><div>Makoto</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Aug 30, 2015 at 11:20 AM, Andreas Widmann <span dir="ltr"><<a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>Hi Eric,<br>
<span><br>
> I have some questions about both cleanline and the basic FIR filter:<br>
><br>
> 1) Do you have any recommendation about which one should be used first? At the moment I'm doing this (cleanline first and then bandpass filtering):<br>
</span>Highpass filtering should be done before cleanline. Cleanline expects stationary data. See Nima’s recent paper for a more detailed explanation (Bigdely-Shamlo N, Mullen T, Kothe C, Su K-M and Robbins KA (2015) The PREP pipeline: standardized preprocessing for large-scale EEG analysis. Front. Neuroinform. 9:16. doi: 10.3389/fninf.2015.0001). Consider the „temporary highpass“-solution suggested there in applications not requiring a highpass otherwise.<br>
<span><br>
> [EEG, Sorig, Sclean, f, amps, freqs, g] = pop_cleanline(EEG, 'Bandwidth',2,'ChanCompIndices',[1:EEG.nbchan], ...<br>
>                           'SignalType','Channels','ComputeSpectralPower',true,             ...<br>
>                           'LineFrequencies',[50 100] ,'NormalizeSpectrum',false,           ...<br>
>                           'LineAlpha',0.01,'PaddingFactor',2,'PlotFigures',false,          ...<br>
>                           'ScanForLines',true,'SmoothingFactor',100,'VerboseOutput',1,    ...<br>
>                           'SlidingWinLength',EEG.pnts/EEG.srate,'SlidingWinStep',EEG.pnts/EEG.srate);<br>
><br>
> EEG = pop_eegfiltnew(EEG, 1, 70, 1650, 0, [], 1);<br>
><br>
> 2) I'm doing the filtering before epoching the data (on continuous data). Can that lead to any problem with the filtering?<br>
</span>Filtering should always be done on the continuous data!<br>
<span><br>
> In cleanline: Both the 'SlidingWinLength' and 'SlidingWinStep' are the length of the recording. However, the 'SmootingFactor is 100, which shouldn't matter when the window length = EEG length.<br>
><br>
> 3) Is there an easy way to figure out the filter order for pop_eegfiltnew? The current 1650 is just what was decided through the GUI.<br>
</span>Use the windowed sinc FIR filter to manually adjust the filter order. pop_eegfiltnew is just a front-end for the windowed sinc filter with hardcoded hamming window and a default heuristic for filter order as explained in the help text. The only major difference is that you define passband edges in pop_eegfiltnew but half amplitude (-6 dB) cutoffs in the windowed sinc filter.<br>
<br>
Hope this helps! Best,<br>
Andreas<br></div></div>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</font></span></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>