Hello,
I am working on the lineup portion of an eyewitness identification task in PsychoPy. This is a completely between subjects design.
My goal:
Ideally, I’d like to use the participant number entered via the dialog box at the beginning to reference a specific excel file with one row defining conditions and then only display the conditions for that particular subject (or a specific row with one excel file listing all conditions for all subjects). Basically, I would like to suppress the within-subjects loop structure, and use the subject number to call the right excel file (like Sub1, below) for subject 1, Sub2 for subject 2, and so on.
Current state:
Currently, I have a nested loop structure, which displays the four lineup members at once.
Figure A
Figure B
Was of the excel file. SubjNumList column had words “Sub1” and Sub2 in rows 1 and 2 for example.
The outer loop, trials, references the Kaiser_cond condition list (Figure A and B), which specifies another excel file that has one row with the image components that that particular subject will see.
The inner loop, lineup, uses $SubjNumList+’xlsx’ to choose the excel file (Figure C) that corresponds to that condition.
Figure C
Right now, I’m just building this with 2 subjects as indicated by Figure B.
Of course, using the current loop structure, each subject sees each condition (each spreadsheet with conditions, Sub1, Sub2,…SubN).
Questions:
I only want each subject to see the conditions associated with their subject number. Is it possible to do this in via builder? If so, how?
If not, what is the natural way to do this in the coder (as I am unfortunately new to Python)?
Example in Matlab PTB:
In matlab ptb, I do the following:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Upload conditions from one excel spreadsheet (relevant ones are bolded):
[TLg,TRg,BgL,BRg,SP,HSFP, MSFP, LSFP,NB, TB,TL,TR,BL ,BR,LT,SC] = textread(conditionsfilename,’%s%s%s%s%d%d%d%d%s%s%s%s%s%s%s%d’,‘delimiter’,’,’);%upload conditions
SubjNum=str2num(SUBJECT);%capture the subject number for row index
%Use the subject number to index the positions of each member, TL is top left, TR is top right,etc.
memb1= TL (SubjNum);
memb2= TR (SubjNum);
memb3= BL (SubjNum);
memb4= BR (SubjNum);
LineupMembers =[memb1, memb2, memb3, memb4];
for i=1:length( LineupMembers ) %for loop that opens each picture and makes a texture for it.
LineupMember{i} = imread(LineupMembers{i});
tex(i) = Screen(‘MakeTexture’, window, LineupMember{i});
end
%%Start simultaneous lineup
Screen(‘TextSize’, window, 20);
%sets positions and draws each lineup member in the 4 positions.
Screen(‘DrawTextures’, window, tex ([1 2 3 4]), ,[P14Lt toprowHt P14RT toprowpicbot;P36Lt toprowHt P36RT toprowpicbot; P14Lt bottomrowHT P14RT bottomrowpicbot; P36Lt bottomrowHT P36RT bottomrowpicbot]’);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Would there be some comparable way to accomplish using the subject number as the index in PsychoPy, or is my Matlab PTB code causing interference for me?