Jo_Wlhlm


Group: Forum Members
Posts: 6,
Visits: 49

Good morning,
For a research project with in which participants get presented two face stimuli at the same time I tried to implement the script. It worked until suddenly the program wasn't able to load the pictures of the faces anymore. I made sure that the script file is saved in the exact same folder than the pictures (.png) but still it is not working. Most of the time it gives the following error message: Unable to load the picture ''. Network Error: Protocol "" is unknown.
For the project we have 4 different faces with 2 different emotions and each picture is presented upright and inverted. Together this makes 16 different picture stimuli. I tried to implement the pictures like this:
<picture face1> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / transparentcolor = black / hposition = 50(values.Hpcent_per_VD*2) / vposition = 50+(values.Hpcent_per_VD*15) / size = (values.Hpcent_per_VD*2, values.Vpcent_per_VD*2) </picture>
<picture face2> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / transparentcolor = black / hposition = 50+(values.Hpcent_per_VD*2) / vposition = 50+(values.Hpcent_per_VD*15) / size = (values.Hpcent_per_VD*2, values.Vpcent_per_VD*2) </picture>
Depending on which picture is shown as picture face1 I want to have specific faces as picture face2. We do not want all possible combinations. For each possible face1 stimuli there are 12 different possible face stimuli that can be shown as picture face2. I tried to use lists and if statements for this but here I am completely not sure about the best way to do it. My script seems to have errors in it but I am not experienced enough with Inquisit to find/ correct them. What I want is that on trial begin a random picture is presented as face1. In the if statement I want to check which face stimuli is presented as face1 and depending on this a face from a specific list is randomly chosen as face two.
<list faces> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / selectionmode = random / select = replace </list>
<list face1_UFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png","I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list>
<list face1_IFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png", "I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list>
<list face1_UNF> / items = ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png","F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png" ) / selectionmode = random / select = replace </list>
<list face1_INF> / items = ("I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png","I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png","F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") / selectionmode = random / select = replace </list>
<trial task> / pretrialpause = 100 / ontrialbegin = [picture.face1 = list.faces.nextvalue] / ontrialbegin = [if(picture.face1 == list.face1_UFF.items) { picture.face2 = list.face1_UFF.nextvalue } else if(picture.face1 == list.face1_IFF.items) { picture.face2 = list.face1_IFF.nextvalue } else if(picture.face1 == list.face1_UNF.nextvalue) { picture.face2 = list.face1_UNF.nextvalue } else if(picture.face1 == list.face1_INF.nextvalue) { picture.face2 = list.face1_INF.nextvalue } ] / stimulustimes = [0= fixationcross; 200=face1, face2; 3200=transient; 3250=blank, face1, face2, fixationcross; 5050 =blank] / validresponse = (200,203,208,205) / beginresponsetime = 5050 / recorddata = true / timeout = 6000 / posttrialpause = 100 </trial>
I hope it is more or less understandable what I want to implement. Maybe someone finds my error or can give me some hints how to implement what I just described. Thanks in advance!



Dave


Group: Administrators
Posts: 13K,
Visits: 103K

+xGood morning, For a research project with in which participants get presented two face stimuli at the same time I tried to implement the script. It worked until suddenly the program wasn't able to load the pictures of the faces anymore. I made sure that the script file is saved in the exact same folder than the pictures (.png) but still it is not working. Most of the time it gives the following error message: Unable to load the picture ''. Network Error: Protocol "" is unknown.
For the project we have 4 different faces with 2 different emotions and each picture is presented upright and inverted. Together this makes 16 different picture stimuli. I tried to implement the pictures like this: <picture face1> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / transparentcolor = black / hposition = 50(values.Hpcent_per_VD*2) / vposition = 50+(values.Hpcent_per_VD*15) / size = (values.Hpcent_per_VD*2, values.Vpcent_per_VD*2) </picture> <picture face2> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / transparentcolor = black / hposition = 50+(values.Hpcent_per_VD*2) / vposition = 50+(values.Hpcent_per_VD*15) / size = (values.Hpcent_per_VD*2, values.Vpcent_per_VD*2) </picture> Depending on which picture is shown as picture face1 I want to have specific faces as picture face2. We do not want all possible combinations. For each possible face1 stimuli there are 12 different possible face stimuli that can be shown as picture face2. I tried to use lists and if statements for this but here I am completely not sure about the best way to do it. My script seems to have errors in it but I am not experienced enough with Inquisit to find/ correct them. What I want is that on trial begin a random picture is presented as face1. In the if statement I want to check which face stimuli is presented as face1 and depending on this a face from a specific list is randomly chosen as face two. <list faces> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / selectionmode = random / select = replace </list> <list face1_UFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png","I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list> <list face1_IFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png", "I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list> <list face1_UNF> / items = ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png","F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png","I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png" ) / selectionmode = random / select = replace </list> <list face1_INF> / items = ("I_F1_N_1.png", "I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png","I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png","F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") / selectionmode = random / select = replace </list> <trial task> / pretrialpause = 100 / ontrialbegin = [picture.face1 = list.faces.nextvalue] / ontrialbegin = [if(picture.face1 == list.face1_UFF.items) { picture.face2 = list.face1_UFF.nextvalue } else if(picture.face1 == list.face1_IFF.items) { picture.face2 = list.face1_IFF.nextvalue } else if(picture.face1 == list.face1_UNF.nextvalue) { picture.face2 = list.face1_UNF.nextvalue } else if(picture.face1 == list.face1_INF.nextvalue) { picture.face2 = list.face1_INF.nextvalue } ] / stimulustimes = [0= fixationcross; 200=face1, face2; 3200=transient; 3250=blank, face1, face2, fixationcross; 5050 =blank] / validresponse = (200,203,208,205) / beginresponsetime = 5050 / recorddata = true / timeout = 6000 / posttrialpause = 100 </trial> I hope it is more or less understandable what I want to implement. Maybe someone finds my error or can give me some hints how to implement what I just described. Thanks in advance! Provide the complete code (or at least something that's selfcontained and complete enough to run) as well as all files required. Your question is not answerable based on isolated code snippets. The only thing I can tell you without that is that this condition here ontrialbegin = [if( picture.face1 == list.face1_UFF.items) returns absolutely nothing. It's not clear what it's intended to do.



Jo_Wlhlm


Group: Forum Members
Posts: 6,
Visits: 49

Ok, so what I want to achieve is that two face stimuli out of 16 possible face stimuli get presented at the same time. But I don't want to have all possible combinations. The face that is presented as face1 should be selected randomly out of the 16 possibilities. Depending on which face is shown as face 1 there are only 12 possible faces that can be shown as face 2. The 16 face stimuli can be divided into 4 groups (UNF, UFF, IFF, INF) each containing 4 face stimuli. If face1 is taken from group UFF, face two should be randomly taken out of group UFF, UNF, or IFF. The four pictures of group INF shouldn't be an option in that case. The following summarizes the possibilities: Face1 Possible faces for face2 UFF UFF, UNF, IFF UNF UNF, UFF, INF IFF IFF, INF, UFF INF INF, UNF, IFF
I tried to solve this with different lists out of which stimuli are taken and with an if statement, but it did not work. The following link contains a script that is kinda working, but does not include this specific selection of stimuli for face2: https://drive.google.com/drive/folders/1HzFZhw_5S1IBriZXb3BuLoj4DWpp24eI?usp=sharing I hope now it is a little bit clearer what my question is. I'd be glad if you have a solution for my problem or some hints how to solve it. Wasted quite some time on it now. Thanks in advance!



Dave


Group: Administrators
Posts: 13K,
Visits: 103K

+xOk, so what I want to achieve is that two face stimuli out of 16 possible face stimuli get presented at the same time. But I don't want to have all possible combinations. The face that is presented as face1 should be selected randomly out of the 16 possibilities. Depending on which face is shown as face 1 there are only 12 possible faces that can be shown as face 2. The 16 face stimuli can be divided into 4 groups (UNF, UFF, IFF, INF) each containing 4 face stimuli. If face1 is taken from group UFF, face two should be randomly taken out of group UFF, UNF, or IFF. The four pictures of group INF shouldn't be an option in that case. The following summarizes the possibilities: Face1 Possible faces for face2 UFF UFF, UNF, IFF UNF UNF, UFF, INF IFF IFF, INF, UFF INF INF, UNF, IFF
I tried to solve this with different lists out of which stimuli are taken and with an if statement, but it did not work. The following link contains a script that is kinda working, but does not include this specific selection of stimuli for face2: https://drive.google.com/drive/folders/1HzFZhw_5S1IBriZXb3BuLoj4DWpp24eI?usp=sharing I hope now it is a little bit clearer what my question is. I'd be glad if you have a solution for my problem or some hints how to solve it. Wasted quite some time on it now. Thanks in advance! Which item numbers belong to which group? Also, there seems to be nothing in your description that rules out the same item being selected for both face 1 and face 2 in a single trial. Is that intentional?



Jo_Wlhlm


Group: Forum Members
Posts: 6,
Visits: 49

<list UFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png") / selectionmode = random / select = replace </list>
<list IFF> / items = ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list>
<list INF> / items = ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png")
/ selectionmode = random / select = replace </list>
<list UNF> / items = ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") / selectionmode = random / select = replace </list>
Yes, face1 and face2 can also be the same faces.



Dave


Group: Administrators
Posts: 13K,
Visits: 103K

+x<list UFF> / items = ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png") / selectionmode = random / select = replace </list> <list IFF> / items = ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list> <list INF> / items = ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") / selectionmode = random / select = replace </list> <list UNF> / items = ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") / selectionmode = random / select = replace </list> Yes, face1 and face2 can also be the same faces. I was asking about item numbers, not separate lists. <list faces> / items = ("F1_F_1.png","I_F1_F_1.png","F1_N_1.png","I_F1_N_1.png","F2_F_1.png","I_F2_F_1.png","F2_N_1.png","I_F2_N_1.png","M1_F_1.png","I_M1_F_1.png","M1_N_1.png","I_M1_N_1.png","M2_F_1.png","I_M2_F_1.png","M2_N_1.png","I_M2_N_1.png") / selectionmode = random / select = replace </list> Which of the item numbers in the above are UFF, which are UNF, which are IFF, which are INF?



Jo_Wlhlm


Group: Forum Members
Posts: 6,
Visits: 49

item numbers 1,5,9,,13 are UFF ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png") numbers 2,6,10,14 are IFF ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") numbers 3,7,11,15 are UNF ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") numbers 4,8,12,16 are INF ("I_F1_N_1.png","I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png")
I hope that's what you meant!



Dave


Group: Administrators
Posts: 13K,
Visits: 103K

+xitem numbers 1,5,9,,13 are UFF ("F1_F_1.png","F2_F_1.png","M1_F_1.png","M2_F_1.png") numbers 2,6,10,14 are IFF ("I_F1_F_1.png","I_F2_F_1.png","I_M1_F_1.png","I_M2_F_1.png") numbers 3,7,11,15 are UNF ("F1_N_1.png","F2_N_1.png","M1_N_1.png","M2_N_1.png") numbers 4,8,12,16 are INF ("I_F1_N_1.png","I_F2_N_1.png","I_M1_N_1.png","I_M2_N_1.png") I hope that's what you meant! Take a look at the attached.



Jo_Wlhlm


Group: Forum Members
Posts: 6,
Visits: 49

Thank you so much! It is working. I was wondering if there is a simple way in this script to balance the occurrence of the different combinations of face stimuli in such a way that each group combination occurs 18 times but still in a random order. 18* UFF  UFF 18* UFF  IFF 18* UFF  UNF
18* IFF  IFF 18* IFF  INF 18* IFF  UFF
18* INF  INF 18* INF  UNF 18* INF  IFF
18* UNF  UNF 18* UNF  INF 18* UNF  UFF I would then end up with my 216 task trials. The only thing that is important is a balanced group combination. For now it dosen't matter which face stimuli of the groups are presented together.



Dave


Group: Administrators
Posts: 13K,
Visits: 103K

+xThank you so much! It is working. I was wondering if there is a simple way in this script to balance the occurrence of the different combinations of face stimuli in such a way that each group combination occurs 18 times but still in a random order. 18* UFF  UFF 18* UFF  IFF 18* UFF  UNF
18* IFF  IFF 18* IFF  INF 18* IFF  UFF
18* INF  INF 18* INF  UNF 18* INF  IFF
18* UNF  UNF 18* UNF  INF 18* UNF  UFF I would then end up with my 216 task trials. The only thing that is important is a balanced group combination. For now it dosen't matter which face stimuli of the groups are presented together. You should have mentioned this before. No, there is no easy way. First, you'll have to go back having separate lists, specifically you'll need four lists  UFF, UNF, IFF, INF  each containing the item numbers for the respective condition. Then you need two lists pairing your conditions as desired (i.e. 18 x the combination UFFUFF, 18 x the combination UFFIFF, etc.). At the start of each trial, sample the condition combination from those two paired lists. Then sample item numbers for face 1 and face 2 from the applicable one or two of the four item number lists (UFF, UNF, IFF, INF) accordingly.


