Can I merge two or many epochs of different trials into one epoch?

Hi,
I have many epochs under the same stimulation condition, so I need to merge them into one epoch.
For example there are two epoch both are eeg motor imagery data of left hand. I collected in different sessions on different day. So I need to combine the same paradigm data.
Any idea?
I notice there is an epoch.add_channels, but it sounds not what I need. I don’t want to add channel. I need to combine different trials.
Many thanks
Long

Hello and welcome to the forum!

I’m not sure I fully understand your question, but could MNE’s concatenate_epochs() function be what you’re looking for? It allows you to combine multiple Epochs objects into one.

Best wishes,

Richard

1 Like

Hi,
Thanks for the swift response. I test the mne.concatenate_epochs() and it is exactly what I need.
There are so much in this package and sometime it’s like treasure hunting. It’s would be much more easier if there is a way to do quick indexing or searching by functionality.

For other people who come into this. I have 3D epochs data in (trials, channels, times), and use this function to concatenate epochs along the trials dimension.

We’ve been trying to do that for quite a while now, reworking tutorials and examples, and constantly improving the documentation. What do you think would have helped you to find the function in question? A certain keyword, maybe? Did you use the search function in our docs?

I tried the search function in the docs but to be honest I often can’t find what I need. I would say try to organize functions around the objects. For example, I want to concatenate different epochs, then it would be straightforward to have a page linking epochs object with the mne.concatenate_epochs().

Thanks @Long! Are you aware of our API overview?

1 Like

I didn’t try that before. It seems like a very comprehensive index page.
Thanks, I like this feature.

1 Like