By AKathryn - 5/12/2015
Dear Inquisit community,
I am currently desingning an experiment in which participants have to evaluate fictional project partners (in terms of how much they would like to work with that person). I am presenting several potential partners, and always show a picture next to a short CV. Attractiveness in the picture varies as well as the competence of the person as suggested in the CV. In the end, the task should measure the value a person places on attractiveness as compared to the competence of a person. Picture and CV are paired randomly, so that every participant gets a different „set“ of potentional project partners. Now the challenge: After showing all the pictures of all project partners, randomly paired with CVs and asking everytime how much the participant would like to work with that person, I want to do ANOTHER round of showing the same pictures paired with the same CVs as before, this time asking the participant how attractive and how competent they perceive the person as a manipulation check. Here is my question: Is it somehow possible for Inquisit to track which combination it randomly showed before and to show this exact combination again in the second round?
Thank you so much for your help! Best, Kathryn
|
By Dave - 5/12/2015
Yes, it's perfectly possible. Two options:
(1) Pair your items randomly *at the beginning* of the experiment and then proceed as you would normally. See e.g. https://www.millisecond.com/forums/Topic2623.aspx for an example.
(2) Store the pairs *at runtime* in empty, linked <item> or <list> elements. Sample from those <item>s or <lists> for the repetition. Example:
<values> / personitem = 1 / cvitem = 1 </values>
<expt> / blocks = [1=showrandompairs; 2=repeatrandompairs] </expt>
<block showrandompairs> / trials = [1-4=show] </block>
<block repeatrandompairs> / trials = [1-4=repeat] </block>
<trial show> / ontrialbegin = [values.personitem=list.randomperson.nextindex; values.cvitem=list.randomcv.nextindex; list.repeatperson.appenditem(values.personitem); list.repeatcv.appenditem(values.cvitem); ] / stimulusframes = [1=person, cv] / validresponse = (57) </trial>
<trial repeat> / ontrialbegin = [values.personitem=list.repeatperson.nextvalue; values.cvitem=list.repeatcv.nextvalue; ] / stimulusframes = [1=person, cv] / validresponse = (57) </trial>
<text person> / items = personitems / select = values.personitem / position = (40%, 50%) </text>
<text cv> / items = cvitems / select = values.cvitem / position = (60%, 50%) </text>
<item personitems> / 1 = "Person A" / 2 = "Person B" / 3 = "Person C" / 4 = "Person D" </item>
<item cvitems> / 1 = "CV 1" / 2 = "CV 2" / 3 = "CV 3" / 4 = "CV 4" </item>
<list randomperson> / poolsize = 4 </list>
<list randomcv> / poolsize = 4 </list>
<list repeatperson> </list>
<list repeatcv> / selectionmode = list.repeatperson.currentindex </list>
|
By AKathryn - 5/13/2015
Okay, thank you, Dave!! I've tried to implement the second method you suggested into my script, but it's not working (I get the error message "Unable to initialize <picture Person_unattractive> item number 3. Verify the item exists and is correctly defined" Also, I think I didn't do it correctly because the task is actually a bit more complicated than I first described: I am actually not pairing only pictures and CVs but also grades (grade point average) of the "project partner". There are three levels of attractiveness (attractive, medium attractive and unattractive) and three levels of grades (good, medium and bad). Each level of attractiveness is systematically paired with each level of grades, so each participant sees 9 persons in total. Then there are 9 neutral CVs which are assigned randomly to each person/grade pair and also shown simultaneously. So I actually don't have a single trial to show or repeat the "partners", but I made 9 trials for each of the attractiveness/grade combinations. These are selected with the noreplace selectionmode on the block level. I included the "ontrialbegin" commands from your script for each of the 9 trials in my script; is that correct? Also, under the "values" element, I added the three levels of attractiveness and the three levels of grades. Is that correct, too?
So sorry, but I'm getting desperate with my script! For clarification, I've attached my script with the added "repeat task" in which I tried to implement your suggestion. I've also added the original script of my task with only the first part of the task, without the second round.
Best, Kathryn
|
By Dave - 5/13/2015
> "Unable to initialize <picture Person_unattractive> item number 3. Verify the item exists and is correctly defined"
Your problem is that the item numbers you assign do not necessarily match the number of available items in your various <picture> elements. Your <list randomperson> contains item numbers 1-9.
<list randomperson> / poolsize = 9 </list>
You sample a random value from that list in your various trials, for example:
<trial Person1> / posttrialpause = 250 / stimulustimes = [1 = Person_attractive, grades_set_gut, CV] / timeout = 5000 / ontrialbegin = [values.Person_attractive=list.randomperson.nextindex; values.CVs=list.randomcv.nextindex; list.repeatperson.appenditem(values.Person_attractive); list.repeatcv.appenditem(values.CVs); ] </trial>
Suppose the randomly sampled value is 7. Here's the problem: <picture Person_attractive> doesn't have a 7th item. It only has 3 items (#1, #2, #3):
<picture Person_attractive> / select = values.Person_attractive / position = (75, 50) </picture>
<item Person_attractive> /1 = "face32_w.jpg" /2 = "face31_w.jpg" /3 = "face30_w.jpg" </item>
The same is true for the other <trial>s / <picture>s respectively. You'll thus have to set up more <list>s and sample from those applicable to a given trial-type. I.e. you need to do
<list randomattractiveperson> / poolsize = 3 </list>
with
<trial Person1> / posttrialpause = 250 / stimulustimes = [1 = Person_attractive, grades_set_gut, CV] / timeout = 5000 / ontrialbegin = [values.Person_attractive=list.randomattractiveperson.nextindex; ...; ] </trial>
and so forth.
|
By AKathryn - 5/15/2015
Hi Dave!!
Thanks again!! I changed my syntax again and I think I did everything correctly. Now there is no error message when I verify the script syntax and when I run it, the first block works fine, however, as soon as the second block (the second round of pictures) is about to start, I get a similar error message again ("Unable to initialize <picture Person_attractive> item number 0. Verify the item exists and is correctly defined"). I can't figure out what is going wrong. Thanks so much!
|
By Dave - 5/15/2015
Several problems.
#1: Your <list> definitions make no sense (no offense intended):
<list repeatperson> / selectionmode = list.repeatperson.currentindex </list>
<list repeatcv> / selectionmode = list.repeatcv.currentindex </list>
<list repeatgrades> / selectionmode = list.repeatgrades.currentindex </list>
How can the selection in list.repeatperson depend on the selection in that very same list.repeatperson? That's circular and won't and shouldn't work. The same is true for the other above lists.
#2: The other problem is identical to your initial one. You need separate <list> elements for each "repeat" trial-type (Person1repeat, etc.). I.e. you need to do
<trial Person1> / posttrialpause = 250 / stimulustimes = [1 = Person_attractive, grades_set_gut, CV] / timeout = 5000 / ontrialbegin = [values.Person_attractive=list.randomattractiveperson.nextindex; values.CVs=list.randomcv.nextindex; values.grades_set_gut=list.randomgrades_set_gut.nextindex; list.repeatperson1.appenditem(values.Person_attractive); list.repeatcvperson1.appenditem(values.CVs); list.repeatgradesperson1.appenditem(values.grades_set_gut); ] </trial>
with
<list repeatperson1> </list>
<list repeatcvperson1> / selectionmode = list.repeatperson1.currentindex </list>
<list repeatgrades> / selectionmode = list.repeatperson1.currentindex </list>
and
<trial Person1rep> / posttrialpause = 250 / stimulustimes = [1 = Person_attractive, grades_set_gut, CV] / timeout = 5000 / ontrialbegin = [values.Person_attractive=list.repeatperson1.nextvalue; values.CVs=list.repeatcvperson1.nextvalue; values.grades_set_gut=list.repeatgradesperson1.nextvalue; ] </trial>
The same needs to be done for the other trials.
|
By AKathryn - 5/16/2015
Thanks so much!! It's working now. You just made my day :)
|
By lir1995 - 3/16/2021
Hi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test.
The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials).
The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word.
************************************************* Creating Text and Picture Stimuli ***********************************************
<text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text>
<item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item>
<item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item>
<picture scene1> / items = scenes /select = values.pairedscene_item </picture>
<values> / shownword_item = 1 / pairedscene_item = 1 </values>
<list word> / poolsize = 4 </list>
<list scene> / poolsize = 4 </list>
<list word2> </list>
<list scene2> / selectionmode = list.word2.currentindex </list>
<values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values>
<picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture>
<picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture>
<picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture>
<picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture>
<counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter>
<shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape>
<text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
<text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
************************************************* Creating Trials *************************************************
<trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
************************************************* Creating Blocks *************************************************
<block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block>
<block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block>
<trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 =scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial>
<block source_mem> / trials = [1-6 = source]
</block>
<expt > / blocks = [1 = practice; 2 = source_mem ] </expt>
|
By Dave - 3/16/2021
+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element
Is there a specific reason you set it up that way to begin with? If so, what is that reason?
|
By lir1995 - 3/16/2021
+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example)
<block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block>
1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown.
However, if there is a better way to do this that would be greatly appreciated!
|
By Dave - 3/16/2021
+x+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example) <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> 1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated! Okay, but these are *trials* you're switching back and forth between. That does not necessitate separate *picture* elements. You can do
<picture p> / items = scenes / select = values.itemnumber / position = (50%, 50%) / size = (60%, 60%) </picture>
with
<values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1 </values>
and then
<trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
|
By Dave - 3/16/2021
+x+x+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example) <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> 1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated! Okay, but these are *trials* you're switching back and forth between. That does not necessitate separate *picture* elements. You can do <picture p> / items = scenes / select = values.itemnumber/ position = (50%, 50%) / size = (60%, 60%) </picture> with <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1</values> and then <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ]/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> There's a bunch of stuff in the code you posted that does not make sense to me (i.e. I have no idea why it's there to begin with), but as far as randomly pairing things and ensuring the pairs remain intact goes, see below:
************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun / select = values.noun_itemnumber / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false </text>
<list noun_items> / poolsize = 6 </list>
<item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" / 5 = "NOTEBOOK" / 6 = "LILY" </item>
<item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item>
<list word> </list>
<list scene> / selectionmode = list.word.currentindex </list>
<values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / pic_itemnumber = 1 / noun_itemnumber = 1 </values>
<picture p> / items = scenes / select = values.pic_itemnumber / position = (50%, 50%) / size = (60%, 60%) </picture>
<list pic_items> / poolsize = 4 / selectionrate = always / resetinterval = 0 </list>
<shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape>
<text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
<text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
************************************************* Creating Trials *************************************************
<trial practice> / ontrialbegin = [ values.pic_itemnumber = values.p1; values.noun_itemnumber = list.noun_items.nextindex; list.scene.appenditem(values.pic_itemnumber); list.word.appenditem(values.noun_itemnumber); ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial practice2> / ontrialbegin = [ values.pic_itemnumber = values.p2; values.noun_itemnumber = list.noun_items.nextindex; list.scene.appenditem(values.pic_itemnumber); list.word.appenditem(values.noun_itemnumber); ]
/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial image3> / ontrialbegin = [ values.pic_itemnumber = values.p3; values.noun_itemnumber = list.noun_items.nextindex; list.scene.appenditem(values.pic_itemnumber); list.word.appenditem(values.noun_itemnumber); ]
/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial image4> / ontrialbegin = [ values.pic_itemnumber = values.p4; values.noun_itemnumber = list.noun_items.nextindex; list.scene.appenditem(values.pic_itemnumber); list.word.appenditem(values.noun_itemnumber); ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
************************************************* Creating Blocks *************************************************
<block practice> / onblockbegin = [values.p1=list.pic_items.nextindex; values.p2=list.pic_items.nextindex;] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block>
<block mid_same> / onblockbegin = [values.p3=list.pic_items.nextindex; values.p4=list.pic_items.nextindex;] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block>
<trial source> / ontrialbegin = [values.noun_itemnumber=list.word.nextvalue; values.pic_itemnumber=list.scene.nextvalue;] / stimulustimes = [0 =p, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial>
<block source_mem> / trials = [1-6 = source] </block>
<expt > / blocks = [1 = practice; 2 = source_mem; ] </expt>
|
By lir1995 - 3/16/2021
+x+x+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example) <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> 1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated! Okay, but these are *trials* you're switching back and forth between. That does not necessitate separate *picture* elements. You can do <picture p> / items = scenes / select = values.itemnumber/ position = (50%, 50%) / size = (60%, 60%) </picture> with <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1</values> and then <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ]/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> Thank you so much! That definitely makes sense that I do not need that extra information. Making that change solved my initial issue. When I run my code I am now able to repeat word-image pairs that were randomly shown initially.
However, a few new problems emerged that I did not have previously when having several picture elements.
1) the largest issue is that I am now unable to get scene images to repeat within a block. I need the block to look like: p1 p1, p2 p2, p1 p1 ... However, when I run my task with this new implementation, it changes images every time. I've struggled with this for a bit and can't seem to find a solution, so any guidance is much appreciated! The reason I had separately picture elements initially was modeled off of this forum response (https://www.millisecond.com/forums/PrintTopic6259.aspx), which is of course quite old by now.
2) Additionally, it is only sampling from the first four images, rather than from the whole list. I presume I have an error in my code somewhere.
Thank you again!!
<text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text>
<item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item>
<item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" /5 = "track.jpg" /6 = "trees.jpg" /7 = "sunset.jpg" /8 = "airplanecabin1.jpg" /9 = "amusement4.jpg" /10 = "appleorchard2.jpg" /11 = "artstudio3.jpg" /12 = "backyard6.jpg" /13 = "bakery1.jpg" /14 = "barbershop3.jpg" /15 = "baseball6.jpg" /16 = "boardwalk.jpg" /17 = "botanicalGarden5.jpg" /18 = "bus_shelter3.jpg" /19 = "skislope7.jpg" /20 = "citystreet9.jpg" /21 = "closet7.jpg" /22 = "conference2.jpg" /23 = "lab.jpg" /24 = "bathroom.jpg" /25 = "gym.jpg" /26 = "kitchen.jpg" /27 = "campsite7.jpg" /28 = "campusquad2.jpg" /29= "driveway7.jpg" /30 = "farm3.jpg" </item>
<picture scene1> / items = scenes </picture>
<picture p> / items = scenes / select = values.itemnumber / position = (50%, 50%) / size = (60%, 60%) /select = values.pairedscene_item / selectionrate = always / resetinterval = 0 </picture>
<values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1 / shownword_item = 1 /pairedscene_item = 1 </values>
<counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter>
<list word> / poolsize = 6
</list>
<list scene> / poolsize = 6
</list>
<list word2> </list>
<list scene2> / selectionmode = list.word2.currentindex </list>
<shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape>
<text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
<text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text>
<trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial>
<trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial>
<block practice> / onblockbegin = [values.itemnumber = values.p1;values.itemnumber = values.p2;] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block>
<trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 =p, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial>
<block source_mem> / trials = [1-6 = source]
</block>
<expt > / blocks = [1 = practice; 2 = source_mem ]
</expt>
|
By lir1995 - 3/16/2021
+x+x+x+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example) <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> 1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated! Okay, but these are *trials* you're switching back and forth between. That does not necessitate separate *picture* elements. You can do <picture p> / items = scenes / select = values.itemnumber/ position = (50%, 50%) / size = (60%, 60%) </picture> with <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1</values> and then <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ]/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> Thank you so much! That definitely makes sense that I do not need that extra information. Making that change solved my initial issue. When I run my code I am now able to repeat word-image pairs that were randomly shown initially. However, a few new problems emerged that I did not have previously when having several picture elements. 1) the largest issue is that I am now unable to get scene images to repeat within a block. I need the block to look like: p1 p1, p2 p2, p1 p1 ... However, when I run my task with this new implementation, it changes images every time. I've struggled with this for a bit and can't seem to find a solution, so any guidance is much appreciated! The reason I had separately picture elements initially was modeled off of this forum response ( https://www.millisecond.com/forums/PrintTopic6259.aspx), which is of course quite old by now. 2) Additionally, it is only sampling from the first four images, rather than from the whole list. I presume I have an error in my code somewhere. Thank you again!! <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" /5 = "track.jpg" /6 = "trees.jpg" /7 = "sunset.jpg" /8 = "airplanecabin1.jpg" /9 = "amusement4.jpg" /10 = "appleorchard2.jpg" /11 = "artstudio3.jpg" /12 = "backyard6.jpg" /13 = "bakery1.jpg" /14 = "barbershop3.jpg" /15 = "baseball6.jpg" /16 = "boardwalk.jpg" /17 = "botanicalGarden5.jpg" /18 = "bus_shelter3.jpg" /19 = "skislope7.jpg" /20 = "citystreet9.jpg" /21 = "closet7.jpg" /22 = "conference2.jpg" /23 = "lab.jpg" /24 = "bathroom.jpg" /25 = "gym.jpg" /26 = "kitchen.jpg" /27 = "campsite7.jpg" /28 = "campusquad2.jpg" /29= "driveway7.jpg" /30 = "farm3.jpg" </item> <picture scene1> / items = scenes </picture> <picture p> / items = scenes / select = values.itemnumber / position = (50%, 50%) / size = (60%, 60%) /select = values.pairedscene_item / selectionrate = always / resetinterval = 0 </picture> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1 / shownword_item = 1 /pairedscene_item = 1 </values> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <list word> / poolsize = 6 </list> <list scene> / poolsize = 6 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <block practice> / onblockbegin = [values.itemnumber = values.p1;values.itemnumber = values.p2;] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 =p, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> *Edit, I figured out number two is because I need to add more values. Apologies!
|
By lir1995 - 3/16/2021
+x+x+x+x+x+xHi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. ************************************************* Creating Text and Picture Stimuli *********************************************** <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" </item> <picture scene1> / items = scenes /select = values.pairedscene_item </picture> <values> / shownword_item = 1 / pairedscene_item = 1 </values> <list word> / poolsize = 4 </list> <list scene> / poolsize = 4 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 </values> <picture p1> / items = scenes / select = values.p1 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p2> / items = scenes / select = values.p2 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p3> / items = scenes / select = values.p3 / position = (50%, 50%) / size = (60%, 60%) </picture> <picture p4> / items = scenes / select = values.p4 / position = (50%, 50%) / size = (60%, 60%) </picture> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> ************************************************* Creating Trials ************************************************* <trial practice> / stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> ************************************************* Creating Blocks ************************************************* <block practice> / onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 = scene1, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> > Given that each image is in it's own picture element Is there a specific reason you set it up that way to begin with? If so, what is that reason? Thanks for asking. The reason is 2 fold (and I'll use this block as an example) <block mid_same> / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue] / trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4] </block> 1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated! Okay, but these are *trials* you're switching back and forth between. That does not necessitate separate *picture* elements. You can do <picture p> / items = scenes / select = values.itemnumber/ position = (50%, 50%) / size = (60%, 60%) </picture> with <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1</values> and then <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ]/ stimulustimes = [ 0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ]/ stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> Thank you so much! That definitely makes sense that I do not need that extra information. Making that change solved my initial issue. When I run my code I am now able to repeat word-image pairs that were randomly shown initially. However, a few new problems emerged that I did not have previously when having several picture elements. 1) the largest issue is that I am now unable to get scene images to repeat within a block. I need the block to look like: p1 p1, p2 p2, p1 p1 ... However, when I run my task with this new implementation, it changes images every time. I've struggled with this for a bit and can't seem to find a solution, so any guidance is much appreciated! The reason I had separately picture elements initially was modeled off of this forum response ( https://www.millisecond.com/forums/PrintTopic6259.aspx), which is of course quite old by now. 2) Additionally, it is only sampling from the first four images, rather than from the whole list. I presume I have an error in my code somewhere. Thank you again!! <text pracnoun> / items = pracnoun /select = noreplacenorepeat / position = (50,50) / fontstyle = ("Arial", 25pt) / erase = false /select = values.shownword_item </text> <item pracnoun> / 1 = "SCOOTER" / 2 = "CUPCAKE" / 3 = "TRUMPET" / 4 = "ZEBRA" /5 = "NOTEBOOK" /6 = "LILY" </item> <item scenes> /1 = "bedroom.jpg" /2 = "library_aisle10.jpg" /3 = "office.jpg" /4 = "dentist1.jpg" /5 = "track.jpg" /6 = "trees.jpg" /7 = "sunset.jpg" /8 = "airplanecabin1.jpg" /9 = "amusement4.jpg" /10 = "appleorchard2.jpg" /11 = "artstudio3.jpg" /12 = "backyard6.jpg" /13 = "bakery1.jpg" /14 = "barbershop3.jpg" /15 = "baseball6.jpg" /16 = "boardwalk.jpg" /17 = "botanicalGarden5.jpg" /18 = "bus_shelter3.jpg" /19 = "skislope7.jpg" /20 = "citystreet9.jpg" /21 = "closet7.jpg" /22 = "conference2.jpg" /23 = "lab.jpg" /24 = "bathroom.jpg" /25 = "gym.jpg" /26 = "kitchen.jpg" /27 = "campsite7.jpg" /28 = "campusquad2.jpg" /29= "driveway7.jpg" /30 = "farm3.jpg" </item> <picture scene1> / items = scenes </picture> <picture p> / items = scenes / select = values.itemnumber / position = (50%, 50%) / size = (60%, 60%) /select = values.pairedscene_item / selectionrate = always / resetinterval = 0 </picture> <values> / p1 = 0 / p2 = 0 / p3 = 0 / p4 = 0 / itemnumber = 1 / shownword_item = 1 /pairedscene_item = 1 </values> <counter items> / select = noreplace(1-4) / selectionrate = always / resetinterval = 0 </counter> <list word> / poolsize = 6 </list> <list scene> / poolsize = 6 </list> <list word2> </list> <list scene2> / selectionmode = list.word2.currentindex </list> <shape blank> / color = white / shape = rectangle / size = (100%, 100%) / erase = false </shape> <text belong> / items = ("Yes") / position = (70%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <text nobelong> / items = ("No") / position = (30%, 80%) / size = (30%, 5%) / hjustify = center / vjustify = center / fontstyle = ("Arial", 18pt) / txbgcolor = white / erase = false </text> <trial practice> / ontrialbegin = [ values.itemnumber = values.p1; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial practice2> / ontrialbegin = [ values.itemnumber = values.p2; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard / ontrialbegin = [ values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex; list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ] </trial> <trial image3> / ontrialbegin = [ values.itemnumber = values.p3; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <trial image4> / ontrialbegin = [ values.itemnumber = values.p4; ] / stimulustimes = [0 =p; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank] / validresponse = ("n","m") / posttrialpause = 1000 / trialduration = 5000 / responseinterrupt = frames / beginresponsetime = 0 / inputdevice = keyboard </trial> <block practice> / onblockbegin = [values.itemnumber = values.p1;values.itemnumber = values.p2;] / trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice] </block> <trial source> / ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;] / stimulustimes = [0 =p, pracnoun] / validresponse = ("m", "n") / posttrialpause = 500 / timeout = 5000 / beginresponsetime = 0 </trial> <block source_mem> / trials = [1-6 = source] </block> <expt > / blocks = [1 = practice; 2 = source_mem ] </expt> *Edit, I figured out number two is because I need to add more values. Apologies! ****Edit****** I apologize I didn't see your second reply, this all works fantastic! Thank you so much. No need to read my previous messages.
Thank you again!
|
|