0

I'm designing an experiment in which participants are required to remain fixated on a central cross, and I will be monitoring their eye movements using EOG electrodes (I don't need detailed information about how their eyes move, I just need to know whether or not an eye movement has occurred on any given trial). I've already built the experiment, with parallel ports/trigger channels etc set up. However, before the experiment proper I need some sort of calibration routine to 'tell' psychopy what an eye movement looks like, so that they can be detected during the experiment (without me having to crawl through reams of raw EOG output). Could anyone suggest a way to go about this, or point me towards some helpful resources?

Any advice would be appreciated! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

EDIT:

Unfortunately I do not yet have data to show you. I'm using four electrodes (2 for vertical EOG, positioned above and below one eye; and two for horizontal, one positioned next to each eye). I'm recording at a sampling rate of 512 Hz. My Psychopy experiment reads stimuli from an excel sheet, which has trigger values specifying combinations of levels from two variables. One variable is stimulus position (stimuli are presented either centrally, to the left of fixation or to the right), and the other is required response (each stimulus requires a button-press response with either the left or right hand). As such there are 6 types of events specified by the trigger values. EOG recordings (1 sample per screen refresh) are time-locked to these events.

Just to clarify: participants are instructed to remain focussed on fixation, however we are expecting to see some saccades towards peripheral stimuli, and we want to exclude any trials where this happens.

I hope that helps

Lyam
  • 123
  • 2
  • 14
  • 1
    A quick google on EOG and python showed nothing and psychopy does not contain analysis tools for EEG/EOG analysis. So it looks like you would have to do this in python code. Do you have EOG samples coming into python now? If yes, then please update your question with an example of the data, so we can see the structure of it and propose code to do what you want. Details about your EOG setup would also improve the question (number of electrodes, their locations, sample rate, any amplifier filters, etc.) – Jonas Lindeløv Nov 16 '16 at 19:53
  • We need to know about the signal that PsychoPy receives. If you just get a single sample on each screen refresh (typically at 60 Hz), a saccade detection algorithm would struggle. More useful would be a simple displacement threshold algorithm (i.e. is the eye position currently outside the tolerance). I guess you need to get PsychoPy to display to you a continuous read-out of the value of the EOG signal while a person is fixating and when they are looking just outside the fixation zone, and use those parameters in your algorithm. EOG drifts over time, so need to re-do this between trials. – Michael MacAskill Nov 16 '16 at 20:47

1 Answers1

0

The question is whether you want to exclude experimental trials while the experiment is running. This would require to read the EOG data as it is being written (i.e., live data processing) and will complicate the whole experiment. you would need the following components:

  1. Making the live EEG data available in some kind of buffer (e.g., using labstreaminglayer)
  2. Accessing the EOG data within the buffer and performing feature extraction followed by a classification whether an eye-move was present
  3. Streaming the result of the classification (eye-movement yes or no) to another buffer
  4. Reading the buffer containing the classifications from within your psychopy routine and changing the flow of the experiment contingent on this information (i.e., adding a trial, deleting a trial)

Based on your goal to

exclude any trials where [eye movements] happen

this is an excessive amount of effort you need to invest.

I suggest that you rather follow this procedure:

  1. Run the experiment and collect all data
  2. Based on event triggers sent via psychopy, make "epochs" of your EEG data that is now available offline (i.e., after the experiment)
  3. Use common methods in your EEG analysis software package of choice to identify epochs that contain eye movements
  4. Remove those trials that correspond to eye-movement epochs

This is a standard procedure used in EEG research and easily implemented with most dedicated software analysis packages (such as MNE-Python, Fieldtrip, ...).

S.A.
  • 1,819
  • 1
  • 24
  • 39