Script for emotion recognition and attractiveness?


Author
Message
USYDPSYCH
USYDPSYCH
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 3, Visits: 12
I am wanting to do a study where participants are presented with a fixation cross for 500ms, then a face for 3000ms where they firstly have to (1) identify the expression from for example happy or sad by pressing E or I, then they have to  (2) rate the attractiveness of the face using a 10 point Likert scale. This is followed by an intertrial interval of 1000ms.

Is there an existing script available for something similar?

I have looked at using an IAT script and altering it but I'm  having to re-write most of the script.
Dave
Dave
Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)
Group: Administrators
Posts: 11K, Visits: 70K
USYDPSYCH - 6/8/2021
I am wanting to do a study where participants are presented with a fixation cross for 500ms, then a face for 3000ms where they firstly have to (1) identify the expression from for example happy or sad by pressing E or I, then they have to  (2) rate the attractiveness of the face using a 10 point Likert scale. This is followed by an intertrial interval of 1000ms.

Is there an existing script available for something similar?

I have looked at using an IAT script and altering it but I'm  having to re-write most of the script.

You're not going to find an existing script that exactly matches what you want. The procedure you describe, however, you can just create from scratch fairly easily.

<values>
/ itemnumber = 1
</values>

<block example>
/ trials = [1-10 = noreplace(show_happy, show_sad)]
</block>

<trial show_happy>
/ ontrialbegin = [
    values.itemnumber = list.happyitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, happyface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ branch = [
    likert.rate_happy;
]
</trial>

<likert rate_happy>
/ stimulustimes = [0=clearscreen, ratingquestion, happyface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_sad>
/ ontrialbegin = [
    values.itemnumber = list.saditems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, sadface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ branch = [
    likert.rate_sad;
]
</trial>

<likert rate_sad>
/ stimulustimes = [0=clearscreen, ratingquestion, sadface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<picture happyface>
/ items = happyfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 happy items in this example
<list happyitems>
/ poolsize = 5
</list>

<picture sadface>
/ items = sadfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 sad items in this example
<list saditems>
/ poolsize = 5
</list>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
</item>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
</item>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text e_reminder>
/ items = ("E = Happy")
/ position = (20%, 10%)
</text>

<text i_reminder>
/ items = ("I = Sad")
/ position = (80%, 10%)
</text>

<text ratingquestion>
/ items = ("How attractive?")
/ position = (50%, 10%)
</text>

USYDPSYCH
USYDPSYCH
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 3, Visits: 12
Dave - 6/8/2021
USYDPSYCH - 6/8/2021
I am wanting to do a study where participants are presented with a fixation cross for 500ms, then a face for 3000ms where they firstly have to (1) identify the expression from for example happy or sad by pressing E or I, then they have to  (2) rate the attractiveness of the face using a 10 point Likert scale. This is followed by an intertrial interval of 1000ms.

Is there an existing script available for something similar?

I have looked at using an IAT script and altering it but I'm  having to re-write most of the script.

You're not going to find an existing script that exactly matches what you want. The procedure you describe, however, you can just create from scratch fairly easily.

<values>
/ itemnumber = 1
</values>

<block example>
/ trials = [1-10 = noreplace(show_happy, show_sad)]
</block>

<trial show_happy>
/ ontrialbegin = [
    values.itemnumber = list.happyitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, happyface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ branch = [
    likert.rate_happy;
]
</trial>

<likert rate_happy>
/ stimulustimes = [0=clearscreen, ratingquestion, happyface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_sad>
/ ontrialbegin = [
    values.itemnumber = list.saditems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, sadface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ branch = [
    likert.rate_sad;
]
</trial>

<likert rate_sad>
/ stimulustimes = [0=clearscreen, ratingquestion, sadface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<picture happyface>
/ items = happyfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 happy items in this example
<list happyitems>
/ poolsize = 5
</list>

<picture sadface>
/ items = sadfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 sad items in this example
<list saditems>
/ poolsize = 5
</list>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
</item>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
</item>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text e_reminder>
/ items = ("E = Happy")
/ position = (20%, 10%)
</text>

<text i_reminder>
/ items = ("I = Sad")
/ position = (80%, 10%)
</text>

<text ratingquestion>
/ items = ("How attractive?")
/ position = (50%, 10%)
</text>

Thanks, that is very helpful!
USYDPSYCH
USYDPSYCH
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 3, Visits: 12
Dave - 6/8/2021
USYDPSYCH - 6/8/2021
I am wanting to do a study where participants are presented with a fixation cross for 500ms, then a face for 3000ms where they firstly have to (1) identify the expression from for example happy or sad by pressing E or I, then they have to  (2) rate the attractiveness of the face using a 10 point Likert scale. This is followed by an intertrial interval of 1000ms.

Is there an existing script available for something similar?

I have looked at using an IAT script and altering it but I'm  having to re-write most of the script.

You're not going to find an existing script that exactly matches what you want. The procedure you describe, however, you can just create from scratch fairly easily.

<values>
/ itemnumber = 1
</values>

<block example>
/ trials = [1-10 = noreplace(show_happy, show_sad)]
</block>

<trial show_happy>
/ ontrialbegin = [
    values.itemnumber = list.happyitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, happyface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ branch = [
    likert.rate_happy;
]
</trial>

<likert rate_happy>
/ stimulustimes = [0=clearscreen, ratingquestion, happyface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_sad>
/ ontrialbegin = [
    values.itemnumber = list.saditems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, sadface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ branch = [
    likert.rate_sad;
]
</trial>

<likert rate_sad>
/ stimulustimes = [0=clearscreen, ratingquestion, sadface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<picture happyface>
/ items = happyfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 happy items in this example
<list happyitems>
/ poolsize = 5
</list>

<picture sadface>
/ items = sadfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 sad items in this example
<list saditems>
/ poolsize = 5
</list>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
</item>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
</item>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text e_reminder>
/ items = ("E = Happy")
/ position = (20%, 10%)
</text>

<text i_reminder>
/ items = ("I = Sad")
/ position = (80%, 10%)
</text>

<text ratingquestion>
/ items = ("How attractive?")
/ position = (50%, 10%)
</text>

I've added in angry stimuli now which means the E and I will switch. I'm doing three blocks - happy v sad, happy v angry, and sad v angry. How do I update the script so that I can switch the "I"s and "E"s to represent the right emotion in the respective block? Thank you
Dave
Dave
Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)
Group: Administrators
Posts: 11K, Visits: 70K
USYDPSYCH - 6/8/2021
Dave - 6/8/2021
USYDPSYCH - 6/8/2021
I am wanting to do a study where participants are presented with a fixation cross for 500ms, then a face for 3000ms where they firstly have to (1) identify the expression from for example happy or sad by pressing E or I, then they have to  (2) rate the attractiveness of the face using a 10 point Likert scale. This is followed by an intertrial interval of 1000ms.

Is there an existing script available for something similar?

I have looked at using an IAT script and altering it but I'm  having to re-write most of the script.

You're not going to find an existing script that exactly matches what you want. The procedure you describe, however, you can just create from scratch fairly easily.

<values>
/ itemnumber = 1
</values>

<block example>
/ trials = [1-10 = noreplace(show_happy, show_sad)]
</block>

<trial show_happy>
/ ontrialbegin = [
    values.itemnumber = list.happyitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, happyface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ branch = [
    likert.rate_happy;
]
</trial>

<likert rate_happy>
/ stimulustimes = [0=clearscreen, ratingquestion, happyface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_sad>
/ ontrialbegin = [
    values.itemnumber = list.saditems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, sadface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ branch = [
    likert.rate_sad;
]
</trial>

<likert rate_sad>
/ stimulustimes = [0=clearscreen, ratingquestion, sadface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<picture happyface>
/ items = happyfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 happy items in this example
<list happyitems>
/ poolsize = 5
</list>

<picture sadface>
/ items = sadfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 sad items in this example
<list saditems>
/ poolsize = 5
</list>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
</item>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
</item>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text e_reminder>
/ items = ("E = Happy")
/ position = (20%, 10%)
</text>

<text i_reminder>
/ items = ("I = Sad")
/ position = (80%, 10%)
</text>

<text ratingquestion>
/ items = ("How attractive?")
/ position = (50%, 10%)
</text>

I've added in angry stimuli now which means the E and I will switch. I'm doing three blocks - happy v sad, happy v angry, and sad v angry. How do I update the script so that I can switch the "I"s and "E"s to represent the right emotion in the respective block? Thank you

<values>
/ itemnumber = 1
/ happykey = ""
/ sadkey = ""
/ angrykey = ""
/ e_reminder = ""
/ i_reminder = ""
</values>

<expt>
/ blocks = [1-3 = noreplace(happy_v_sad, happy_v_angry, sad_v_angry)]
</expt>

<block happy_v_sad>
/ onblockbegin = [
    values.happykey = "E";
    values.sadkey = "I";
    values.e_reminder = "E = Happy";
    values.i_reminder = "I = Sad";
]
/ trials = [1-10 = noreplace(show_happy, show_sad)]
</block>

<block happy_v_angry>
/ onblockbegin = [
    values.happykey = "E";
    values.angrykey = "I";
    values.e_reminder = "E = Happy";
    values.i_reminder = "I = Angry";
]
/ trials = [1-10 = noreplace(show_happy, show_angry)]
</block>

<block sad_v_angry>
/ onblockbegin = [
    values.sadkey = "E";
    values.angrykey = "I";
    values.e_reminder = "E = Sad";
    values.i_reminder = "I = Angry";
]
/ trials = [1-10 = noreplace(show_sad, show_angry)]
</block>


<trial show_happy>
/ ontrialbegin = [
values.itemnumber = list.happyitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, happyface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = (values.happykey)
/ branch = [
likert.rate_happy;
]
</trial>

<likert rate_happy>
/ stimulustimes = [0=clearscreen, ratingquestion, happyface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_sad>
/ ontrialbegin = [
values.itemnumber = list.saditems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, sadface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = (values.sadkey)
/ branch = [
likert.rate_sad;
]
</trial>

<likert rate_sad>
/ stimulustimes = [0=clearscreen, ratingquestion, sadface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<trial show_angry>
/ ontrialbegin = [
values.itemnumber = list.angryitems.nextindex;
]
/ stimulustimes = [0=clearscreen, fixation; 500=clearscreen, angryface; 3500=e_reminder, i_reminder;]
/ validresponse = ("E", "I")
/ correctresponse = (values.angrykey)
/ branch = [
likert.rate_angry;
]
</trial>

<likert rate_angry>
/ stimulustimes = [0=clearscreen, ratingquestion, angryface]
/ inputdevice = mouse
/ numpoints = 5
/ anchors = [1="unattractive"; 5="attractive"]
/ position = (50%, 85%)
/ responsemessage = (anyresponse, clearscreen, 1000)
</likert>

<picture happyface>
/ items = happyfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 happy items in this example
<list happyitems>
/ poolsize = 5
</list>

<picture sadface>
/ items = sadfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 sad items in this example
<list saditems>
/ poolsize = 5
</list>

<picture angryface>
/ items = angryfaces
/ erase = false
/ select = values.itemnumber
/ size = (40%, 50%)
</picture>

// 5 angry items in this example
<list angryitems>
/ poolsize = 5
</list>

<item happyfaces>
/ 1 = "happy01.jpg"
/ 2 = "happy02.jpg"
/ 3 = "happy03.jpg"
/ 4 = "happy04.jpg"
/ 5 = "happy05.jpg"
</item>

<item sadfaces>
/ 1 = "sad01.jpg"
/ 2 = "sad02.jpg"
/ 3 = "sad03.jpg"
/ 4 = "sad04.jpg"
/ 5 = "sad05.jpg"
</item>

<item angryfaces>
/ 1 = "angry01.jpg"
/ 2 = "angry02.jpg"
/ 3 = "angry03.jpg"
/ 4 = "angry04.jpg"
/ 5 = "angry05.jpg"
</item>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text e_reminder>
/ items = ("<%values.e_reminder%>")
/ position = (20%, 10%)
</text>

<text i_reminder>
/ items = ("<%values.i_reminder%>")
/ position = (80%, 10%)
</text>

<text ratingquestion>
/ items = ("How attractive?")
/ position = (50%, 10%)
</text>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search