<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>PyGaze — Forum</title>
        <link>https://forum.cogsci.nl/</link>
        <pubDate>Mon, 15 Jun 2026 21:21:23 +0000</pubDate>
        <language>en</language>
            <description>PyGaze — Forum</description>
    <atom:link href="https://forum.cogsci.nl/categories/pygaze/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Tracking movements with Advanced Dummy in Visual World Experiment</title>
        <link>https://forum.cogsci.nl/discussion/9991/tracking-movements-with-advanced-dummy-in-visual-world-experiment</link>
        <pubDate>Fri, 17 Oct 2025 18:01:11 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>irenetognon</dc:creator>
        <guid isPermaLink="false">9991@/discussions</guid>
        <description><![CDATA[<p>Hi everyone,</p><p> I&#39;m building a Visual World Experiment in OpenSesame (4.1.0) with a coroutine that plays a sound and shows 5 images, but i&#39;m interested to test whether the participants looks at PIC4 at [160, &ndash;160] or PIC5 at [160, 96]), or both of them. I want to save this info in my final CSV file (I would love to see whether the PIC4 is watched (value = 1) or not (value = 0) in the columns of the CSV, every 100 ms (so I would like to have several columns, for ex. look_ROI1_000, look_ROI1_010 ecc...). </p><p> I&#39;m using the <em>Advanced Dummy</em> tracker to simulate gaze, but I can&rsquo;t manage to log gaze positions (or ROIs) every 100 ms &mdash; the CSV only shows the final ROI per trial.</p><p>Questions:</p><ol><li>Where exactly should I place the inline script that defines <code spellcheck="false">roi_analysis()</code>?</li><li>How can I make the dummy tracker log gaze every 100 ms instead of just once?</li><li>Could the coroutine duration (default 5000 ms) interfere with gaze logging?</li></ol><p>Here you find my experiment attached</p><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/953\/00SJ00DS565W.png&quot;,&quot;name&quot;:&quot;analysis1.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:98647,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/953/00SJ00DS565W.png" download="" aria-label="analysis1.PNG">
        analysis1.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/773\/INHK8DBJVQM3.png&quot;,&quot;name&quot;:&quot;analysis2.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:108760,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/773/INHK8DBJVQM3.png" download="" aria-label="analysis2.PNG">
        analysis2.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/484\/G3L2PAIVOKCZ.png&quot;,&quot;name&quot;:&quot;coroutines.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:45765,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/484/G3L2PAIVOKCZ.png" download="" aria-label="coroutines.PNG">
        coroutines.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/885\/H06G4DSIT2AG.png&quot;,&quot;name&quot;:&quot;experimental loop.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:111854,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/885/H06G4DSIT2AG.png" download="" aria-label="experimental loop.PNG">
        experimental loop.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/327\/CHH65S421SSY.png&quot;,&quot;name&quot;:&quot;object list.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:25212,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/327/CHH65S421SSY.png" download="" aria-label="object list.PNG">
        object list.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/571\/JXC3UJY5NEA4.png&quot;,&quot;name&quot;:&quot;objects.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:84237,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/571/JXC3UJY5NEA4.png" download="" aria-label="objects.PNG">
        objects.PNG
    </a>
</div><div data-embedjson="{&quot;url&quot;:&quot;https:\/\/forum.cogsci.nl\/uploads\/362\/QAGAJMUR33Q1.png&quot;,&quot;name&quot;:&quot;storeROIs.PNG&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:53744,&quot;width&quot;:null,&quot;height&quot;:null,&quot;embedType&quot;:&quot;file&quot;}">
    <a rel="nofollow" href="https://forum.cogsci.nl/uploads/362/QAGAJMUR33Q1.png" download="" aria-label="storeROIs.PNG">
        storeROIs.PNG
    </a>
</div><p><br /></p><p>Thanks a lot for your help!😍</p>]]>
        </description>
    </item>
    <item>
        <title>tobii - 'Xpyriment' object has no attribute 'set_bgcolor</title>
        <link>https://forum.cogsci.nl/discussion/9980/tobii-xpyriment-object-has-no-attribute-set-bgcolor</link>
        <pubDate>Sat, 04 Oct 2025 17:44:22 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>nobiles</dc:creator>
        <guid isPermaLink="false">9980@/discussions</guid>
        <description><![CDATA[<p>Hi everyone, </p><p>I&#39;m running opensesame in a python 3.10 anaconda environment in order to use a Tobii Pro Fusion eyetracker. My experiment works perfectly in the advanced dummy mouse mode, but when I switch to Tobii (Tobii research has been installed) I got this message:</p><p>AttributeError: &#39;Xpyriment&#39; object has no attribute &#39;set_bgcolor&#39;</p><p><br /></p><p>Thanks, </p><p>Vincenzo</p>]]>
        </description>
    </item>
    <item>
        <title>Eye tribe</title>
        <link>https://forum.cogsci.nl/discussion/9965/eye-tribe</link>
        <pubDate>Fri, 12 Sep 2025 16:17:34 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>lamyaa_hasan</dc:creator>
        <guid isPermaLink="false">9965@/discussions</guid>
        <description><![CDATA[<p>Hello everyone, I need your help with something. I would like to conduct an experiment to measure fixation length, blinks, rapid eye movements, scanning paths, and heat maps. This is part of my doctoral thesis. I downloaded ogama and the eye tracker I will be using is eye tribe. I have more than one question because I am ignorant of programming languages.I need:</p><p>1.A step-by-step tutorial suitable for beginners to create an experiment in OGAMA, which consists of experimental slides of a reading text that measures eye movements while reading, including eye movement measurement, data analysis, and heat maps.&nbsp;</p><p>2.I need a step-by-step tutorial on how to do eye movement training exercises within the OGAMA application and link the application to the eye movement tracker function using the Eye Tribe device</p>]]>
        </description>
    </item>
    <item>
        <title>Seeking example .osexp script for an eye-tracking study</title>
        <link>https://forum.cogsci.nl/discussion/9888/seeking-example-osexp-script-for-an-eye-tracking-study</link>
        <pubDate>Fri, 27 Jun 2025 11:40:59 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>luca_onnis</dc:creator>
        <guid isPermaLink="false">9888@/discussions</guid>
        <description><![CDATA[<p>Hi all,</p><p>In our lab we are programming a new eye-tracking experiment that runs on OpenSesame and Eyelink. I wonder whether anyone has a working example .osexp script that we could use to learn how to divide the screen into AOIs, and track eye gazes for expected AOIs as a function of stimuli appearing on screen. Happy to acknowledge and cite existing studies.</p><p>Best to all,</p><p>Luca</p>]]>
        </description>
    </item>
    <item>
        <title>Pupil Size Detection</title>
        <link>https://forum.cogsci.nl/discussion/9887/pupil-size-detection</link>
        <pubDate>Thu, 26 Jun 2025 10:38:00 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>sinem98</dc:creator>
        <guid isPermaLink="false">9887@/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p>I am trying to find a platform to detect pupil size from video recordings. However, recordings are not in good quality and most of the time eyelashes or lids prevents accurate estimation by MEYE. It is based on pixel estimation. I need something else that can prevail this issue. Thank you so much.</p>]]>
        </description>
    </item>
    <item>
        <title>bug report in libtobii.py</title>
        <link>https://forum.cogsci.nl/discussion/9819/bug-report-in-libtobii-py</link>
        <pubDate>Fri, 11 Apr 2025 11:50:16 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>arivera</dc:creator>
        <guid isPermaLink="false">9819@/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p>I have just started using PyGaze with Tobii Pro Fusion.</p><p>I had an issue with libtobii at the calibration step.</p><p>I seem to have found a solution so I would like to report both the bug and the solution.</p><p>Indeed, the calibration method of the TobiiProTracker class from libtobii tries to access the following key :</p><p>&quot;left_gaze_origin_in_trackbox_coordinate_system&quot;</p><p>from the gaze attribute. The key is not recognized. I fixed the bug by replacing &quot;trackbox&quot; with &quot;user&quot; and similarly with the &quot;right_gaze...&quot; string. I replaced all occurrences of both strings in libtobii.py. Here is why :</p><p>The attribute gaze is a list which is filled somehow using the subscribe_to function from eyetracker.py from EyeTracker.py from tobii_research with the option EYETRACKER_GAZE_DATA also from EyeTracker.py.</p><p>I don&#39;t understand the details but from what I gather, the contents come from the GazeData class in GazeData.py from tobii_research.</p><p>In this class, the following string is present :</p><p>&quot;left_gaze_origin_in_user_coordinate_system&quot;</p><p>I searched the tobii_research package for occurrences of</p><p>&quot;left_gaze_origin_in_trackbox_coordinate_system&quot;</p><p>and found none.</p><p>Yours,</p><p>A.</p>]]>
        </description>
    </item>
    <item>
        <title>Pygaze returns module 'pygaze.settings' has no attribute 'DISPTYPE'</title>
        <link>https://forum.cogsci.nl/discussion/9488/pygaze-returns-module-pygaze-settings-has-no-attribute-disptype</link>
        <pubDate>Tue, 03 Sep 2024 11:43:30 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>加拉哈德</dc:creator>
        <guid isPermaLink="false">9488@/discussions</guid>
        <description><![CDATA[<p>Hello! I am a newbie in using PyGaze and I am trying to run the PyGaze example Simple Tracker Experiment. When running the code in VSC, it says that the module &#39;pygaze.settings&#39; has no attribute &#39;DISPTYPE&#39;. I already downloaded all the dependency of PyGaze but the problem still persists. I am guessing compatibility causes this problem.</p>]]>
        </description>
    </item>
    <item>
        <title>How Can I Improve the Accuracy of My Running Tracker on PyGaze for Better Data Collection?</title>
        <link>https://forum.cogsci.nl/discussion/9799/how-can-i-improve-the-accuracy-of-my-running-tracker-on-pygaze-for-better-data-collection</link>
        <pubDate>Tue, 01 Apr 2025 14:20:07 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>janiezahida</dc:creator>
        <guid isPermaLink="false">9799@/discussions</guid>
        <description><![CDATA[<p>I have been using PyGaze for some time now to track my gaze data, and recently, I have been facing some issues with my running tracker. I&rsquo;m hoping to get some insight and help from the community here.</p><p>The main issue I&#39;ve encountered is that the tracker doesn&rsquo;t seem to provide the most accurate readings when it comes to tracking rapid eye movements during running. As I understand, this tool is designed to work well in controlled environments, but my usage scenario is a bit different&mdash;I&#39;m tracking my eye movements while engaging in physical activity. It&rsquo;s important to me because I use the data to understand how my gaze shifts in response to different paces, which I believe could offer valuable insights into how eye movements correlate with physical exertion. However, this context seems to present a challenge for the tracker.</p><p>I&rsquo;ve noticed that sometimes the tracker lags behind my eye movements when I&rsquo;m running at a quicker pace. This delay can result in a mismatch between the recorded gaze data and the actual movements I&rsquo;m making, which makes the results somewhat unreliable. I&rsquo;ve tried using the tool at various running speeds, and although it works decently at a slow pace, the accuracy suffers as I increase my speed.</p><p>One idea I had was to increase the sampling rate of the tracker to improve its ability to capture rapid eye movements more effectively. I wonder if this could be done through PyGaze&#39;s settings, or if there&rsquo;s another way to fine-tune it for faster tracking without introducing too much noise into the data. Has anyone here had experience modifying PyGaze&rsquo;s settings for this purpose? If so, I would love to hear how you approached this challenge.</p><p>I&rsquo;m also thinking about the possibility of implementing some pre-processing steps before the data is recorded, to potentially eliminate any noise or irrelevant signals that might interfere with tracking during my runs. Maybe filtering out certain frequencies or using a more precise calibration process could help in improving the quality of the data. What do you think about this idea? Do you have any suggestions for tools or methods that could be used to preprocess the data?</p><p>Beyond these adjustments, I&rsquo;m wondering whether the running environment itself could be influencing the accuracy of the data. When I&rsquo;m running outdoors, for instance, the lighting conditions change frequently, and I also encounter various distractions that could affect the tracker&rsquo;s performance. Is there a way to minimize these external factors, or perhaps an alternative environment that would allow the tool to perform better during physical activity?</p><p><a href="https://onlinecompass.net/running-tracker" rel="nofollow"><strong>Real-time running path tracker</strong></a> refers to a tool or device designed to continuously monitor and record the path taken during a running activity in real-time. In my case, this tracker is integrated with PyGaze and focuses on analyzing eye movements while running, as well as tracking the real-time running path. This kind of tracker typically uses GPS. In my use case, this tracker would ideally provide a clear view of how my gaze shifts with respect to the terrain and speed, giving me a comprehensive dataset for analysis.</p><p>When it comes to the tracker, I feel positive about the overall concept and functionality, and I think it has great potential in my use case. The ability to track and record eye movements while engaging in different activities is fascinating, and I can see many opportunities for refining it further. One aspect I particularly admire is the tracker&rsquo;s ability to handle relatively complex data collection processes with a simple interface, which makes it incredibly user-friendly despite its advanced capabilities. I&rsquo;m simply looking for ways to make it more responsive and precise in a dynamic, fast-paced environment like running.</p><p>If anyone has used PyGaze in a similar context or has any ideas or resources to share that could help me enhance the running tracker&rsquo;s performance, I would greatly appreciate it. I&rsquo;m not looking for a drastic overhaul but rather some small tweaks or tips that could go a long way in improving the tracking accuracy and overall experience. This kind of precision would help me gather more accurate and valuable data, which is the key to my progress.</p><p>I look forward to hearing your thoughts and suggestions!</p>]]>
        </description>
    </item>
    <item>
        <title>Really need help with Open Sesame Pygaze and Gazepoint GP3 eyetracker integration</title>
        <link>https://forum.cogsci.nl/discussion/9788/really-need-help-with-open-sesame-pygaze-and-gazepoint-gp3-eyetracker-integration</link>
        <pubDate>Fri, 21 Mar 2025 18:02:09 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>mtuvlin</dc:creator>
        <guid isPermaLink="false">9788@/discussions</guid>
        <description><![CDATA[<p>First, forgive me but I do not have a programming background so I don&#39;t understand most of the discussions on this board. </p><p>I&#39;m trying to run an eyetracking experiment using a Gazepoint GP3. I&#39;ve created a very simple experiment using the PyGaze eye-tracking template. I can get it to work (all I really need is for Open sesame to record a single keystroke) but I don&#39;t know if it is possible for Open Sesame to control the &quot;Gazepoint Control&quot; program of the eyetracker to start recording (so I have heat map &amp; fixation data).</p><p>I&#39;ve submitted a help request with Gazepoint and am awaiting a response. I don&#39;t know if this will help but here is overview screen and command screen:</p><div>
    <div>
        <a href="https://forum.cogsci.nl/uploads/376/6XT332WAJSTQ.png" rel="nofollow noopener" target="_blank">
            <img src="https://forum.cogsci.nl/uploads/376/6XT332WAJSTQ.png" alt="image.png" />
        </a>
    </div>
</div>
<p>E:\0000 Classes\B PhD program\000 Dissertation Organization\0000 Gazepoint Eyetracker Lab\Open Sesame&gt;cd /D C:\Program Files (x86)\OpenSesame\</p><p>C:\Program Files (x86)\OpenSesame&gt;python.exe Lib\site-packages\opensesame.py &quot;E:\0000 Classes\B PhD program\000 Dissertation Organization\0000 Gazepoint Eyetracker Lab\Open Sesame\000 this program works.osexp&quot;</p><p>[2025-03-21 13:55:30,830:qtopensesame:492:WARNING] no translation file found for [D</p><p>[2025-03-21 13:55:30,966:qtplugin_manager:68:INFO] dynamically creating plugin gui class for notepad</p><p>qt.webenginecontext:</p><p><br /></p><p>GL Type: desktop</p><p>Surface Type: OpenGL</p><p>Surface Profile: CompatibilityProfile</p><p>Surface Version: 4.6</p><p>QSG RHI Backend: OpenGL</p><p>Using Supported QSG Backend: yes</p><p>Using Software Dynamic GL: no</p><p>Using Multithreaded OpenGL: yes</p><p><br /></p><p>Init Parameters:</p><p>&nbsp;*&nbsp;application-name python</p><p>&nbsp;*&nbsp;browser-subprocess-path C:\Program Files (x86)\OpenSesame\Lib\site-packages\PyQt6\Qt6\bin\QtWebEngineProcess.exe</p><p>&nbsp;*&nbsp;create-default-gl-context</p><p>&nbsp;*&nbsp;disable-es3-gl-context</p><p>&nbsp;*&nbsp;disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture</p><p>&nbsp;*&nbsp;disable-speech-api</p><p>&nbsp;*&nbsp;enable-features NetworkServiceInProcess,TracingServiceInProcess</p><p>&nbsp;*&nbsp;enable-threaded-compositing</p><p>&nbsp;*&nbsp;in-process-gpu</p><p>&nbsp;*&nbsp;use-gl desktop</p><p><br /></p><p>0.00s - Debugger warning: It seems that frozen modules are being used, which may</p><p>0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off</p><p>0.00s - to python to disable frozen modules.</p><p>0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.</p><p>[2025-03-21 13:55:33,646:qtplugin_manager:68:INFO] dynamically creating plugin gui class for notepad</p><p>0.00s - Debugger warning: It seems that frozen modules are being used, which may</p><p>0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off</p><p>0.00s - to python to disable frozen modules.</p><p>0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.</p><p>[2025-03-21 13:55:34,617:qtplugin_manager:68:INFO] dynamically creating plugin gui class for pygaze_log</p><p>[2025-03-21 13:55:34,619:qtplugin_manager:68:INFO] dynamically creating plugin gui class for pygaze_start_recording</p><p>[2025-03-21 13:55:34,620:qtplugin_manager:68:INFO] dynamically creating plugin gui class for pygaze_stop_recording</p><p>[2025-03-21 13:55:34,621:qtplugin_manager:68:INFO] dynamically creating plugin gui class for reset_feedback</p><p>using conda for updater</p><p>checking updates for opensesame: platform=noarch, current=4.0.24, latest=0</p><p><br /></p><p><br /></p><p>[2025-03-21 13:56:12,091:legacy:176:INFO] enabling hardware surface</p><p>[2025-03-21 13:56:12,092:legacy:185:INFO] enabling double buffering</p><p>[2025-03-21 13:56:12,099:legacy:189:INFO] video mode ok</p><p>[2025-03-21 13:56:12,198:legacy:178:INFO] sampling freq = 48000, buffer size = 1024</p><p>[2025-03-21 13:56:12,199:legacy:183:WARNING] mixer already initialized, closing</p><p>[2025-03-21 13:56:12,497:experiment:345:INFO] experiment started</p><p>checking updates for datamatrix: platform=noarch, current=1.0.15, latest=0</p><p>checking updates for qdatamatrix: platform=noarch, current=0.1.34, latest=0</p><p>checking updates for pseudorandom: platform=noarch, current=0.3.2, latest=0</p><p>checking updates for qnotifications: platform=noarch, current=2.0.6, latest=0</p><p>[2025-03-21 13:57:31,752:experiment:354:INFO] experiment finished</p><p>checking updates for fileinspector: platform=noarch, current=1.0.2, latest=0</p><p>checking updates for pyqode.python: platform=noarch, current=4.0.2, latest=0</p><p>checking updates for pyqode.core: platform=noarch, current=4.0.11, latest=0</p><p>checking updates for rapunzel: platform=noarch, current=1.0.0, latest=0</p><p>checking updates for opensesame-extension-language_server: platform=noarch, current=0.2.4, latest=0</p><p>checking updates for pyqode.language_server: platform=noarch, current=0.2.3, latest=0</p>]]>
        </description>
    </item>
    <item>
        <title>How to analyze Tobii Pro SDK data without Tobii Pro Lab?</title>
        <link>https://forum.cogsci.nl/discussion/9732/how-to-analyze-tobii-pro-sdk-data-without-tobii-pro-lab</link>
        <pubDate>Mon, 03 Mar 2025 04:02:04 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>YMonno</dc:creator>
        <guid isPermaLink="false">9732@/discussions</guid>
        <description><![CDATA[<p>Hi everyone,</p><p>I recorded eye-tracking data using a Tobii Pro Nano with Tobii Pro SDK and Psychtoolbox at 60 Hz. However, I found that the data format is not compatible with Tobii Pro Lab, so I&#39;m looking for an alternative way to analyze it.</p><p>The dataset includes:</p><ul><li>Timestamps for each sample</li><li>Pupil diameter (both eyes)</li><li>Screen coordinates (X, Y) for each eye</li><li>Validity indicators for each sample</li></ul><p>Has anyone worked with similar data? If so, what workflow or tools did you use to process and analyze it?Any suggestions on best practices for cleaning and analyzing this data would be highly appreciated!</p><p>Thanks in advance!</p>]]>
        </description>
    </item>
    <item>
        <title>Problem with PyGaze Eyetracker</title>
        <link>https://forum.cogsci.nl/discussion/9724/problem-with-pygaze-eyetracker</link>
        <pubDate>Thu, 27 Feb 2025 10:48:29 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Effie</dc:creator>
        <guid isPermaLink="false">9724@/discussions</guid>
        <description><![CDATA[<p>Hello everyone,</p><p>I am trying for the first time to build an eye-tracking experiment in OS. In my lab we are using Tobii Pro Fusion, that supports up to Python 3.10. Therefore I performed the following steps following the documentation attached:</p><ol><li>Created a virtual environment in Anaconda that works on Python 3.10 and installed OS and related packages in this environment. Documentation: <a href="https://osdoc.cogsci.nl/3.3/download#anaconda-cross-platform" rel="nofollow">https://osdoc.cogsci.nl/3.3/download#anaconda-cross-platform</a></li><li>I then installed tobii_research in OS python console. Documentation:<a href="https://osdoc.cogsci.nl/3.3/manual/eyetracking/tobii/" rel="nofollow">https://osdoc.cogsci.nl/3.3/manual/eyetracking/tobii/</a></li><li>I started building my experiment using the available eye-tracking template (OS v4), however the pygaze_init is not working as intended. Thus I created an inline script to initialize and calibrate the tracker. </li></ol><p>Inline Script</p><p>----------------------------</p><p>import tobii_research as tr</p><p>import time</p><p><br /></p><p># Find all connected eye trackers</p><p>trackers = tr.find_all_eyetrackers()</p><p><br /></p><p>if len(trackers) &gt; 0:</p><p>pygaze_eyetracker = trackers[0] # Use the first available tracker</p><p>print(&quot;Tobii Pro Fusion connected successfully!&quot;)</p><p>else:</p><p>print(&quot;Error: Could not find an eye tracker.&quot;)</p><p>pygaze_eyetracker = None</p><p><br /></p><p># Initialize calibration settings</p><p>if pygaze_eyetracker:</p><p>print(&quot;Starting calibration...&quot;)</p><p>try:</p><p><br /></p><p>pygaze_eyetracker.calibrate()</p><p>time.sleep(5)</p><p>print(&quot;Calibration complete.&quot;)</p><p><br /></p><p>except Exception as e:</p><p>print(f&quot;Calibration failed: {e}&quot;)</p><p>-----------------------------------------------------------------------------------</p><p>However, when I run the experiment the following error(s) occurs:</p><p>Calibration failed: &#39;EyeTracker&#39; object has no attribute &#39;calibrate&#39;</p><p>&nbsp;File &quot;C:\Users\f-eflamprou\.conda\envs\opensesame_p3_env\lib\site-packages\opensesame_plugins\pygaze\pygaze_drift_correct\pygaze_drift_correct.py&quot;, line 52, in prepare</p><p>&nbsp;&nbsp;self.experiment.pygaze_eyetracker. \</p><p>AttributeError: &#39;Experiment&#39; object has no attribute &#39;pygaze_eyetracker&#39;</p><p>I was wondering if you could assist me on this matter.</p><p>Finally, my last question has to do with storing eye-tracking data. Is this implemented via inline script or incorporated within the pygaze plugins? Any reading or previous discussion suggested would be a massive help!</p><p>Specs</p><p>Operating System: Windows 10</p><p>Python version: 3.10</p><p>Pygaze version: 0.8</p><p>OS: V4</p><p>Thank you in advance or your time and consideration. </p><p>Best regards,</p><p>Efi</p>]]>
        </description>
    </item>
    <item>
        <title>Setting Appropriate Parameters for Event Detection in PyGaze Analyser (or Alternative Methods?)</title>
        <link>https://forum.cogsci.nl/discussion/9719/setting-appropriate-parameters-for-event-detection-in-pygaze-analyser-or-alternative-methods</link>
        <pubDate>Tue, 25 Feb 2025 13:25:00 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>YMonno</dc:creator>
        <guid isPermaLink="false">9719@/discussions</guid>
        <description><![CDATA[<p>I am conducting a psychological experiment and recording gaze data using a Tobii Pro Nano at 60Hz. Data collection was performed using Tobii Pro SDK in combination with Psychtoolbox, and I already have the recorded data. Each sample in the dataset contains a timestamp, a gaze coordinate on the screen for each eye, a pupil diameter for each eye, and validity indicators.</p><p><br /></p><p>For event detection (blinks, fixations, saccades), I plan to use the detection functions provided in PyGaze Analyser&rsquo;s `detectors.py`, specifically `blink_detection()`, `fixation_detection()`, and `saccade_detection()`. However, the function parameters are defined in pixels, and I would like to configure them in degrees of visual angle (dva) to match my experimental setup.&nbsp;</p><p><br /></p><p>Specifically:</p><p>- What are appropriate threshold values for inter-sample displacement in fixation detection, and velocity and acceleration in saccade detection when defined in degrees of visual angle (dva)?&nbsp;</p><p><br /></p><p>- Should the minimum number of consecutive samples (`minlen`) for blink detection and saccade detection be adjusted for a 60Hz sampling rate? If so, what values would be appropriate?</p><p><br /></p><p>If there are alternative methods or tools that provide reliable event detection for gaze data, I would also be interested in learning about them.</p><p><br /></p><p>Any recommendations or insights would be greatly appreciated.</p><p>Thank you for your time and consideration.</p>]]>
        </description>
    </item>
    <item>
        <title>Is it possible to use an SMI RED 500 eye tracker without the iView X SDK?</title>
        <link>https://forum.cogsci.nl/discussion/9159/is-it-possible-to-use-an-smi-red-500-eye-tracker-without-the-iview-x-sdk</link>
        <pubDate>Mon, 26 Feb 2024 15:07:58 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Jakob_</dc:creator>
        <guid isPermaLink="false">9159@/discussions</guid>
        <description><![CDATA[<p>I want to use an <a href="https://imotions.com/products/hardware/smi-red/" rel="nofollow">SMI RED 500</a> eye tracker. Previously, my institute used SMI Experiment Center to use the eye tracker, however, the installation broke and we&#39;re now looking to replace it with something.</p><p>We currently want to use the <strong>SMI RED 500</strong> eye tracker together with <strong>OpenSesame</strong>. In my understanding, this is possible, and would in turn use the <strong>PyGaze</strong> library.</p><p>It seems like <strong>PyGaze</strong> doesn&#39;t talk to the eye tracker directly, but communicates with the <strong>iView X SDK </strong>(which appears to consist of a local server that talks to the eye tracker and a DLL local client that talks to that server, the latter being used by PyGaze).</p><p>Using iView X has two major downsides for us:</p><ul><li>It is proprietary.</li><li>It is only available for Windows.</li></ul><p>My question is therefore: <strong>Is it possible to use an SMI RED 500 eye tracker without iView X SDK?</strong></p><p>There is the <a href="denied:unsafe:about:blank" rel="nofollow">13-year old library </a><a href="denied:unsafe:about:blank" rel="nofollow"><code spellcheck="false">libsmi</code></a> which seems like it doesn&#39;t use the iView X SDK and could be used instead of PyGaze, however, it also talks about using the serial port (which the SMI RED 500 doesn&#39;t have) and <a href="https://forum.cogsci.nl/discussion/2293/eyetracking-w-smi-use-pygaze-or-libsmi" rel="nofollow">might therefore not work</a>.</p><p>Is there anything else I could do to avoid iView X?</p>]]>
        </description>
    </item>
    <item>
        <title>Installation of PygazeAnalyser</title>
        <link>https://forum.cogsci.nl/discussion/9626/installation-of-pygazeanalyser</link>
        <pubDate>Tue, 10 Dec 2024 12:55:29 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Anaïs</dc:creator>
        <guid isPermaLink="false">9626@/discussions</guid>
        <description><![CDATA[<p>Hello, </p><p><br /></p><p>I recorded eye-tracking data using OpenSesame and SMI RED500 eye-tracker. I would love to use the pygazeanalyser to analyse my data, but I can&#39;t figure out how to install it.</p><p><br /></p><p>Any help?</p><p>Thank you in advance,</p><p>Ana&iuml;s</p>]]>
        </description>
    </item>
    <item>
        <title>Pygaze calibration error</title>
        <link>https://forum.cogsci.nl/discussion/9568/pygaze-calibration-error</link>
        <pubDate>Tue, 05 Nov 2024 18:02:45 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Tryfonas_Bikos</dc:creator>
        <guid isPermaLink="false">9568@/discussions</guid>
        <description><![CDATA[<p>Hi! I am setting up an eye tracking experiment with Tobii pro Spectrum. Yet, I seem to have a problem with calibration from pygaze! I am using the pygaze_init module to calibrate the eye tracker but the calibration is frequently unsuccessful, resulting to not proceeding to validation, noise cancellation. When the calibration is unsuccessful. the tsv file doesn&#39;t contain any eye tracking measurements.  I have noticed that the movement of the dots in the calibration process is quite fast. Is there any way I can make them move slower? Any suggestions about my calibration issues? Thank you in advance!</p>]]>
        </description>
    </item>
    <item>
        <title>Define AOIs offline using Tobii eyetracker</title>
        <link>https://forum.cogsci.nl/discussion/9564/define-aois-offline-using-tobii-eyetracker</link>
        <pubDate>Thu, 31 Oct 2024 09:45:42 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Tryfonas_Bikos</dc:creator>
        <guid isPermaLink="false">9564@/discussions</guid>
        <description><![CDATA[<p>Hi!</p><p>I am setting up an experiment using Tobii pro Spectrum eyetracker and want to include AOI analysis of my data. I want to define the AOI&#39;s after collecting the data, as the progress of the experiment is not contingent on gaze behaviour. What would be the best way to go about it? Also, could I import the Tobii TSV data I get from Opensesame into Tobii pro Lab and analyze my data from there?</p><p>Thank you in advance!</p>]]>
        </description>
    </item>
    <item>
        <title>Tobii Pro Fusion Compatibility and Missing Python Modules</title>
        <link>https://forum.cogsci.nl/discussion/9514/tobii-pro-fusion-compatibility-and-missing-python-modules</link>
        <pubDate>Mon, 23 Sep 2024 11:57:39 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Marianne</dc:creator>
        <guid isPermaLink="false">9514@/discussions</guid>
        <description><![CDATA[<p>Hi,</p><p>I am currently using a Tobii Pro Fusion device and would like to know if it is supported by OpenSesame. If so, which eye tracker type should I select from the options (Tobii, Legacy, or Glass)?</p><p>I have tried several eye tracker types, but I consistently encounter an issue with a missing Python module during runtime. For example, when selecting the Tobii tracker type, I receive the following error:</p><p>File &quot;/Applications/OpenSesame.app/Contents/Resources/lib/python3.11/site-packages/pygaze/_eyetracker/libtobii.py&quot;, line 9, in &lt;module&gt; import tobii_research as tr&nbsp;&nbsp;</p><p>ModuleNotFoundError: No module named &#39;tobii_research&#39;</p><p>Does OpenSesame include all necessary modules for each tracker type, or do I need to install them separately? If they must be installed separately, could you please guide me on how to properly do this?</p><p>I have already attempted to install the <code spellcheck="false">tobii_research</code> module using <code spellcheck="false">pip3</code> on my host system, but OpenSesame is still unable to locate it.</p><p>For your reference, I am using Python 3.11 and the latest version of OpenSesame, which is installed directly on my host system.</p><p>Could you advise on how I can ensure that OpenSesame has all the required packages in my environment to use the Tobii Pro Fusion?</p><p>Thank you for your assistance.</p><p>Best regards,</p>]]>
        </description>
    </item>
    <item>
        <title>Gazepoint eye tracker - multiple fixations with the same FPGOID</title>
        <link>https://forum.cogsci.nl/discussion/9499/gazepoint-eye-tracker-multiple-fixations-with-the-same-fpgoid</link>
        <pubDate>Fri, 13 Sep 2024 16:29:29 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Kreso</dc:creator>
        <guid isPermaLink="false">9499@/discussions</guid>
        <description><![CDATA[<p>Hi, </p><p>in the .tsv file I see multiple fixations with the same ID (e.g. FPGOID = &quot;181&quot; for n fixations, then &quot;182&quot; for n fixations). Fixations with the same ID have same y coordinates, but different x coordinates, which I find strange. I would expect x coordinate to change as well. Time variable suggest that fixations are correctly updated every 16.6 ms. </p><p>Based on the Gazepoint native software, I would expect that each fixation has its own ID and that fixations start from 1 (e.g. FPGOID = 1......n), which is not the case know. </p><p>Did some experienced this behavior and how to treat fixations with the same ID? </p><p>Enviornment:</p><p>-win 11</p><p>-OpenSesame 4.0.24 </p><p>-Gazepoint control 6.10.1</p><p>- GP3 60 Hz </p><p><br /></p><p>Thank you.</p>]]>
        </description>
    </item>
    <item>
        <title>How to write inline_scripts(use function eyetracker()) in opensesame to collect Eyelink data ?</title>
        <link>https://forum.cogsci.nl/discussion/9473/how-to-write-inline-scripts-use-function-eyetracker-in-opensesame-to-collect-eyelink-data</link>
        <pubDate>Fri, 23 Aug 2024 10:04:50 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Ornella</dc:creator>
        <guid isPermaLink="false">9473@/discussions</guid>
        <description><![CDATA[<p>I&#39;ve read the instructions for Pygaze (eyetracker) in the official manual (<a href="https://osdoc.cogsci.nl/3.0/devices/pygaze/)," rel="nofollow">https://osdoc.cogsci.nl/3.0/devices/pygaze/),</a> but I&#39;m not clear about which functions to use and how to complete my work. I&#39;m a beginner in eye tracking and need some help...</p><p>I&#39;ve now confirmed my objectives:</p><p>1)Keep the subjects looking at the central fixation point throughout the experiment.</p><p>2)Define several areas of interest(AOI) in the stimulus presentation screen, and collect  fixation and gaze points of target area. (analyze time to first fixation, fixation sequence, heatmap)</p><p><br /></p><p>Maybe I can find some more specific templates?&nbsp;I would appreciate it if people could give me some guidance.☺️☺️</p>]]>
        </description>
    </item>
    <item>
        <title>Logging Fixation Start and End</title>
        <link>https://forum.cogsci.nl/discussion/9408/logging-fixation-start-and-end</link>
        <pubDate>Thu, 11 Jul 2024 13:03:32 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>doingMyBest</dc:creator>
        <guid isPermaLink="false">9408@/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p>I am using the Gazepoint GP3 Eyetracker. I want to log all fixation starts and fixation ends of a trial. So far I have tried an inline Python script:</p><p>eyetracker.log(&quot;Fixation start:&quot; + str(eyetracker.wait_for_fixation_start()) + &quot;Trial number: &quot;)</p><p>eyetracker.log(&quot;Fixation end:&quot; + str(eyetracker.wait_for_fixation_end()) + &quot;Trial number: &quot; )</p><p>This works, but it only logs one fixation event. I want all fixation events of the trial. I already tried embedding this in a while True loop but then it either did not print anything or the experiment crashed.</p>]]>
        </description>
    </item>
    <item>
        <title>Gazepoint Eyetracking Log variables documentation</title>
        <link>https://forum.cogsci.nl/discussion/9409/gazepoint-eyetracking-log-variables-documentation</link>
        <pubDate>Thu, 11 Jul 2024 13:05:25 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>doingMyBest</dc:creator>
        <guid isPermaLink="false">9409@/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p>where can I find documentation for the eyetracking log I receive using gazepoint eyetrackers? I get these variables in the logs but I could not find explanations:</p><p>CNT&nbsp;&nbsp;&nbsp;TIME&nbsp;&nbsp;&nbsp;TIME_TICK&nbsp;&nbsp;&nbsp;FPOGX&nbsp;&nbsp;&nbsp;FPOGY&nbsp;&nbsp;&nbsp;FPOGS&nbsp;&nbsp;&nbsp;FPOGD&nbsp;&nbsp;&nbsp;FPOGID&nbsp;&nbsp;&nbsp;FPOGV&nbsp;&nbsp;&nbsp;LPOGX&nbsp;&nbsp;&nbsp;LPOGY&nbsp;&nbsp;&nbsp;LPOGV&nbsp;&nbsp;&nbsp;RPOGX&nbsp;&nbsp;&nbsp;RPOGY&nbsp;&nbsp;&nbsp;RPOGV&nbsp;&nbsp;&nbsp;BPOGX&nbsp;&nbsp;&nbsp;BPOGY&nbsp;&nbsp;&nbsp;BPOGV&nbsp;&nbsp;&nbsp;LPCX&nbsp;&nbsp;&nbsp;LPCY&nbsp;&nbsp;&nbsp;LPD&nbsp;&nbsp;&nbsp;LPS&nbsp;&nbsp;&nbsp;LPV&nbsp;&nbsp;&nbsp;RPCX&nbsp;&nbsp;&nbsp;RPCY&nbsp;&nbsp;&nbsp;RPD&nbsp;&nbsp;&nbsp;RPS&nbsp;&nbsp;&nbsp;RPV&nbsp;&nbsp;&nbsp;LEYEX&nbsp;&nbsp;&nbsp;LEYEY&nbsp;&nbsp;&nbsp;LEYEZ&nbsp;&nbsp;&nbsp;LPUPILD&nbsp;&nbsp;&nbsp;LPUPILV&nbsp;&nbsp;&nbsp;REYEX&nbsp;&nbsp;&nbsp;REYEY&nbsp;&nbsp;&nbsp;REYEZ&nbsp;&nbsp;&nbsp;RPUPILD&nbsp;&nbsp;&nbsp;RPUPILV&nbsp;&nbsp;&nbsp;CX&nbsp;&nbsp;&nbsp;CY&nbsp;&nbsp;&nbsp;CS&nbsp;&nbsp;&nbsp;USER</p>]]>
        </description>
    </item>
    <item>
        <title>Collecting eye_openness data with Tobii Pro Spectrum</title>
        <link>https://forum.cogsci.nl/discussion/9391/collecting-eye-openness-data-with-tobii-pro-spectrum</link>
        <pubDate>Thu, 27 Jun 2024 08:52:24 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>Rafnica</dc:creator>
        <guid isPermaLink="false">9391@/discussions</guid>
        <description><![CDATA[<p>Dear all,</p><p><br /></p><p>I&#39;m trying to collect eye tracking data with an experiment build in OpenSesame, using a Tobii Pro Spectrum eyetracker.</p><p><br /></p><p>When I use the Pygaze plugins, everything works well, and I get lots of eye tracking variables, however, I don&#39;t get eye openness data which the Tobii Pro Spectrum can collect as well.</p><p>I have sort of managed to collect this data with python inline scripts (so it is possible), however, this solution so far is quite messy and creates a separate data file.</p><p><br /></p><p>Is there a way to control what data gets collected with the pygaze_log item?</p><p>I don&#39;t know what the pygaze_log item does in the background, so I don&#39;t know how to code that it logs these additional eye openness variables as well.</p><p><br /></p><p>Does anyone have experience with collecting this kind of data in Opensesame wtih a Tobii eyetracker?</p><p><br /></p><p>Any tips would be greatly appreciated!</p>]]>
        </description>
    </item>
    <item>
        <title>.edf transfer to a specific folder</title>
        <link>https://forum.cogsci.nl/discussion/9356/edf-transfer-to-a-specific-folder</link>
        <pubDate>Mon, 10 Jun 2024 13:24:20 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>nadia27</dc:creator>
        <guid isPermaLink="false">9356@/discussions</guid>
        <description><![CDATA[<p>Hi all!</p><p>I am working on an ET experiment where participants read sentences, and for data pre-processing (in Data Viewer) I need to send the canvas to the .edf file. So far, I have managed to take a screenshot per trial and send it to the file with this code:</p><pre spellcheck="false">scn_name = sentence + &#39;.png&#39;

filepath = os.path.join(exp.experiment_path, scn_name)

self.experiment.window.movieFrames[0].save(filepath)

et_tracker.sendMessage(&#39;!V IMGLOAD FILL %s&#39; % filepath )
</pre><p>However, when I open the .edf file on Data Viewer, it returns an error: It cannot find the images. I am guessing that this may have to do with dependencies, and that I need to have a folder per participants where I save both the screenshots and the .edf file. So far, I have managed to former, but I don&#39;t know how to save the .edf transferred to the Host PC in a folder other than the experiment folder - any input?</p><p>Thank you!</p>]]>
        </description>
    </item>
    <item>
        <title>EyeLink experiment via Open Sesame PyGaze: Not recording samples data?</title>
        <link>https://forum.cogsci.nl/discussion/8579/eyelink-experiment-via-open-sesame-pygaze-not-recording-samples-data</link>
        <pubDate>Fri, 12 May 2023 07:42:26 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>elgerabrahamse</dc:creator>
        <guid isPermaLink="false">8579@/discussions</guid>
        <description><![CDATA[<p>Dear all,</p><p>Our eye-tracking experiment using EyeLink is run via Open Sesame / PyGaze.</p><p>Currently, the resulting edf files contain both event (eg fixation) summary data and all recorded samples data. Is it possible to not write the latter samples data into the edf file, to reduce the file size a bit?</p><p>Thanks for any consideration!</p><p>Elger</p>]]>
        </description>
    </item>
    <item>
        <title>Opensesame Freezing when Running using Pygaze</title>
        <link>https://forum.cogsci.nl/discussion/9359/opensesame-freezing-when-running-using-pygaze</link>
        <pubDate>Tue, 11 Jun 2024 15:35:52 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>VeerleVijverberg</dc:creator>
        <guid isPermaLink="false">9359@/discussions</guid>
        <description><![CDATA[<p>Hello hello :)</p><p>I am running into a similar issue as has been experienced before, namely that my opensesame experiment freezes once the Pygaze init is set to calibrate the tracker. </p><p><br /></p><p>The calibration works fine but once the stimulus presentation starts, it freezes after the first trial. It gets stuck on the last image frame, and when I click on the screen it says &quot;python has stopped responding&quot;.</p><p><br /></p><p>I have attempted to add a short delay at the end to try to prevent freezing.  Note that this stimulus type requires a loop of multiple images.</p><p><br /></p><p>I have attached a code example of an inline script used to present stimuli:</p><p><br /></p><p>import os</p><p>import time</p><p><br /></p><p># Function to present complex stimuli</p><p>def present_complex_stimulus(complex_stim_prefix):</p><p># Construct the list of image filenames</p><p>image_filenames = [f&#39;{complex_stim_prefix}_{i}.png&#39; for i in range(1, 10)]</p><p><br /></p><p>for img_filename in image_filenames:</p><p># Construct the full image path</p><p>img_path = os.path.join(image_dir, img_filename)</p><p><br /></p><p># Clear the canvas before showing the new image</p><p>my_canvas.clear()</p><p><br /></p><p># Show the new image</p><p>my_canvas.image(img_path, center=True, x=0, y=0, scale=var.image_scale)</p><p>my_canvas.show()</p><p><br /></p><p>time.sleep(0.4) # Display each image for 400 ms</p><p><br /></p><p>var.complex_stim_prefix = selected_set[&quot;complex_stim_prefix&quot;]</p><p><br /></p><p># Present the complex stimulus</p><p>present_complex_stimulus(var.complex_stim_prefix)</p><p><br /></p><p># Resetting variables</p><p>started_lookingaway = False</p><p>insp_dur = 0</p><p>disconnect_dur = 0</p><p>lookaway_dur = 0</p><p><br /></p><p># Initialize trial-specific variables</p><p>var.t0 = time.time()</p><p>var.insp_dur = 0</p><p>var.lookaway_dur = 0</p><p>var.disconnect_dur = 0</p><p><br /></p><p># Eye tracking loop</p><p>while True:</p><p># Get the current time at the start of the iteration</p><p>current_time = time.time()</p><p><br /></p><p># Calculate elapsed time from the start of the loop</p><p>elapsed_time = current_time - var.t0</p><p><br /></p><p># Sample gaze coordinates</p><p>x, y = eyetracker.sample()</p><p><br /></p><p>if elapsed_time &gt;= 5:</p><p>break # Exit the loop if the maximum duration is reached</p><p><br /></p><p>if eyetracker.connected():</p><p>if var.x_min &lt; x &lt; var.x_max and var.y_min &lt; y &lt; var.y_max:</p><p># If on target, log inspection duration and reset looking away timer</p><p>var.insp_dur = elapsed_time</p><p>var.lookaway_dur = 0</p><p>else:</p><p># If not on target, append new time to looking away timer</p><p>var.lookaway_dur += (current_time - var.t0)</p><p># If looking away for 1.5 or more seconds, run grabber_loop2</p><p>if var.lookaway_dur &gt;= 1.5:</p><p>run_grabber = True</p><p>break</p><p>else:</p><p># Increment disconnect duration</p><p>var.disconnect_dur += (current_time - var.t0)</p><p>if var.disconnect_dur &gt;= 1.5:</p><p>break</p><p><br /></p><p><br /></p><p># Check if the trial should end based on the specified conditions</p><p>if elapsed_time &gt;= 5 or var.lookaway_dur &gt;= 1.5:</p><p>break</p><p><br /></p><p># Update var.t0 to the current time at the end of the iteration</p><p>var.t0 = current_time</p><p><br /></p><p># Add a small delay to prevent freezing</p><p>time.sleep(0.01)</p><p><br /></p><p># Clear the canvas</p><p>my_canvas.clear()</p><p>my_canvas.show()</p><p><br /></p><p>Could you spot anything in my code that may be causing an infinite loop? Or is this problem related to hardware?</p>]]>
        </description>
    </item>
    <item>
        <title>Resetting module to update constants.py</title>
        <link>https://forum.cogsci.nl/discussion/9255/resetting-module-to-update-constants-py</link>
        <pubDate>Wed, 17 Apr 2024 10:38:41 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>98_Skoert</dc:creator>
        <guid isPermaLink="false">9255@/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p><br /></p><p>I am creating a script that should allow me to run multiple experiments in a row without restarting the script. I want to have the option to change values that are saved in constants.py (e.g. tracker type) between these sessions, I think that this is doable by re-loading the entire pygaze module, but I was hoping that there would be a faster way. I saw that this problem was mentioned in <a href="https://github.com/esdalmaijer/PyGaze/issues/13" rel="nofollow">https://github.com/esdalmaijer/PyGaze/issues/13</a> , but it seems that this fix has not been implemented to the latest version.</p><p>Is there a better way of changing the values from constants.py between two experiments than  re-loading the entire module?</p>]]>
        </description>
    </item>
    <item>
        <title>OpenGaze experiment crashes</title>
        <link>https://forum.cogsci.nl/discussion/9192/opengaze-experiment-crashes</link>
        <pubDate>Wed, 13 Mar 2024 11:58:35 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>natasha_basil_</dc:creator>
        <guid isPermaLink="false">9192@/discussions</guid>
        <description><![CDATA[<p>Hi! I am currently conducting an eye-tracking experiment utilizing the GP3HD eye tracker in conjunction with OpenSesame.</p><p>While the experiment that I built with Open Sesame connects to the eye tracker and works fine, I&#39;ve encountered a significant problem with the OpenGaze analysis app. Specifically, the app consistently crashes at random intervals during the experiment. Consequently, the recording halts abruptly, and no data is saved (even though the experiment in Open Sesame continues to run). I guess this is likely not an OpenSesame problem but rather an issue with OpenGaze software. But maybe someone has experienced it and could help me to solve this issue.</p>]]>
        </description>
    </item>
    <item>
        <title>Trying to replicate the Gabor patch from the book &quot;Python for experimental psychologist&quot;</title>
        <link>https://forum.cogsci.nl/discussion/9226/trying-to-replicate-the-gabor-patch-from-the-book-python-for-experimental-psychologist</link>
        <pubDate>Thu, 28 Mar 2024 10:06:11 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>JR088</dc:creator>
        <guid isPermaLink="false">9226@/discussions</guid>
        <description><![CDATA[<p>Hi ! </p><p>I bought the book &quot;Python for experimental psychologists&quot; and I am at the Gabor patch section. I am using the package WinPyhton-PyGaze-0.6.0</p><p>My &quot;constants.py&quot; code has the following parameters :</p><p> DISPSIZE = (1920, 1080)</p><p>DISPTYPE = &#39;psychopy&#39;</p><p>My &quot;experiment.py&quot; code for the gabor patch replicates the book code with the Pygaze version</p><p>import pygaze</p><p>from psychopy.visual import GratingStim</p><p>from pygaze.display import Display</p><p>from pygaze.screen import Screen</p><p>import pygaze.libtime as timer</p><p>disp = Display()</p><p>gabor = GratingStim(pygaze.expdisplay, tex=&#39;sin&#39;, mask=&#39;gauss&#39;, sf=0.05, size=200)</p><p>gaborscreen = Screen()</p><p>gaborscreen.screen.append(gabor)</p><p>disp.fill(gaborscreen)</p><p>disp.show()</p><p>timer.pause(1000)</p><p>disp.close()</p><p><br /></p><p>But I got the following error message and I don&#39;t get it, so if you help me, it would be great, thanks a lot !</p><p><br /></p><p>FreeType import Failed: expected string or Unicode object, NoneType found</p><p>Traceback (most recent call last):</p><p>&nbsp;File &quot;experiment.py&quot;, line 21, in &lt;module&gt;</p><p>&nbsp;&nbsp;disp = Display()</p><p>&nbsp;File &quot;C:\Users\JEANR\Documents\WinPython-PyGaze-0.6.0\WinPython-PyGaze-0.6.0\python-2.7.3\lib\site-packages\pygaze\display.py&quot;, line 45, in __init__</p><p>&nbsp;&nbsp;self.__class__.__init__(self, **args)</p><p>&nbsp;File &quot;C:\Users\JEANR\Documents\WinPython-PyGaze-0.6.0\WinPython-PyGaze-0.6.0\python-2.7.3\lib\site-packages\pygaze\_display\psychopydisplay.py&quot;, line 70, in __init__</p><p>&nbsp;&nbsp;screen=self.screennr, units=&#39;pix&#39;)</p><p>&nbsp;File &quot;C:\Users\JEANR\Documents\WinPython-PyGaze-0.6.0\WinPython-PyGaze-0.6.0\python-2.7.3\lib\site-packages\psychopy\visual\window.py&quot;, line 237, in __init__</p><p>&nbsp;&nbsp;self.scrWidthCM = self.monitor.getWidth()</p><p>AttributeError: &#39;NoneType&#39; object has no attribute &#39;getWidth&#39;</p><p>0.8789&nbsp;ERROR&nbsp;&nbsp;avbin.dll failed to load.</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try importing psychopy.visual as the first library</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(before anything that uses scipy)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and make sure that avbin is installed.</p><p>0.8931&nbsp;ERROR&nbsp;&nbsp;avbin.dll failed to load.</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try importing psychopy.visual as the first library</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(before anything that uses scipy)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and make sure that avbin is installed.</p><p>0.9754&nbsp;WARNING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creating new monitor...</p>]]>
        </description>
    </item>
    <item>
        <title>Using WinPython-PyGaze-0.6.0 package and trying to justify the text within its box with TextStim</title>
        <link>https://forum.cogsci.nl/discussion/9289/using-winpython-pygaze-0-6-0-package-and-trying-to-justify-the-text-within-its-box-with-textstim</link>
        <pubDate>Fri, 03 May 2024 13:49:16 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>JR088</dc:creator>
        <guid isPermaLink="false">9289@/discussions</guid>
        <description><![CDATA[<p>Hi, I am trying to &quot;center justify&quot; the text within its box with TextStim. I am using the package WinPython-PyGaze-0.6.0 which uses python 2.7.3</p><p>I am unable to center justify the text within its box, (by default it is left justify...). </p><p>e.g., </p><p>&nbsp;&nbsp;text1 = &quot;All right, blablablabl...&quot;</p><p>&nbsp;text_stim1 = TextStim(disp, text=text1, pos=(0,200), height=24, color= [0.8, -0.5, -0.5], wrapWidth=800, alignHoriz = &#39;center&#39;)</p><p><br /></p><p>Note that alighHoriz adjusts the box itself, not the text</p><p>in the TextStim doc the &quot;alingText&quot; argument seems to do what I want but my python version does not recognize this argument. </p><p>How can I do ?</p>]]>
        </description>
    </item>
    <item>
        <title>Using WinPython-PyGaze-0.6.0 package after reading &quot;Python for experimental psychologist&quot;</title>
        <link>https://forum.cogsci.nl/discussion/9287/using-winpython-pygaze-0-6-0-package-after-reading-python-for-experimental-psychologist</link>
        <pubDate>Fri, 03 May 2024 07:54:55 +0000</pubDate>
        <category>PyGaze</category>
        <dc:creator>JR088</dc:creator>
        <guid isPermaLink="false">9287@/discussions</guid>
        <description><![CDATA[<p>I am doing a memory experiment, and for that I read &quot;Python for experimental psychologist&quot;. </p><p>I am using the psychopy &quot;way&quot; of doing, but even with pygaze I systematically got two error messages, even though the script is runing (sometimes) correctly. </p><p>Here are the two error messages, and the begining of my script. I am just giving the begining because whatever I do, I got the error messages</p><p><br /></p><p>First error:</p><p>FreeType import Failed: expected string or Unicode object, NoneType found</p><p>Second error: </p><p>0.4375&nbsp;ERROR&nbsp;&nbsp;avbin.dll failed to load.</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try importing psychopy.visual as the first library</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(before anything that uses scipy)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and make sure that avbin is installed.</p><p>0.4479&nbsp;ERROR&nbsp;&nbsp;avbin.dll failed to load.</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try importing psychopy.visual as the first library</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(before anything that uses scipy)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and make sure that avbin is installed.</p><p>0.5047&nbsp;WARNING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creating new monitor...</p><p>0.5048&nbsp;WARNING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creating new monitor...</p><p><br /></p><p>The begining of my script : </p><p>LOGFILENAME = raw_input(&#39;Participant name: &#39;)</p><p>LOGFILE = LOGFILENAME</p><p><br /></p><p>from psychopy.visual import Window, TextStim, Circle</p><p>from constants import *</p><p>from psychopy.event import waitKeys</p><p>from psychopy.core import wait</p><p>import random</p><p><br /></p><p># create a Window to deal with the monitor</p><p>disp = Window(size=DISPSIZE, units=&#39;pix&#39;, color=BGC, fullscr=True)</p><p>disp</p><p>disp.flip()</p><p>wait(1)</p><p><br /></p><p># create a Circle stimulus for fixation purposes</p><p>fixstim = Circle(disp, radius=6, edges=32, lineColor=FGC, fillColor=FGC)</p><p><br /></p><p>## open a new file instance</p><p>log = open(LOGFILE + &#39;.tsv&#39;, &#39;w&#39;)</p><p><br /></p><p># define a header</p><p>header = [&#39;Sujet&#39;,&#39;Type_Word&#39;, &#39;Word&#39;, &#39;condPGD&#39;, &#39;Resp&#39;, &#39;Correct&#39;, &#39;Correct_Type&#39;, &#39;Hit&#39;, &#39;Miss&#39;, &#39;FA&#39;, &#39;CR&#39;, &#39;RT&#39;]</p><p># make all values in the header into strings (all values are strings already, but this is an example)</p><p>line = map(str, header)</p><p># join all string values into one string, separated by tabs (&#39;\t&#39;)</p><p>line = &#39;\t&#39;.join(line)</p><p># add a newline (&#39;\n&#39;) to the string</p><p>line += &#39;\n&#39;</p><p># write the header to the log file</p><p>log.write(line)</p>]]>
        </description>
    </item>
   </channel>
</rss>
