I am trying to integrate the Pygaze package for eyetracking and Psychopy. As pygaze creates it’s own window I have used the following workaround, where I create a pygame window that I minimize.
I am then able to present stimuli to a psychopy Window ontop of the pygame window which handles eyetracking. Using this workaround meant that I was unable to use the default psychopy.event.getKeys / waitKeys ect, and I have therefore switched to the using the iohub for keyboard inputs
Unfortunately I am also unable to get mouse or keyboard input’s when using the Rating.Scale. probably due to the fact it uses the psychopy.event, instead of the iohub.
import pygame from psychopy import visual, event pygame.init() win = visual.Window() scale = visual.RatingScale(win, low=1, high=3,mouseOnly=False, singleClick=False,markerColor="blue") while scale.noResponse: scale.draw() win.flip()
This code example is unable to take mouse input’s, however removing the
pygame.init() makes it function again. This is the same behavior as when I use the pygaze eyetracker, so I use
pygame.init() as it is a minimal working example
Is there a way to make psychopy’s rating scale work with Pygame?. perhaps through iohub?.
I have some workarounds in mind,
Right now, im considering 1. getting Iohub mouse input, as I have already done with the keyboard, and then making the rating scale work artificially. 2. modifying the visual.RatingScale.py to use iohub istead of event.Mouse.
I use Windows 7, running 32 bit anaconda python27 with psychopy 1.84.2, an a tobii pro x2-60 eyetracker and tobii SDK 3.2.
Thanks for reading