<div dir="ltr">Dear Masoud,<div><br></div><div>ICA can certainly help you with removing artefacts from eye movements and eye blinks, and perhaps ECG artefacts. Please see the following documentation for explanation and use case:</div><div><a href="https://www.fieldtriptoolbox.org/tutorial/artifacts/">https://www.fieldtriptoolbox.org/tutorial/artifacts/</a><br></div><div><a href="https://www.fieldtriptoolbox.org/example/ica_eog/">https://www.fieldtriptoolbox.org/example/ica_eog/</a><br></div><div><a href="https://www.fieldtriptoolbox.org/example/ica_ecg/">https://www.fieldtriptoolbox.org/example/ica_ecg/</a><br></div><div><br></div><div>Before you do ICA you can reference (I assume to a common reference), especially if your original reference you recorded with is bad. Otherwise, I don't think it would matter much. But definitely don't do any "clinical" or "sleep" referencing that reference against different electrodes (i.e. nothing but either a single, linked or average reference).</div><div><br></div><div>In general, I would not remove too much slow activity (hp filter) yet, but "give it to the ICA" to better estimate EOG components (which include slow activity). Same for downsampling, I would not do it (too much) beforehand, as you want to be able to unmix EOG/ECG artefacts. It all depends on the compromise between time/memory, as downsampling can drastically reduce time/memory use for ICA. But this is all relative to the quality of your data: ICA does a better job when it has good data to work with, and if you can remove a lot of slow drifts and e.g. 50/60Hz noise, it will be able to unmix the data in useful EOG/ECG components. A high-pass of 1Hz sounds reasonable to me. </div><div><br></div><div>Similarly, if you have a very noisy channel and not that many electrodes, removing it beforehand might help the ICA to unmix the artefacts of interest and not "spend components" on the noisy electrode. In fact, I would not use ICA to remove noisy channels, as that might introduce some uncontrolled changes in the rest of your channels, as components in my experience rarely pick up only one noisy electrode (always check the topographies of the components), and even if does so, you wasted a component on it. </div><div><br></div><div>In fact, ICA for artefact detection works best if you have sufficient electrodes, so it can unmix the data in enough (and detailed enough) components. You will only get n components, with n being the number of electrodes. If you have say only 8 electrodes, you might want to reject trials with e.g. blinks instead, rather than relying on ICA and remove several 1/8th of your data. If you have separate EOG channels it will allow you to better identify EOG components. Always check your component time courses and topographies, and be confident that the unmixing worked well, and the component represents a clear EOG/ECG component before you remove it. In contrast, rejecting trials will always be 100% successful in removing the artefact :).</div><div><div><br></div><div></div></div><div>ICA is not a sure success, but it can be very impressive. In the end, it depends on the details of your data and experiment, so some empirical tests could be the most informative.  The questions you ask are good ones, and at the end of the day you might just want to try out different ways and see what works best for you. My experience is mainly with MEG, and even there we used to try out what works best before deciding what to do for the rest of the study. One important consideration is whether it works for all datasets in your study. E.g. I wouldn't turn things around for a single subject with a bad reference, but I would also like to try to treat every dataset the same.</div><div><br></div><div>I hope this helps,</div><div>Stephen</div><div><br></div><div>P.s I now see you preprocess your data in EEGlab first - before analysing in FieldTrip? Please note that the code for ICA is shared between EEGlab and FieldTrip. My answer does not consider what is more practical when having to navigate between them.  </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 16 Apr 2022 at 13:27, masoud via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear fieldtrip community<div><div style="border-left:none;padding:0px;display:flex;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div style="margin:0px;padding:0px 0px 20px;width:1104px"><div><div id="gmail-m_-7529088973020716704gmail-:p9" style="direction:ltr;margin:8px 0px 0px;padding:0px;font-size:0.875rem"><div id="gmail-m_-7529088973020716704gmail-:p8" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif;overflow:hidden"><div dir="ltr"><div dir="auto">I hope this email finds you well. I am writing to you with the hope that you might be able to help me to find a proper answer for a question which I have been dealing with.</div><div dir="auto"><br></div><div dir="auto">I am a master student in Biomedical Engineering and I've been using the EEGlab toolbox to preprocess the acquired EEG data for my master thesis.</div><div dir="auto"><br></div><div>My question is about EEG preprocessing orders, more specifically when is more suitable to apply ICA  to my data. In my current setting, first, I downsample data and use a hp filter (cut-off frequency is 1 Hz), then I interpolate the suspected bad channels, but I don't know if I should use ICA and then use re-referencing or vice versa?</div><div><br></div><div>Although I know there is no definite answer for this question, it would be highly appreciated if you kindly share your opinion and experience as an expert in this field  with me, and let me know if my current preprocessing setting is appropriate and, specifically, should I use re-referencing after ICA or before that?</div><div dir="auto"><div dir="auto"><br></div><div dir="auto">Thank you in advance for your consideration. I am looking forward to hearing from you.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div>Masoud</div></div><div></div><div></div></div><div></div></div></div><div style="border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div><div style="clear:both"></div></div><div style="font-size:0.875rem;padding:0px;width:auto;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top:none;margin:0px;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div style="border-top:0px;padding:0px"><div style="clear:both;margin:0px;padding:16px 0px;border-top:none"><br></div></div></div></div></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>