Accurate Epoch Creation with variable Trial times + Interface with Behavioural Data

Hi everyone,

I’m new to MNE and have a couple of questions relating to an analysis pipeline I’m currently planning.

I’m currently running an EEG memory experiment (with a BioSemi 64-channel system). Our trials look a bit like this:

Fixation (Variable from 750ms - 1250ms) → Image 1 (Variable from 2000ms - 2500ms) → Target Image (2.5 seconds).

We are sending triggers at each point of the trial (as well as at the beginning, indicating that the trial pertains to one of three experimental conditions). However, I’m not sure how to go about accurately creating Epochs for the ‘Target Image’ as the time between the initial condition trigger & the onset of the target image is variable.

Naturally, I need to segment the epochs for the target images respective to each condition. Any notion of how to do this would be very much appreciated!

Moreover, I need to trials based on correct responses from participants etc. Is there any documentation on how to interface with behavioural data (PsychoPy output)? I have included triggers for each unique behavioural response in the EEG data, too.

Hello @julesneuro and welcome to the forum!

I think it would make sense to use epochs metadata here. I currently don’t have time to provide you with a specific example for your use case, but I wrote a tutorial a while back that I believe you could use as a starting point:

https://mne.tools/stable/auto_tutorials/epochs/40_autogenerate_metadata.html

Best wishes,
Richard

1 Like

Hi Richard,

Thanks so much for the direction! This looks absolutely perfect for what I need.

Best wishes,
Harry

1 Like

Great! I know the tutorial is quite heavy, so feel free to ask if you get stuck or something is confusing!

Good luck!