Millisecond Forums

Eye tracker related question (Tobii) - obtaining data with input method is 'keyboard'

https://forums.millisecond.com/Topic26288.aspx

By Musashi Jason - 1/24/2019

Hello all,
I have a question related to how to get data saved when using an eye tracker with a trial that uses the 'keyboard' input method. I am wording the question like this because:
I have downloaded the "kittensorpuppies" sample script and note that all eye tracker data is saved to separate files without being specifically specified in the data section of the script. In my script, however, I am using 'keyboard' as the input method (as opposed to "eyetracker" and am getting no such data saved even though the eye tracker is running during the experiment/trial.
I am guessing that I need to specify all of the desired data:
markerleftpixelx         leftpixely         rightpixelx       rightpixely       focuspixelx      focuspixely      leftgazex         leftgazey         leftgazez            rightgazex       rightgazey       rightgazez       lefteyex           lefteyey           lefteyez           righteyex         righteyey         righteyez            leftpupilwidthleftpupilheightrightpupilwidth           rightpupilheight          leftvalidity       rightvalidity     hasleftfixationleftfixationpixelx            leftfixationpixely         hasrightfixation           rightfixationpixelx       rightfixationpixely       hasfocusfixation         focusfixationpixelx            focusfixationpixely
in the script if I want to have it saved to a file...? Thought I'd ask prior to hacking up my script...sorry for the laziness.

Jason

By Dave - 1/24/2019

Musashi Jason - Thursday, January 24, 2019
Hello all,
I have a question related to how to get data saved when using an eye tracker with a trial that uses the 'keyboard' input method. I am wording the question like this because:
I have downloaded the "kittensorpuppies" sample script and note that all eye tracker data is saved to separate files without being specifically specified in the data section of the script. In my script, however, I am using 'keyboard' as the input method (as opposed to "eyetracker" and am getting no such data saved even though the eye tracker is running during the experiment/trial.
I am guessing that I need to specify all of the desired data:
markerleftpixelx         leftpixely         rightpixelx       rightpixely       focuspixelx      focuspixely      leftgazex         leftgazey         leftgazez            rightgazex       rightgazey       rightgazez       lefteyex           lefteyey           lefteyez           righteyex         righteyey         righteyez            leftpupilwidthleftpupilheightrightpupilwidth           rightpupilheight          leftvalidity       rightvalidity     hasleftfixationleftfixationpixelx            leftfixationpixely         hasrightfixation           rightfixationpixelx       rightfixationpixely       hasfocusfixation         focusfixationpixelx            focusfixationpixely
in the script if I want to have it saved to a file...? Thought I'd ask prior to hacking up my script...sorry for the laziness.

Jason


You can do both. When inputdevice is keyboard and you want to have eyetracker data in a separate data file, then defining the <eyetracker> element and /datastreams = eyetracker in the <trial>, <block> and/or <expt> elements during which you wish to acquire tracking data will work fine. If there are <trial> elements you wish to exclude, you can set /datastreams = false, and then no tracking data will be acquired during those trials. Hope this helps.
By Musashi Jason - 1/25/2019

Dave - Friday, January 25, 2019
Musashi Jason - Thursday, January 24, 2019
Hello all,
I have a question related to how to get data saved when using an eye tracker with a trial that uses the 'keyboard' input method. I am wording the question like this because:
I have downloaded the "kittensorpuppies" sample script and note that all eye tracker data is saved to separate files without being specifically specified in the data section of the script. In my script, however, I am using 'keyboard' as the input method (as opposed to "eyetracker" and am getting no such data saved even though the eye tracker is running during the experiment/trial.
I am guessing that I need to specify all of the desired data:
markerleftpixelx         leftpixely         rightpixelx       rightpixely       focuspixelx      focuspixely      leftgazex         leftgazey         leftgazez            rightgazex       rightgazey       rightgazez       lefteyex           lefteyey           lefteyez           righteyex         righteyey         righteyez            leftpupilwidthleftpupilheightrightpupilwidth           rightpupilheight          leftvalidity       rightvalidity     hasleftfixationleftfixationpixelx            leftfixationpixely         hasrightfixation           rightfixationpixelx       rightfixationpixely       hasfocusfixation         focusfixationpixelx            focusfixationpixely
in the script if I want to have it saved to a file...? Thought I'd ask prior to hacking up my script...sorry for the laziness.

Jason


You can do both. When inputdevice is keyboard and you want to have eyetracker data in a separate data file, then defining the <eyetracker> element and /datastreams = eyetracker in the <trial>, <block> and/or <expt> elements during which you wish to acquire tracking data will work fine. If there are <trial> elements you wish to exclude, you can set /datastreams = false, and then no tracking data will be acquired during those trials. Hope this helps.

Dave,

Thanks. As always, you are an enourmous help. I've managed to make another baby step in the correct direction but I'm afraid I'm not grasping the process of 1. marking specific points in the data stream with the eye tracker and 2. how to obtain detailed gaze data (x, y point, time stamps, etc.) from the tracker. Attached is my work in progress script. I'm wanting to obtain detailed gaze information for each of the trials and have started experimenting primarily with the "traning session" trail. I want to know:

Where participants are looking when mypicturetrainT and mypicturetrainF appear. I think (hope) that if I can get this working properly on one trial I should be able to then apply my understanding to other areas in the script (fingers crossed).

Thanks in advance for any help and suggestions you are able to provide.

Regards

Jason

P.S. I was unable to attach the entire script directory (including jpeg and wav files) due to a size limitation so I am attaching the script only here.


By Dave - 1/25/2019

Musashi Jason - Friday, January 25, 2019
Dave - Friday, January 25, 2019
Musashi Jason - Thursday, January 24, 2019
Hello all,
I have a question related to how to get data saved when using an eye tracker with a trial that uses the 'keyboard' input method. I am wording the question like this because:
I have downloaded the "kittensorpuppies" sample script and note that all eye tracker data is saved to separate files without being specifically specified in the data section of the script. In my script, however, I am using 'keyboard' as the input method (as opposed to "eyetracker" and am getting no such data saved even though the eye tracker is running during the experiment/trial.
I am guessing that I need to specify all of the desired data:
markerleftpixelx         leftpixely         rightpixelx       rightpixely       focuspixelx      focuspixely      leftgazex         leftgazey         leftgazez            rightgazex       rightgazey       rightgazez       lefteyex           lefteyey           lefteyez           righteyex         righteyey         righteyez            leftpupilwidthleftpupilheightrightpupilwidth           rightpupilheight          leftvalidity       rightvalidity     hasleftfixationleftfixationpixelx            leftfixationpixely         hasrightfixation           rightfixationpixelx       rightfixationpixely       hasfocusfixation         focusfixationpixelx            focusfixationpixely
in the script if I want to have it saved to a file...? Thought I'd ask prior to hacking up my script...sorry for the laziness.

Jason


You can do both. When inputdevice is keyboard and you want to have eyetracker data in a separate data file, then defining the <eyetracker> element and /datastreams = eyetracker in the <trial>, <block> and/or <expt> elements during which you wish to acquire tracking data will work fine. If there are <trial> elements you wish to exclude, you can set /datastreams = false, and then no tracking data will be acquired during those trials. Hope this helps.

Dave,

Thanks. As always, you are an enourmous help. I've managed to make another baby step in the correct direction but I'm afraid I'm not grasping the process of 1. marking specific points in the data stream with the eye tracker and 2. how to obtain detailed gaze data (x, y point, time stamps, etc.) from the tracker. Attached is my work in progress script. I'm wanting to obtain detailed gaze information for each of the trials and have started experimenting primarily with the "traning session" trail. I want to know:

Where participants are looking when mypicturetrainT and mypicturetrainF appear. I think (hope) that if I can get this working properly on one trial I should be able to then apply my understanding to other areas in the script (fingers crossed).

Thanks in advance for any help and suggestions you are able to provide.

Regards

Jason

P.S. I was unable to attach the entire script directory (including jpeg and wav files) due to a size limitation so I am attaching the script only here.



To mark a specific point in the stream, you send a <port> marker at the appropriate point in time during your <trial>, i.e. by setting the port element to the value you wish to send and then inserting the marker into your trials' /stimulustimes or -frames at the point when you wish to send the marker. The marker value should then appear in the gaze data stream (cf. https://www.millisecond.com/forums/Topic16009.aspx#bm16016). Looking at your script, it seems you've already set that up, so I'm not sure what's amiss or what I am missing.

As for point #2, to obtain detailed gaze data, you'll want to log detailed gaze data to the <eyetracker> data file, see https://www.millisecond.com/support/docs/v5/html/language/elements/eyetracker.htm under properties, and https://www.millisecond.com/support/docs/v5/html/language/elements/eyetrackertobii.htm for some more Tobii-plugin specific properties. Currently, you don't seem to log anything there except for the eyetracker.lasttimestamp property

<eyetracker>
/ plugin = "tobii"
/ columns = (date, time, group, subject, build, blocknum, trialnum, blockcode, trialcode, pretrialpause, posttrialpause, trialduration, trialtimeout, response, correct, latency,
eyetracker.lasttimestamp, stimulusnumber, stimulusitem, stimulusonset, stimulusnumber, stimulusitem, stimulusonset, stimulusnumber, stimulusitem, stimulusonset)
</eyetracker>

For illustration, see e.g. this example from the Corsi w/ eyetracking example (https://www.millisecond.com/download/library/v5/tobii/corsiblocktappingtask/corsiblocktappingtaskeyetracking.iqx ):

<eyetracker>
/ plugin = "tobii"
/ columns = (date, time, groupid, subjectid, timestamp, focuspixelx, focuspixely, focusfixationpixelx, focusfixationpixely)
</eyetracker>

If you don't specify /columns in the <eyetracker> element at all, then the following data should be captured automatically: https://www.millisecond.com/support/docs/v5/html/howto/tobii.htm , under "Eyetracker Data Recorded by the Plugin."

Hope this helps.

By Musashi Jason - 1/27/2019


Dave,

Thanks. Yes, it was tremendously helpful. As always, thank you for your amazing support. I ended up deleting the /columns line and, as a result, am now getting even more data than is introduced on the page you provided. For example, I have [hasleftfixation x and y, hasrightfixation x any y, hasfocusfixation, etc.].

My next dilemma, moving forward, is how to match up the data I'm obtaining, temporally, between response data recorded and the data I have from the eyetracker. I'm guessing I need to back up a step and specify the data I want, using /columns, in order to combine these data sets...?

For example, I want to know what item (picture) subjects are looking at and how they are looking at it so I guess I need something like:

/columns = script.stimulusitem2, scriptstimulusitem3, and then all of the eyetracker data sets that I desire...?

Or...maybe there is a way to obtain timestamp data in the ###raw.iqdat file and use the timestamp as the reference point between the two data sets?

Thanks again for your help. I can see the light at the end of the tunnel. :-)

Regards

Jason
By Musashi Jason - 1/27/2019

Musashi Jason - Sunday, January 27, 2019

Dave,

Thanks. Yes, it was tremendously helpful. As always, thank you for your amazing support. I ended up deleting the /columns line and, as a result, am now getting even more data than is introduced on the page you provided. For example, I have [hasleftfixation x and y, hasrightfixation x any y, hasfocusfixation, etc.].

My next dilemma, moving forward, is how to match up the data I'm obtaining, temporally, between response data recorded and the data I have from the eyetracker. I'm guessing I need to back up a step and specify the data I want, using /columns, in order to combine these data sets...?

For example, I want to know what item (picture) subjects are looking at and how they are looking at it so I guess I need something like:

/columns = script.stimulusitem2, scriptstimulusitem3, and then all of the eyetracker data sets that I desire...?

Or...maybe there is a way to obtain timestamp data in the ###raw.iqdat file and use the timestamp as the reference point between the two data sets?

Thanks again for your help. I can see the light at the end of the tunnel. :-)

Regards

Jason

Dave,

Sorry, I am resonding to myself here again. I see in the Corsi script where the columns are specified as follows:

<data Corsi>
/ columns = (build, computer.platform, date,time,subject,group, blocknum,blockcode,trialnum,trialcode,values.seqnumber,
values.seqlength,values.seqstring,values.respstring,response,latency,eyetracker.lasttimestamp,values.correct,
values.ncorrectinblock,values.ncorrecttotal,values.blockspan,values.totalscore)
/ separatefiles = true

So, if I do something similar, and include eyetracker.lasttimestamp (or whatever I want from the eye tracker data stream), I should be able to get the result I desire. I'll do some experiementing before posting another inquiry.

Regards

Jason