<div dir="ltr">Dear Tiago,<div><br></div><div>First of all, DO NOT use pop_eegfilt(). Instead, use pop_eegfiltnew(). This newer version is better.</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:helveticaneue,'helvetica neue',helvetica,arial,'lucida grande',sans-serif;font-size:13px">> My question is: Can filtering at two different times compromise the reliability of the collected signal? (ie, in addition to the artifact, am i taking out brain information that compromises the interpretation of the data?)</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Secondly, apply filters only on continuous data. If you apply it on epoched data, data are windowed near boundaries (i.e. both edges).</div><div class="gmail_extra"><br></div><div class="gmail_extra">If you are interested in an example of preprocessing steps, see this wiki page.</div><div class="gmail_extra"><a href="https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Alternatively.2C_cleaning_continuous_data_using_ASR_.2811.2F30.2F2016_updated.29">https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Alternatively.2C_cleaning_continuous_data_using_ASR_.2811.2F30.2F2016_updated.29</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 28, 2016 at 8:04 AM, tiago lopes <span dir="ltr"><<a href="mailto:tiago.lopes56@yahoo.com" target="_blank">tiago.lopes56@yahoo.com</a>></span> wrote:<br><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 style="color:rgb(0,0,0);font-family:helveticaneue,'helvetica neue',helvetica,arial,'lucida grande',sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4909">Hello Dears,</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4909" dir="ltr">I am developing an experiment where i try to evaluate the thalamocortical dysrhytimia in individuals with chronic pain.</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4909" dir="ltr">In order to improve the quality of the collected signal eeg by the removal of artifacts, i am filtring in two different moments:</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4909" dir="ltr">A) Before dividing into epochs</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4909" dir="ltr">B After being divided into epochs  </div><div></div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914"><br></div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914">My question is: Can filtering at two different times compromise the reliability of the collected signal? (ie, in addition to the artifact, am i taking out brain information that compromises the interpretation of the data?)</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914"><br></div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914">Below is the script used in data processing.</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914">Thanks a lot for the help.</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914"><br></div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4914"><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5893">path ='C:\Users\Tiago Lopes\Documents\MATLAB\Script\<wbr>REPOUSO E IMG\01 Set epochs e ICA (REPOUSO)\';</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5894">epochs ='C:\Users\Tiago Lopes\Documents\MATLAB\Script\<wbr>REPOUSO E IMG\TABELA DE EVENTOS 5000ms.txt';</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5895">name=strcat(path,'*.ASC');</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5896">d=dir(name);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5897"><br id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5898"></div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5899">for j=1:length(d)</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5900">    filename = d(j).name;</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5901">    EEG = pop_loadbci( filename, 600 );</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5902">    EEG = pop_select( EEG,'nochannel',{'FOTO'});</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5903">    EEG = pop_select( EEG,'nochannel',{'EMGd' 'EMGm'});</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5904">    EEG = pop_chanedit(EEG, 'lookup','standard-10-5-<wbr>cap385.elp');</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5905">    EEG = pop_reref( EEG, [] );</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5906">    EEG = pop_eegfilt( EEG, 0.5, 30, [], [0], 0, 0, 'fir1', 0);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5907">    EEG = pop_importevent( EEG, 'event',epochs,'fields',{'<wbr>type' 'latency'},'skipline',1,'<wbr>timeunit',0.001);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5908">    EEG = pop_epoch( EEG, {  }, [-.420 4.580], 'epochinfo', 'yes');</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5909">    EEG = pop_rmbase(EEG,[-300 0]);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5910">    EEG = pop_eegfilt( EEG, 1.80, 30, [], [0], 0, 0, 'fir1', 0);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5911">    EEG = pop_epoch( EEG, {  }, [-.420 4.580], 'epochinfo', 'yes');</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5912">    EEG = pop_rmbase(EEG,[-300 0]);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5913">    EEG = pop_runica(EEG, 'extended',1,'interupt','on');</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5914">    EEG = pop_subcomp( EEG, [1 2], 0);</div><div id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5915">    EEG = pop_saveset( EEG, 'filename',d(j).name,'<wbr>filepath',path);</div><div dir="ltr" id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5918">end</div><div dir="ltr" id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5918"><br></div></div><div class="gmail-m_-7242128591002758275signature" id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_4935"><font size="2" color="#003333">Att</font><font size="2" id="gmail-m_-7242128591002758275yui_3_16_0_1_1480344000185_5987">. Tiago Lopes</font></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div></div>