Howdy, Stranger!

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

Supported by

Saving multiple EDF files within one experiment, using PyGaze init inline instead of plug-in

edited April 2016 in PyGaze

Hi Forum,

I was wondering whether it's possible to use PyGaze init() within an inline script, just as the old Eyelink init function can do:

libeyelink.init(experiment, resolution, data_file=u'default.edf', fg_color=(255, 255, 255), bg_color=(0, 0, 0), saccade_velocity_threshold=35, saccade_acceleration_threshold=9500, force_drift_correct=False)

We want to create multiple EDF files within one session, using different filenames depending on variables in the inline script. As I understand now, using PyGaze you can only give a name to the EDF file at the start of the experiment, which would mean we have to start and stop Opensesame for each run within the experiment.

I realise we could start recording continuously throughout all the runs and later on reconstruct the run types, however, if something goes wrong within a 2hour recording session, all data is lost.

Any comments, tips are welcome!

Kind regards,

Joanne & Anouk

Comments

  • edited April 2016

    Hi Joanne and Anouk,

    Just to note: Your data isn't actually lost if something goes wrong in a long session. It's continuously saved on the EyeLink PC, even though it might not be transferred to the experiment PC when an experiment crashes. (BTW: There is a chance that it will be transferred, as OpenSesame will make an attempt to close the connection to the tracker.) To get the data, either open SR Research' data transfer utility, or boot the EyeLink PC in Windows instead of in EyeLink OS.

    More on your actual question later!

    Cheers,

    Edwin

  • edited April 2016

    There is a similar way of opening the connection to an EyeLink using the PyGaze plug-ins. It comes down to the following, assuming that you have a pygaze_init item at the start of your experiment:

    from pygaze.display import Display
    from pygaze.eyetracker import EyeTracker
    
    # Close the existing connection
    # (Only works if an existing connection exists!)
    self.experiment.pygaze_eyetracker.close()
    
    # Open a new connection
    self.experiment.pygaze_eyetracker = EyeTracker(self.experiment.pygaze_display, \
        trackertype=u'eyelink', logfile=u'example')
    

    I think this should do it, but there could be something I'm overlooking. (Can't actually test it here, sorry!)

  • edited 7:18PM

    That should work indeed. The only caveat is that the eyetracker object will no longer correspond to self.experiment.pygaze_eyetracker. So you'll also want to do:

    eyetracker = self.experiment.pygaze_eyetracker
    

    ... once you've re-opened the datafile.

    Cheers,
    Sebastiaan

  • Thanks a lot Sebastiaan and Edwin!

  • Hi Edwin & Sebastiaan,

    I still experience some difficulty in opening a new Eyelink connection using the code you've mentioned above:

    self.experiment.pygaze_eyetracker = EyeTracker(self.experiment.pygaze_display, \
        trackertype=u'eyelink', logfile=u'example')
    

    After importing the necessary Display and Eyetracker modules, the display argument self.experiment.pygaze_display is not found when initialising the self.experiment.pygaze_eyetracker object.

    Within the imported Pygaze module, I see the _display.py function exists, so I'm wondering why it's not being found when I call it (or am I looking into the wrong file?)

    Thanks again,

    Joanne

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