Howdy, Stranger!

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

Supported by

Difficulty writing variables to eye tracker logfile with OpenGaze tracker type

Hi all,

I am trying to do custom message logging through the pygaze log, rather than automatically logging all variables (because this adds ~3.5 seconds to each trial). I have done this in the past with the Eye Tribe, but with OpenGaze/Gazepoint, I find that the same code fails. For example, in the log message window for the pygaze log, I have the code:

"time_ITI" [time_ITI]

The variable exists: print(var.time_ITI) returns the value in the debug window after I quit out. But nothing shows up in the user column of the .tsv. If I enter msg(clock.time()) I get MSG(CLOCK.TIME()) in the .tsv.... that is, the text I entered, but not the variable value I asked for.

Finally, when I try to use an inline script instead of pygaze log, a similar failure occurs. For example, eyetracker.log_var("current time", clock.time()) leads to nothing in the .tsv file. The experiment file is attached.

I should note that the variable values do get written to the .tsv when I use the "automatically log all variables" option in the pygaze logger.

Thanks for any advice you have,



  • As a follow-up, I see that the messages are being written to the _log.txt file, not the .tsv file. (The _log.txt file is not outputted when Eye Tribe is the tracker type.) Is it possible to do custom logging to the .tsv with OpenGaze as tracker type, or is "automatically log all variables" the only way to get variable values into the .tsv?

    Thanks again,


  • edited June 2019

    Hi Tom,

    Yeah, I wouldn't ever use the "log all variables" button in the pygaze_log item. Takes a bucketload of time, and writing every single variable that OpenSesame collects generally isn't what you want anyway. Instead, I'd recommend using an inline_script item where you call "eyetracker.log". For example, you could use the following code:

    # Get variables you want to log.
    var_a = exp.get("time_ITI")
    var_b = clock.time()
    # Stick all variables in a list.
    my_variable_list = [var_a, var_b]
    # Add variables together in a comma-separated string.
    message = ",".join(map(str, my_variable_list))
    # Log string.

    The OpenGaze code in PyGaze logs stuff in two places if you use the "eyetracker.log" function. The extra log that you found is one of them, but the log messages should also appear in the "USER" column of the gaze data file. (The USER column only works during recording, so only in between calling "start_recording" and "stop_recording"!)

    This limitation is due to how GazePoint's server works. It streams samples that are earmarked with a timestamp, but those samples asynchronously get processed in the Python thread and written to file. Hence, writing triggers to files directly would cause timing headaches. (When did the trigger come in? When did the last sample? Are they on the same clock?) To circumvent this, the triggers are sent to the GazePoint server, which adds them to the next sample (in the USER field). In this way, triggers will be written to file together with the closest sample, and thus providing a good anchor for cutting out epochs in your data.

    In sum: You should be seeing all logged messages in the extra log file, but you should also see messages that were logged during recording in the USER column of the gaze data file.



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