Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Regarding sending of triggers to an eye-tracking PC.

Hi folks,

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

  • edited January 21

    That's definitely possible!

    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).

    Cheers,
    Edwin

    Thanked by 1booradley
  • Cheers, Edwin.

    I'll see how I get on with it once the tracker arrives. I'll be back if I hit any hurdles (which is known to happen from time to time).

    I'm in a new lab and keen to get them using OpenSesame and PyGaze!

    Boo.

  • edited February 21

    Hi Edwin,

    Quick follow-up:

    Can I use PyGaze with Mac? The section about EyeLink (the hardware I'm using) points to PyLink downloads for Windows and Ubuntu but doesn't mention Mac.

    I'll try and get it up an running in the mean time.

    Thanks,

    Boo.

  • Update:

    I've installed the EyeLink Developers Kit for Mac found here: https://www.sr-support.com/forum/downloads/eyelink-display-software/45-eyelink-developers-kit-for-mac-os-x-mac-os-x-display-software

    But apparently PyLInk still isn't available - ImportError: No module named pylink.

    I'm not very familiar with Macs so will try and figure this out myself but if you have any advice before I do that would be much welcomed.

    Thanks,

    Boo.

  • Update:

    Found the solution here for the pylink module error:

    https://forum.cogsci.nl/index.php?p=/discussion/1597/solved-pygaze-example-doesnt-work

    Copy the pylink folder from the install and paste it (changing name of to pylink) in site packages folder.

    I'll report back on progress.

    Thanks!

    Boo.

  • Hi again Edwin,

    I've successfully got PyGaze working with EyeLink on 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)?

    Thanks,

    Boo.

  • Hi @Edwin,

    Please excuse the bump. Have you had any thoughts on my last query above? No worries if you're currently busy.

    Thanks!

    Boo.

  • Hi Boo,

    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..

    Hope this helps,

    Eduard

    Thanked by 2booradley Edwin
  • Hi @Eduard,

    That's exactly what I was after! Thank you very much.

    Boo.

Sign In or Register to comment.