I would like to do a single trial artifact rejection in the MNE stream by
removing time windows of data containing artifacts, as opposed to performing
an ICA correction. One way of doing this seems to be to read the raw.fif
file into matlab, perform a threshold detection, remove a time window about
the detected events, and then write the data back out as a .fif file for the
remaining analysis. Is there a simpler, more builtin way to do this? I
know that for an evoked paradigm, you could specify certain criteria in the
average file, and it would reject a trial not fitting those criteria.
However, as this is a single trial analysis, I don't want to average and
thus it seems I can't make use of this step.
the problem with what you described it that you're going to create
edge artifacts around the time segments you remove. You mention
single trial analysis but do you mean more "on going" data? Do you
have the notion of trial with triggers? Can you be more specific about
what you want to do?
Actually, we did an analysis of how problematic taking out data this way would be in Ghuman, McDaniel, and Martin NeuroImage 2011 and it turns out that it depends on the analysis. ?If you end up doing a frequency domain analysis with wavelets, these edge effects get smoothed over pretty well, at least at higher frequencies (it depends on how large the chunks you cut out are, but with a generous window, this smoothing over is ok at frequencies > 2 Hz). ?I am guessing this is why Jonathan feels it is ok to do this (he is the McDaniel from that paper).
thanks for sharing your experience on this. To sum up, the answer is
that it depends
on what you do after with the data.
to answer the initial question which was is there a build in way to do
this, the answer is no.
MNE unix commands cannot do this as far as I know and you need to use
matlab or python
to zero the artifact time segments.
Thanks for your response. I am aware of the effect of discontinuities in
data and was planning to make a note of where they occur and account for
that in my analysis. The data is a 2 minutes long recording of spontaneous
activity to be more precise.
Doing this through matlab works for me, but I just wanted to see if there
was another way to do this type of analysis.