Millisecond Forums

Problem with the Script of Facial Displays of Emotion

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

By Nesard - 2/27/2017

Hi,

I'm trying to use the script of Facial Displays of Emotion: https://www.millisecond.com/download/library/faceemotions/ but it seems like the slider responses are not being recorded in the file FaceEmotion_rawdata.iqdat. Can you tell me how to fix that?

I'm using the demo version and running the script using the test monkey. All the other data seems to be recorded correctly.

Thanks.
By Dave - 2/27/2017

Nesard - Monday, February 27, 2017
Hi,

I'm trying to use the script of Facial Displays of Emotion: https://www.millisecond.com/download/library/faceemotions/ but it seems like the slider responses are not being recorded in the file FaceEmotion_rawdata.iqdat. Can you tell me how to fix that?

I'm using the demo version and running the script using the test monkey. All the other data seems to be recorded correctly.

Thanks.

There's nothing wrong with the script. The monkey will not respond to sliders. Nothing will be recorded if the <slider>s are set to /required=true. If you change that to /required=false, you'll see a 0 response when running the script through the monkey.

Running through the script manually as a participant would, will record the responses just fine, regardless of whether /required is set to true or false.
By Dave - 2/27/2017

Dave - Monday, February 27, 2017
Nesard - Monday, February 27, 2017
Hi,

I'm trying to use the script of Facial Displays of Emotion: https://www.millisecond.com/download/library/faceemotions/ but it seems like the slider responses are not being recorded in the file FaceEmotion_rawdata.iqdat. Can you tell me how to fix that?

I'm using the demo version and running the script using the test monkey. All the other data seems to be recorded correctly.

Thanks.

There's nothing wrong with the script. The monkey will not respond to sliders. Nothing will be recorded if the <slider>s are set to /required=true. If you change that to /required=false, you'll see a 0 response when running the script through the monkey.

Running through the script manually as a participant would, will record the responses just fine, regardless of whether /required is set to true or false.

If you want to have the monkey generate random test data, you can do the following:

#1: Set all sliders to /required=false
#2: Use the /monkeyresponse attribute to provide a random response in the desired range.

<slider anger>
/ caption = "Anger"
/labels = ("emotion not at all present (0)", "emotion expressed very intensely (100)")
/range = (0, 100)
/required = false
/ defaultresponse = 50
/slidersize = (50%, 3%)
/ fontstyle = ("Arial", 1.5%, true, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 1.0%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/ monkeyresponse = (expressions.slidermonkey)
</slider>

<expressions>
/ slidermonkey = round(rand(0,100))
</expressions>
By Nesard - 3/27/2017

Thanks, this worked.
Is there a way I can record the time a person takes to answer the questions on each surveypage?
Thanks.
By Dave - 3/27/2017

Nesard - Monday, March 27, 2017
Thanks, this worked.
Is there a way I can record the time a person takes to answer the questions on each surveypage?
Thanks.

You can get the overall latency it took to answer *all* questions on a given page, which will reflect when a person hit the page's "submit" or "next" button. This would be reflected in the standard latency column. To log this, you'll want to set the respective surveypages' /recorddata attributes to "true":

<surveypage emotionprofile_anger>
...
/branch = [surveypage.dailyoccurrence]
/showpagenumbers = false
/showquestionnumbers = true
/recorddata = true
</surveypage>

It is not possible to get individual latencies for each individual question on a page, and given that one may answer the questions in any order as well as revise one's answers (respond to question A -> respond to question B -> revise response to question A -> ...) it's not clear what would constitute such a hypothetical per-question latency.
By MinghuiNi - 3/2/2020

Hi Dave, 

I met the same problem that the slider response is not recorded. I added "/required = false" and also ran it manually but the problem doesn't seem to be solved. I was wondering if I need to specify what data to be recorded in the <data> section. Could you please help me with it? Thank you. 


Best, 
Minghui
By Dave - 3/2/2020

MinghuiNi - 3/2/2020
Hi Dave, 

I met the same problem that the slider response is not recorded. I added "/required = false" and also ran it manually but the problem doesn't seem to be solved. I was wondering if I need to specify what data to be recorded in the <data> section. Could you please help me with it? Thank you. 


Best, 
Minghui

If you edited the script in any way, I cannot help you without you providing the edited script. Get me the script you're using (you can attach files to a post by clicking +Insert -> Add File), and I should be able to tell you what's wrong with it.
By MinghuiNi - 3/2/2020

Hi Dave, 
Here is the part of the script about the slider. Thank you for your help in advance.
Best, 
Minghui

<block CRTT_partner_begin_first>
/trials = [1 = partner_inform]
/timeout = 5000
/branch = [block.setting_4_partner_first]
</block>

<trial partner_inform>
/ stimulusframes = [1 = inform_partner, coplayer_partner]
/ timeout = 5000
</trial>

<text inform_partner>
/ items = ("In this round, you are going to compete against your romantic partner")
/ position = (50, 50)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
</text>

<text coplayer_partner>
/ items = romanticpartner_nameresponse
/ position = (50, 60)
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
</text>

<block setting_4_partner_first>
/ trials = [1 = intensity_4_partner; 2 = duration_4_partner]
/ recorddata = true
/ branch = [block.CRTT_partner_first]
</block>

<surveypage intensity_4_partner>
/caption = " ~n~nPlease indicate the level of intensity of the noise blast you would like your romantic partner to receive if they lose in the following round."
/questions = [1=slider_intensity]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<slider slider_intensity>
/ labels = ("Level 0~n0db","1~n60db","2~n65db","3~n70db","4~n75db","5~n80db","6~n85db","7~n90db","8~n95db","9~n100db","Level 10~n105db")
/ range = (0,100)
/ defaultresponse = 50
/ position = (0%,40%)
/ slidersize = (83%,10%)
/ size = (100%, 10%)
/ increment = 1
/ showtooltips = true
/ required = false
</slider>

<surveypage duration_4_partner>
/caption = " ~n~nPlease indicate the level of duration of the noise blast you would like your romantic partner to receive if they lose in the following round."
/questions = [1=slider_duration]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<slider slider_duration>
/ labels = ("Level1~n0.0s","1~n0.2s","2~n0.4s","3~n0.6s","4~n0.8s","5~n1.0s","6~n1.2s","7~n1.4s","8~n1.6s","9~n1.8s","Level 10~n2.0s")
/ range = (0,100)
/ defaultresponse = 50
/ position = (0%,40%)
/ slidersize = (83%,10%)
/ size = (100%, 10%)
/ increment = 1
/ showtooltips = true
/ required = false
</slider>
By Dave - 3/2/2020

MinghuiNi - 3/3/2020
Hi Dave, 
Here is the part of the script about the slider. Thank you for your help in advance.
Best, 
Minghui

<block CRTT_partner_begin_first>
/trials = [1 = partner_inform]
/timeout = 5000
/branch = [block.setting_4_partner_first]
</block>

<trial partner_inform>
/ stimulusframes = [1 = inform_partner, coplayer_partner]
/ timeout = 5000
</trial>

<text inform_partner>
/ items = ("In this round, you are going to compete against your romantic partner")
/ position = (50, 50)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
</text>

<text coplayer_partner>
/ items = romanticpartner_nameresponse
/ position = (50, 60)
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
</text>

<block setting_4_partner_first>
/ trials = [1 = intensity_4_partner; 2 = duration_4_partner]
/ recorddata = true
/ branch = [block.CRTT_partner_first]
</block>

<surveypage intensity_4_partner>
/caption = " ~n~nPlease indicate the level of intensity of the noise blast you would like your romantic partner to receive if they lose in the following round."
/questions = [1=slider_intensity]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<slider slider_intensity>
/ labels = ("Level 0~n0db","1~n60db","2~n65db","3~n70db","4~n75db","5~n80db","6~n85db","7~n90db","8~n95db","9~n100db","Level 10~n105db")
/ range = (0,100)
/ defaultresponse = 50
/ position = (0%,40%)
/ slidersize = (83%,10%)
/ size = (100%, 10%)
/ increment = 1
/ showtooltips = true
/ required = false
</slider>

<surveypage duration_4_partner>
/caption = " ~n~nPlease indicate the level of duration of the noise blast you would like your romantic partner to receive if they lose in the following round."
/questions = [1=slider_duration]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<slider slider_duration>
/ labels = ("Level1~n0.0s","1~n0.2s","2~n0.4s","3~n0.6s","4~n0.8s","5~n1.0s","6~n1.2s","7~n1.4s","8~n1.6s","9~n1.8s","Level 10~n2.0s")
/ range = (0,100)
/ defaultresponse = 50
/ position = (0%,40%)
/ slidersize = (83%,10%)
/ size = (100%, 10%)
/ increment = 1
/ showtooltips = true
/ required = false
</slider>

Please provide the whole script, and please attach the script file and don't paste it into a post's body. The snippet you posted I cannot work with -- it's incomplete and not runnable.

When fixed up to run by removing references to any missing parts and then run in isolation, data is recorded just fine by the way:



So please be as specific as possible about what exactly you think is not being captured.
By MinghuiNi - 3/5/2020

Hi Dave, 
Thank you! I found out that the response could be recorded now. Thank you for your prompt reply.