I am building an object memory task whereby 10 pictures are presented consecutively followed by a 30 second video. For responding, the participant will see the 10 original pictures plus 10 distractor pictures and click all of the pictures that were apart of the originally viewed 10. All pictures have the opportunity to be test and distractor images.
To create this array I will need to call upon the 10 pictures presented and then 10 more from the original list of pictures. Can someone point me in the right direction for solving this?
Will I need to adjust some of these variables in the code? Like, my list of stimuli is in an excel sheet, should I replace "ListOfStimuli with that excel file name?
n_rows needs to be replaced with the number of rows in your xlsx file
Then, use $Targets in the “selected rows” field of your first loop, and $TargetsAndDistractors for the second loop. Set both loops to “random”.
If you want to mark the trials of your second loop as being target or distractor trials you can do
if trials.thisIndex in Targets:
thisExp.addData("trialtype", "target")
elif trials.thisIndex in TargetsAndDistractors:
thisExp.addData("trialtype", "distractor")
“trials” needs to be replaced with the name of your second loop
No, these are the indices of the rows that are chosen to be targets and distractors. They determine, which rows of your xlsx are used as targets and distractors. This is why they have to be used in “selected rows”.
Did you change any part of the code? I see that you changed the number in the first line. This can lead to errors if you don’t also adopt the second line.
Okay!! It worked! Well, sort of. The program is starting but it only shows one picture and then immediately goes to the response array and shows just the same picture.