Howdy, Stranger!

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

Supported by

[open] Help with eye-tracking programming...

edited March 2015 in PyGaze

Hi all,

I am working on an eye-tracking project using the EyeTribe tracker and have started editing the "Pygaze Eyetracking Template" included with the Pygaze plugin for Opensesame. What I would like to do for this project is be able to record the gaze coordinates from the subject while they trace an object in the sketchpad (i.e. A triangle in this situation) and compare these coordinates to the actual coordinates of the lines making up the triangle. The purpose behind this is to be able to measure the saccades that the subject is experiencing while tracing this object and determine if they are suffering from a neurological issue. I have VERY little knowledge about programming and therefore am having several problems trying to code this experiment. The problems I am having currently are:

  1. Adding an "instruction" that asks the subject to "trace the object shown on the screen"
  2. Somehow determine the actual coordinates of the triangle I have drawn (all coordinates lying on the line)
  3. Make it so that you can press a key to end the experiment once the subject is finished tracing

These are the problems I have come across so far. If you have any other suggestions or advice that will make this experiment better, feel free to share! Thank you so much for your help!

Shelby

Comments

  • edited 6:59AM

    Hi Shelby,

    First of all, 2 out of your 3 questions are not really related to pygaze or eyetracking in general. Therefore, I believe you can gain much more insight, if you checked out one of the general OpenSesame tutorials, like the step-by-step tutorial for example. In that one, both your first and your last question will be answered.

    Somehow determine the actual coordinates of the triangle I have drawn (all coordinates lying on the line)

    This question is slightly more tricky. Also the most efficient implementation depends on what you actually need. For example, if you need to access eye positions and line coordinates of the circle online, that is, during the experiment, you would have to present the stimuli and sample the coordinates from within an inline_script (e.g. like so). However, if you only need this kind of information for the analysis of your data, you don't have to bother with it now in the experiment. You'll be better off, taking care of it later.

    Does this clear things up?

    Good luck,

    Eduard

    Buy Me A Coffee

  • edited 6:59AM

    Thank you so much for your quick response!

    I visited the tutorial that you suggested and it cleared some things up. I have been running my program and am confused as to why after the practice and experimental rounds the feedback screen keeps displaying: Accuracy: 0%. What is that supposed to be measuring? Secondly, at the beginning of each trial I select the subject number and the destination to save the data and at the end of the trial, I open up the data file and its empty. How do I get data? I am using the same template as before and haven't really changed much so I don't understand why its not collecting any data from the trial. The data I am looking for is the subject's gaze coordinates as they are tracing the object drawn in the sketchpad. Can you offer any advice for how to fix this problem? Thank you!

    Shelby

  • edited 6:59AM

    Hi Shelby,

    Accuracy: 0%. What is that supposed to be measuring?

    If you included a feedback item in your sequence, it will automatically keep track of reaction times and accuracy. For this purpose, OpenSesame has internal variables that keep track of given responses and the predefined correct ones, based on which accuracy is calculated. However, this requires that you define correct responses. If you don't do it, the accuracy value will be nonsense.

    How do I get data?

    Getting data includes two steps. First, you have to collect responses. There are many different ways, most of which are described here. Second, you have to log the responses. This is done with the logger item. In principal, all you need to do is dragging the logger at the position of your sequence, where you want to have it. and every time it is run, it will save all the data belonging to this trial, in a file, that is created during the initialization of the experiment. In general, you don't need to define or open any files to create or log the data.

    in your specific case, eye tracking changes things a little bit. In this sense, you need to use eye tracking items, like init,drift_correct or log to record all the information. To learn more about this, see the pygaze documentation. Or this small tutorial.

    In short, you need an inline_script, in which you call the sampling function of the eye tracker repeatedly in a loop, and write these eye positions to the log file (either the one that is created by the eye tracker, or the OpenSesame internal file.

    I hope this (and the links) helped. If not, just ask again. In this case, you could provide a few more information on the issues you encounter. Maybe a screenshot of your structure, an error message, a snapshot of the code that is unclear, or anything that is relevant to the issue.

    Good luck,

    Eduard

    Buy Me A Coffee

  • edited 6:59AM

    To further @eduard 's comment: the gaze data should be saved in a separate file, depending on which tracker you use this will either appear in the same directory as the other data file, or in the main OpenSesame directory (EyeLink oftentimes does this).

    So you don't have to manually get and write each sample to your log. What you will want to do, is use the PyGaze log item to add information about your experiment to your gaze data file, e.g. when the screen changes (fixation, stimulus is displayed etc.) and what stimulus is being displayed (e.g. the filename of an image you are showing).

    Good luck!

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