Millisecond Forums

How do I create markers in eye tracking data for survey pages?

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

By amomen425 - 11/5/2018

I am having trouble figuring out how to implement something which I thought would be relatively easy. Basically, I am having participants take a survey and am tracking their eye movements using the tobii plug in. Since there are multiple survey pages, I would like to know the survey page that corresponds to the eye tracking data. As you can see from the code below, I have tried to implements 'markers', but it hasn't worked. Could anyone offer any insight?

<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
]
/ stimulustimes = [0 = Marker]
</surveypage>

<surveypage TS_AVC_1_B>
/ questions = [1= Anger_instr_AV_1, Anger_AV_1, Irritability_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_C]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "2";
]
/ stimulustimes = [0 = Marker]
</surveypage>
By Dave - 11/5/2018

amomen425 - Monday, November 5, 2018
I am having trouble figuring out how to implement something which I thought would be relatively easy. Basically, I am having participants take a survey and am tracking their eye movements using the tobii plug in. Since there are multiple survey pages, I would like to know the survey page that corresponds to the eye tracking data. As you can see from the code below, I have tried to implements 'markers', but it hasn't worked. Could anyone offer any insight?

<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
]
/ stimulustimes = [0 = Marker]
</surveypage>

<surveypage TS_AVC_1_B>
/ questions = [1= Anger_instr_AV_1, Anger_AV_1, Irritability_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_C]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "2";
]
/ stimulustimes = [0 = Marker]
</surveypage>

At a minimum, you need to share the code for the "marker" element as well as how you invoke those surveypages, e.g. are they run in a <block> or a <survey>? As for other supplemental information that would be useful:
- Which Inquisit version are you currently using (Help -> About?)
- Is the gaze data otherwise written properly?
- What is the exact specification of your <eyetracker> element?
- Have you followed the instructions in https://www.millisecond.com/support/docs/v5/html/howto/sendmarkerstotobii.htm to set up the markers?
By amomen425 - 11/6/2018

Dave - Monday, November 5, 2018
amomen425 - Monday, November 5, 2018
I am having trouble figuring out how to implement something which I thought would be relatively easy. Basically, I am having participants take a survey and am tracking their eye movements using the tobii plug in. Since there are multiple survey pages, I would like to know the survey page that corresponds to the eye tracking data. As you can see from the code below, I have tried to implements 'markers', but it hasn't worked. Could anyone offer any insight?

<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
]
/ stimulustimes = [0 = Marker]
</surveypage>

<surveypage TS_AVC_1_B>
/ questions = [1= Anger_instr_AV_1, Anger_AV_1, Irritability_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_C]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "2";
]
/ stimulustimes = [0 = Marker]
</surveypage>

At a minimum, you need to share the code for the "marker" element as well as how you invoke those surveypages, e.g. are they run in a <block> or a <survey>? As for other supplemental information that would be useful:
- Which Inquisit version are you currently using (Help -> About?)
- Is the gaze data otherwise written properly?
- What is the exact specification of your <eyetracker> element?
- Have you followed the instructions in https://www.millisecond.com/support/docs/v5/html/howto/sendmarkerstotobii.htm to set up the markers?
-My Inquisit version is: 5.0.14.0
-Not sure what you mean by 'is the gaze data is written properly otherwise'. I just want the participant's gaze data and creating the area's of interest outside of Inquisit using R Software.
-I have followed the instructions from that page. However, I am new to programming and although I tried my best to implement the relevant portions, not sure I got it right.

Here is the code for the marker and the eye tracking element..
<eyetracker>
/ plugin = "tobii"
</eyetracker>

<port Marker>
/ port = eyetracker
/ items = (0)
</port>

Here is code showing how the surveypages are invoked (with a survey and not a block)

<radiobuttons Intentionality_AV_1>
/ caption = "<%parameters.TS_AVC_1%>"
/ subcaption = "<%parameters.AV_Question_A%>"
/ options = ("a) It intentionally did this to mess up the traffic.
","b) It did not mean anything wrong, just a mistake.")
/ required = false
/ orientation = vertical
/ position = (100px, 100px)
</radiobuttons>
<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "";
values.marker = concat(values.marker, "1");
]
/ stimulustimes = [0 = Marker]
</surveypage>


By Dave - 11/6/2018

amomen425 - Tuesday, November 6, 2018
Dave - Monday, November 5, 2018
amomen425 - Monday, November 5, 2018
I am having trouble figuring out how to implement something which I thought would be relatively easy. Basically, I am having participants take a survey and am tracking their eye movements using the tobii plug in. Since there are multiple survey pages, I would like to know the survey page that corresponds to the eye tracking data. As you can see from the code below, I have tried to implements 'markers', but it hasn't worked. Could anyone offer any insight?

<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
]
/ stimulustimes = [0 = Marker]
</surveypage>

<surveypage TS_AVC_1_B>
/ questions = [1= Anger_instr_AV_1, Anger_AV_1, Irritability_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_C]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "2";
]
/ stimulustimes = [0 = Marker]
</surveypage>

At a minimum, you need to share the code for the "marker" element as well as how you invoke those surveypages, e.g. are they run in a <block> or a <survey>? As for other supplemental information that would be useful:
- Which Inquisit version are you currently using (Help -> About?)
- Is the gaze data otherwise written properly?
- What is the exact specification of your <eyetracker> element?
- Have you followed the instructions in https://www.millisecond.com/support/docs/v5/html/howto/sendmarkerstotobii.htm to set up the markers?
-My Inquisit version is: 5.0.14.0
-Not sure what you mean by 'is the gaze data is written properly otherwise'. I just want the participant's gaze data and creating the area's of interest outside of Inquisit using R Software.
-I have followed the instructions from that page. However, I am new to programming and although I tried my best to implement the relevant portions, not sure I got it right.

Here is the code for the marker and the eye tracking element..
<eyetracker>
/ plugin = "tobii"
</eyetracker>

<port Marker>
/ port = eyetracker
/ items = (0)
</port>

Here is code showing how the surveypages are invoked (with a survey and not a block)

<radiobuttons Intentionality_AV_1>
/ caption = "<%parameters.TS_AVC_1%>"
/ subcaption = "<%parameters.AV_Question_A%>"
/ options = ("a) It intentionally did this to mess up the traffic.
","b) It did not mean anything wrong, just a mistake.")
/ required = false
/ orientation = vertical
/ position = (100px, 100px)
</radiobuttons>
<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "";
values.marker = concat(values.marker, "1");
]
/ stimulustimes = [0 = Marker]
</surveypage>



> -Not sure what you mean by 'is the gaze data is written properly otherwise'.

What I mean is: When you execute the script, do you get a gaze data file _at all_? This goes to whether there is a general problem, apart from not getting markers into the stream.

Apart from that, there is something missing from your code. At no point to you actually _set_ the <port> element to the marker _value_. The marker remains 0 -- i.e. no signal -- throughout.

<surveypage Intentionality_AV_1>
...
/ ontrialbegin = [
values.marker = "";
values.marker = concat(values.marker, "1");

]
/ stimulustimes = [0 = Marker]
</surveypage>

Here you set values.marker to some value, albeit in an unncessarily complicated fashion. What you're not doing is setting port.marker to values.marker, i.e. this part from the documentation "how to":

<trial SodaBeer> /*trial to present soda can left and beer can right
/ontrialbegin = [
values.marker = "";/*reset marker value
values.marker = concat(values.marker, "01");/*add '01' for soda is left
values.marker = concat(values.marker, picture.sodaLeft.currentitemnumber); /* add current itemnumber for left image
values.marker = concat(values.marker, "02");/*add '02' for beer is right
values.marker = concat(values.marker, picture.beerRight.currentitemnumber);/* add current itemnumber for right image
port.dynamMarker.setitem(values.marker, 1);/*set the item for the marker you want to send
]
/stimulustimes = [0 = sodaLeft, beerRight, dynamMarker] /*sends 015027 at stimulusonset

</trial>

In short, to actually send markers, you need to modify your code like so:

<port Marker>
/ port = eyetracker
/ items = (0)
</port>

<radiobuttons Intentionality_AV_1>
/ caption = "<%parameters.TS_AVC_1%>"
/ subcaption = "<%parameters.AV_Question_A%>"
/ options = ("a) It intentionally did this to mess up the traffic.
","b) It did not mean anything wrong, just a mistake.")
/ required = false
/ orientation = vertical
/ position = (100px, 100px)
</radiobuttons>
<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
port.Marker.setitem(values.marker, 1);
]
/ stimulustimes = [0 = Marker]
</surveypage>
By amomen425 - 11/13/2018

Dave - Tuesday, November 6, 2018
amomen425 - Tuesday, November 6, 2018
Dave - Monday, November 5, 2018
amomen425 - Monday, November 5, 2018
I am having trouble figuring out how to implement something which I thought would be relatively easy. Basically, I am having participants take a survey and am tracking their eye movements using the tobii plug in. Since there are multiple survey pages, I would like to know the survey page that corresponds to the eye tracking data. As you can see from the code below, I have tried to implements 'markers', but it hasn't worked. Could anyone offer any insight?

<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
]
/ stimulustimes = [0 = Marker]
</surveypage>

<surveypage TS_AVC_1_B>
/ questions = [1= Anger_instr_AV_1, Anger_AV_1, Irritability_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_C]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "2";
]
/ stimulustimes = [0 = Marker]
</surveypage>

At a minimum, you need to share the code for the "marker" element as well as how you invoke those surveypages, e.g. are they run in a <block> or a <survey>? As for other supplemental information that would be useful:
- Which Inquisit version are you currently using (Help -> About?)
- Is the gaze data otherwise written properly?
- What is the exact specification of your <eyetracker> element?
- Have you followed the instructions in https://www.millisecond.com/support/docs/v5/html/howto/sendmarkerstotobii.htm to set up the markers?
-My Inquisit version is: 5.0.14.0
-Not sure what you mean by 'is the gaze data is written properly otherwise'. I just want the participant's gaze data and creating the area's of interest outside of Inquisit using R Software.
-I have followed the instructions from that page. However, I am new to programming and although I tried my best to implement the relevant portions, not sure I got it right.

Here is the code for the marker and the eye tracking element..
<eyetracker>
/ plugin = "tobii"
</eyetracker>

<port Marker>
/ port = eyetracker
/ items = (0)
</port>

Here is code showing how the surveypages are invoked (with a survey and not a block)

<radiobuttons Intentionality_AV_1>
/ caption = "<%parameters.TS_AVC_1%>"
/ subcaption = "<%parameters.AV_Question_A%>"
/ options = ("a) It intentionally did this to mess up the traffic.
","b) It did not mean anything wrong, just a mistake.")
/ required = false
/ orientation = vertical
/ position = (100px, 100px)
</radiobuttons>
<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "";
values.marker = concat(values.marker, "1");
]
/ stimulustimes = [0 = Marker]
</surveypage>



> -Not sure what you mean by 'is the gaze data is written properly otherwise'.

What I mean is: When you execute the script, do you get a gaze data file _at all_? This goes to whether there is a general problem, apart from not getting markers into the stream.

Apart from that, there is something missing from your code. At no point to you actually _set_ the <port> element to the marker _value_. The marker remains 0 -- i.e. no signal -- throughout.

<surveypage Intentionality_AV_1>
...
/ ontrialbegin = [
values.marker = "";
values.marker = concat(values.marker, "1");

]
/ stimulustimes = [0 = Marker]
</surveypage>

Here you set values.marker to some value, albeit in an unncessarily complicated fashion. What you're not doing is setting port.marker to values.marker, i.e. this part from the documentation "how to":

<trial SodaBeer> /*trial to present soda can left and beer can right
/ontrialbegin = [
values.marker = "";/*reset marker value
values.marker = concat(values.marker, "01");/*add '01' for soda is left
values.marker = concat(values.marker, picture.sodaLeft.currentitemnumber); /* add current itemnumber for left image
values.marker = concat(values.marker, "02");/*add '02' for beer is right
values.marker = concat(values.marker, picture.beerRight.currentitemnumber);/* add current itemnumber for right image
port.dynamMarker.setitem(values.marker, 1);/*set the item for the marker you want to send
]
/stimulustimes = [0 = sodaLeft, beerRight, dynamMarker] /*sends 015027 at stimulusonset

</trial>

In short, to actually send markers, you need to modify your code like so:

<port Marker>
/ port = eyetracker
/ items = (0)
</port>

<radiobuttons Intentionality_AV_1>
/ caption = "<%parameters.TS_AVC_1%>"
/ subcaption = "<%parameters.AV_Question_A%>"
/ options = ("a) It intentionally did this to mess up the traffic.
","b) It did not mean anything wrong, just a mistake.")
/ required = false
/ orientation = vertical
/ position = (100px, 100px)
</radiobuttons>
<surveypage TS_AVC_1_A>
/ questions = [1 = Intentionality_AV_1]
/ showpagenumbers = false
/ showquestionnumbers = false
/ branch = [surveypage.TS_AVC_1_B]
/ recorddata = true
/ datastreams = eyetracker
/ screencapture = true
/ ontrialbegin = [
values.marker = "1";
port.Marker.setitem(values.marker, 1);
]
/ stimulustimes = [0 = Marker]
</surveypage>

This was super helpful. thanks!