Regarding sending of triggers to an eye-tracking PC.

I'm just doing some preliminary reading and looking into things regarding PyGaze. My lab is expecting a delivery of an Eye-Link 1000 next month and hope to use it in conjunction with EEG recordings through OpenSesame.

We plan to send triggers to mark important events to our EEG system (e.g. stimulus onset, response made, type of response etc.) and we ideally would like to send the equivalent triggers to our Eye-Link machine (that then appear in the raw data). Is this possible with PyGaze and Eye-Link? I haven't found anything in relation to this specifically (I may of course have missed something).

Thanks for your time as always,

Boo.

Comments

If you're using the PyGaze library, simply use the EyeTracker class' log function to log whatever trigger value you would like (this can be a string, btw, it's not limited to 8-bit values like in most EEG systems).

If you're using the PyGaze plug-ins in OpenSesame, simply use the pygaze_log item. Make sure to uncheck the option to automatically log all variables, and just type what your trigger message should be in the window.

EDIT: Forgot to mention that you would commonly do this directly after a window flip, i.e. after calling the Display class' show function (PyGaze library), or in a sequence item directly after a sketchpad with a 0 ms duration (in OpenSesame).

At the moment I'm dropping the triggers (via PyGaze logs) straight after inline scripts that draw a canvas with text. Is this the correct placement given how I present my stimuli?

Also, how would I go about adding the content of a variable to the trigger message (it's a redundancy I'm keen on adding to ID the stimulus presented), as square brackets don't seem to do the trick?

Finally, can you advise on how I'd add a trigger for a given response made, and a trigger to mark the end of the trial after said response (I guess one trigger can do both here, although since I've added the eyetracking there is very noticeable delay after pressing response until the beginning of the next trial, hence my distinction)?

If you already present the stimuli with an inline_script, you can also add the logging to it.

You can send messages like so: exp.pygaze_eyetracker.log("Message"). Add it right before or after a canvas.show(). To make sure that you are in control of the timing, you can also add the actual Opensesame time of presenting the canvas to the log message, like so (which, by the way, is how you send variable values alongside the log message:

time = canvas.show()
exp.pygaze_eyetracker.log("Message %s"%time)

You can send these messages at any point in your trial sequence, so with the same syntax you can mark the end of a trial, the response (incl. response value), etc..