My experiment has the same number of
word trials and
non_word trials. All trials are listed in my
conditions_file.csv linked to my
loopTrial loop as showed in the screeshot below.
I need to tweak my code in such a way that a given number of
non_word trials (let’s say 1, for simplicity) is presented after each of the three breaks. I am not sure how to implement this, since the
selection option of the function
importConditions() will subset a given range of rows to presented for the entire experiment. What I need instead is to set up some sort of pseudo-randomizing constraint that will present 1
non_word trials after each break, but all trials listed in the condition file will still need to be presented once throughout the experiment.
Can anybody give me some hint on how to accomplish this? I was thinking of doing the following:
Split the condition file imported for the
loopTrialloop in two: one only containing 1*3=6 prime-target
non_wordtrials that will be presented after each break; and the other one containing the rest of the trials. I am not sure how to implement this.
(Another option I thought of is to create an inner loop within the
loopTrialloop that would run right after the break and to which a separate conditions file with the
non_wordafter-break trials. This loop could randomly select the trial to be presented after each break before getting to the outer loop again, although this means that the same after-break trial may potentially be selected at the following repeat.)
Mark the end of the break somehow. At the moment, I have no idea of how this could be done.
Use (2) when selecting the trials to present, e.g.:
# primeRoutineBegin loop if blahblah # where blah blah must be replaced with the variable in (2) above text_prime.setText(filler_break[prime]) # or something like that else: text_prime.setText(prime) ... # targetRoutineBegin loop if blahblah: # where blah blah must be replaced with the variable in (2) above text_target.setText(filler_break[target]) # or something like that else: text_target.setText(target)
I have no idea if this will work or not and, especially, if (1) and (2) can be accomplished somehow in PsychoPy and/or PsychoJS. I would really appreciate if anyone can help. Thank you in advance!!