marcus-nystrom / Titta

Python and PsychoPy interface to Tobii eye trackers using Tobii Pro SDK
Other
61 stars 25 forks source link

Titta in OpenSesame has smaller and more centered calibration dots #34

Closed dev-jam closed 1 year ago

dev-jam commented 1 year ago

I took the code from the demo experiment (init, start_recording, send_message, save_data, helpers.MyDot2(win)) and implemented it as separate inline scripts in an OpenSesame experiment with psychopy as backend. I omitted the creation of a window because OpenSesame creates its own window. Everything worked nicely but when I compared the calibration output from the OpenSesame experiment with the demo experiment I found the calibration dots are smaller and are more located to the center than the vanilla experiment. OpenSesame was set to 1920x1080 and the pictures also had the same resolution. I suspect OpenSesame creates windows a bit different than the code in the demo.

dcnieho commented 1 year ago

Images to go with the report: 355438410_1016055866430202_4676800473578586723_n 355488358_1769980066810015_5869317843635701142_n 355696281_795428768656267_583529478290119816_n 355636082_1751647715291316_3141074540878689519_n

dcnieho commented 1 year ago

Marcus, does your code expect one of the specific coordinate systems that Psychopy implements? Perhaps OpenSesame uses another and that causes these issues? Just the first thing i think of

dev-jam commented 1 year ago

OpenSesame creates psychopy windows with pxs as unit, compared to deg in Titta:

https://github.com/open-cogsci/OpenSesame/blob/milgram/openexp/_canvas/psycho.py

line 152:

units=u'pix',

dev-jam commented 1 year ago

Found out that a psychopy window can easily switch between pxs, norm and degree but when working with degree, psychopy in OpenSesame needs the monitor distance and dimensions. You can change these settings in ~/.psychopy3/monitors/testMonitor.json or create a new monitor there and select it in OpenSesame. Now the dots have the right size and coordinates.

marcus-nystrom commented 1 year ago

Thanks for reporting and testing with OpenSesame! I have now changed such that Titta can run without first setting up a monitor.