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 2019

    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

  • 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 2019

    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

  • Hi @Eduard,

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

    Boo.

  • Hi @Edwin,

    I would like to send trigger with OpenSesame. I need to send trigger both to EEG and eyetracking (eyelink 1000).

    Does the method that you described above send also a trigger to the EEG? I mean the pygaze_log

    Thank you for helping,

    Anaïs

  • Hi Anaïs,

    No, it does not. It only sends triggers to the eyetracker. In order to communicate with the EEG system you typically have to communicate via the parallel port.

    def sendTrigger(trigger,port=0x378):
       global io
       try:
          io.DlPortWritePortUchar(port,trigger)
       except:
          print 'Failed to send trigger %s!'% trigger   
    
    try:
       from ctypes import windll
       global io
       io = windll.dlportio # requires dlportio.dll !!!
    except:
       print 'The parallel port couldn\'t be opened'
    
    # portAdress
    port=0x378
    

    This for example how I communicate with the Biosemi system via the parallel port. The port number might be different in your case (not sure about it).


    Hope this helps.

    Eduard

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games