[Mne_analysis] Resampling epochs

Eric Larson larson.eric.d at gmail.com
Mon Dec 3 13:37:21 EST 2018
Search archives:

        External Email - Use Caution        

Most analyses (iteration over epochs, epochs.average()) do not use the
first column of `epochs` anymore, but I think at least some of the
regression code (Xdawn, rERP?) use it.

Eric


On Mon, Dec 3, 2018 at 11:59 AM Alex Murphy <murphyalex at gmail.com> wrote:

>         External Email - Use Caution
>
> Hi there,
>
> I just had a doubt I wanted to resolve before I felt fully comfortable
> with an analysis I am doing. I record data at 1,000 Hz and then perform
> some preprocessing and then epoch the data. I can't downsample to 100 Hz
> straight away because a lot of my triggers are close together and MNE
> doesn't like that (throwing errors such as multiple time instances per
> sample and time indices not unique errors, even with shortest_event=0 and
> the like).
>
> Anyway, after epoching I do some manipulations of the trigger values (just
> converting the incremental integer target values to class labels according
> to my experimental design) and then I want to downsample the epochs.
>
> What I notice is that the events attribute of the epochs class doesn't
> change the time samples and I guess I would have expected that, perhaps.
> After copying the epochs and resampling it, I have the original and my
> resampled epoch data structure. If I run the following code, the following
> results are shown:
>
> print(epochs_resampled.events[-1])
> print(epochs.events[-1])
>
> [1901947       0     504]
> [1901947       0     504]
>
> That is what confused me. Basically, if MNE just looks at the index of the
> third column when dealing with the epoch events from now on, I guess that's
> all fine. I basically lose access to the original data so I am hoping it's
> just the case that the time stamp in the first column doesn't matter
> anymore.
>
> If I save the epochs data to a file and reload it, I just want the
> confirmation that absolutely no manipulation I would typically perform on
> epoched data will be using the first column. It is effectively meaningless
> after epoching, right?
>
> Kind regards
> Alex
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181203/42ec0258/attachment.html 


More information about the Mne_analysis mailing list