Howdy, Stranger!

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

Supported by

experiment freezes during drift correct

Hello,

I am using a Tobii120 and running an experiment on OpenSesame. I do not have any problems with the calibration or with the other pygaze plugins, but the experiment freezes when it comes to drift correct. I used pygaze_init at the beginning of the experiment, then comes the instructions. During the trial sequence, I have pygaze_drift_correct, pygaze_start_recording, fixation dot, sketchpad, sampler, media_player_mpy, keyboard_response, logger, pygaze_log, pygaze_stop_recording in this order.

During the first trial, I do not see a fixation dot with the pygaze_drift_correct, but the experiment continues. And after the video file, I need to press space to move to the next item, but the experiment freezes. When I abort using esc-Q, I get the message that it was aborted at the drift_correct. I do not know what the exact problem was because I do not get an error message. If I remove the drift_correct, but the other pygaze plugins in, the experiment runs smoothly. Does anyone have any ideas why this happens?


Thanks,

Figen

Comments

  • Hi Figen,

    Unfortunately, I cannot help you (I don't have any eye tracker available), but to make sure that the problem is really related to the eye tracking part of your experiment, can you try to simplify it as much as possible? That is, remove items that are not necessary (i.e. sampler and media player). Does the experiment that still freezes on the drift correct?

    Eduard

    Buy Me A Coffee

  • Hi Eduard,


    Thanks for your reply. I simplified the experiment following your suggestions and it still freezes during drift-correct plugin. The other pygaze plugins run perfectly.


    Figen

  • Hi Figen,

    Thanks for trying. Unfortunately, without a (Tobii) eyetracker, I am at a loss here. Maybe @Edwin can help?

    Eduard

    Buy Me A Coffee

  • edited November 19

    Hi Figen,

    Interesting problem; wouldn't really know how to solve it without more debugging access. Perhaps a simpler fix would be to simply put in your own drift check by using an inline_script. You would use this inline_script instead of a drift_correction, and the code in the Run Phase of the inline_script should look like this:


    # Set the fixation position. (Example is screen centre.)
    fix_pos = (int(var.get("width")/2), int(var.get("height")/2))
    # Set the maximum allowed distance (in pixels) between fixation target and fixation.
    max_dist = 60
    
    # Create a canvas instance.
    screen = Canvas()
    # Draw the fixation dot.
    screen["fix_dot"] = Circle(x=fix_pos[0], y=fix_pos[1], r=10, fill=True)
    
    # Create a keyboard instance.
    kb = Keyboard(timeout=None)
    # Create a synth instance.
    beep = Synth(freq=440, osc="sine", length=200)
    
    # Loop until the fixation is OK.
    fixation_confirmed = False
    while not fixation_confirmed:
    
        # Check if a key was pressed.
        key, press_time = kb.get_key()
    
        # If Escape was pressed, calibrate the tracker.
        if key.lower() in ["Esc", "Escape"]:
            fixation_confirmed = True
            pygaze_eyetracker.calibrate()
    
        # Do a fixation check.
        elif key.lower() == "space":
            # Get a sample from the eye tracker.
            gaze_pos = pygaze_eyetracker.sample()
            # Measure how far it is from the fixation.
            d = math.sqrt((gaze_pos[0] - fix_pos[0])**2 + (gaze_pos[1]-fix_pos[1])**2)
            # Confirm if the fixation is close enough.
            if d < max_distance:
                fixation_confirmed = True
            else:
                beep.play()
    
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