<div dir="ltr">Thank you Dr<font face="arial, sans-serif"> </font><span style="font-family:arial,sans-serif;font-size:13.333333015441895px">Schurger, this is awesome</span></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Feb 22, 2014 at 10:37 AM, Aaron Schurger <span dir="ltr"><<a href="mailto:aaron.schurger@gmail.com" target="_blank">aaron.schurger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
See below...<br>
<div class=""><br>
<br>
On Sat, Feb 22, 2014 at 12:27 AM, Russell G Port <<a href="mailto:russgport@gmail.com">russgport@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I have come across a problem and was hoping that someone had experience/knew<br>
> things that could be useful.I have some MEG data, and the effort currently<br>
> is to remove noise and artifact. I have the line noise reduction working<br>
> fine, the question that faces me is the following. When I first read in my<br>
> data I have the option of one of two methods. I can read it in as 1 second<br>
> epoch for the whole length of the experiment (contiguous time bins, with no<br>
> regard to events), or create 1 second epochs centered around a certain<br>
> trigger (the data contains 4 different triggers). Initially I wanted to read<br>
> in 1 second epochs (that spanned the entire dataset), clean it of artifacts<br>
> (jumps, muscle, EOG,ECG, anything else), which would remove bad trials and<br>
> components. I had then hoped to redefined the epoch, so that I could create<br>
> 4 separate subsets of data, each centered around a separate trigger. It<br>
> appears that I cannot do this (fieldtrip actually refuses this<br>
> specifically). Is this because of issues with phase/jitter when putting the<br>
> samples back together in different time sets? Second, it has been suggested<br>
> that we perform ICA analysis to detect EOG and ECG artifacts on the data<br>
> parsed just by timing (i.e. 1second bins contiguous for the entire length of<br>
> the data but no relation to triggers), and have the component rejection scan<br>
> my trials that are actually binned the based on triggers to remove the<br>
> components; even though this is not the exact epochs used to classify the<br>
> components. Is this possible?<br>
<br>
</div>This is the preferred way to do it. Read in all of your data in 1- or<br>
2-second epochs at arbitrary points (just one right after another).<br>
Run ICA on these epochs and save the components that you get (call<br>
this 'comp'). Then make a note of the components that you want to<br>
remove (usually blink, eye movement, and heart). Now read in your data<br>
time-locked to your triggers and use the previously-defined components<br>
to clean up the data (use the cfg to specify which components you want<br>
to remove).<br>
[data] = ft_rejectcomponent(cfg, comp, data);<br>
<div class=""><br>
><br>
> While I think it would be better to do the artifact correction on the whole<br>
> dataset (all time/triggers included), would it actually be better to first<br>
> define trials by triggers and then repeat everything (artifact<br>
> rejection-wise)? This is very easy to do (and I have), the only issue comes<br>
> when trying to compare the using ft_timelockanalysis/ft_freqanalysis (as in<br>
> <a href="http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts?s[]=ecg" target="_blank">http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts?s[]=ecg</a>).<br>
> I have the issue that when I used ft_artifact_ecg to detect peaks in the ECG<br>
> channel (via z scores), zeros and NaNs are returned, and it fails to graph;<br>
> since often the ECG timing occurs with such timing that the full pre/post<br>
> time extends past what is actually in the trial. Is it proper just to remove<br>
> all ECG events that cross the boundaries of the trigger based trials from<br>
> the trial definitions used in next step. Here the sections of data<br>
> contaminated with ECG are parsed and then tested to see coherence to the ICA<br>
> components? I would fear that this would produce erroneous results, since<br>
> the data for the ica would include the partial ECG event that I threw out.<br>
><br>
> Best<br>
> Russ Port<br>
><br>
</div>> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
<br>
<br>
--<br>
Aaron Schurger, PhD<br>
Senior researcher<br>
Laboratory of Cognitive Neuroscience<br>
Brain-Mind Institute, Department of Life Sciences<br>
École Polytechnique Fédérale de Lausanne<br>
Station 19, AI 2101<br>
1015 Lausanne, Switzerland<br>
<a href="tel:%2B41%2021%20693%201771" value="+41216931771">+41 21 693 1771</a><br>
<a href="mailto:aaron.schurger@epfl.ch">aaron.schurger@epfl.ch</a><br>
<a href="http://lnco.epfl.ch/" target="_blank">http://lnco.epfl.ch/</a><br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br></div>