PennController for IBEX › Forums › Support › Switching between multiple tasks › Reply To: Switching between multiple tasks
So let me summarize and try to clarify the idea to make sure we’re on the same page
If you were to use a generalized version of latinMix
with three labels (say, flanker-sentence
, flanker
and sentence
) you would need to create three types of trials: one type containing only the sentence task (labeled sentence
), one containing only the flanker task (labeled flanker
) and one containing both the flanker and then the sentence tasks (labeled flanker-sentence
). You say that only the latter would correspond to experimental items with a preset flanker-sentence association. This suggests to me that for those (flanker-sentence
, mixed-type trials) you would need a table where each line has references for both the sentence and the flanker tasks, whereas for the former two (sentence
and flanker
, homogeneous-type trials) you would need two tables, one that only contains references for the reference task and one that only contains references for the flanker task
Now, say you have 21 rows in the flanker-sentence table, 21 rows in the sentence table and 21 rows in the flanker table. You would get a total of 42 iterations of the flanker task in your final experiment (half from the mixed trials labeled flanker-sentence
and half from the homogeneous trials labeled flanker
) and a total of 42 iterations of the sentence task (same logic). I use those numbers because the number of combinations that a generalized version of latinMix
would output for three labels is 21. Some of the triplets would contain only three task iterations (mixed or not) but some would contain four iterations, some five and one would even contain six (the one that draws exclusively from flanker-sentence
, namely flanker-sentence-flanker-sentence-flanker-sentence
). Obviously you would end up with an over-representation of the flanker-sentence
subsequence, because we started with 21 rows in each table but one of them is used to generate flanker-sentence
while the other two generate only flanker
or only sentence
. As you can see this all becomes very complicated very quickly
Now that I have a better idea of what you want, I do not think that using any version of latinMix
will make your life simpler. I think what would help is determine how many experimental items you will have, and how many of those will use each type of flanker image (as I understand it, you have four possible flanker images). Then, you would need to determine how many iterations of each task you want in the final experiment, and whether/how you want to balance your design. For example, if you have 8 experimental trials (2 where the sentence is preceded by LL.png, 2 by LR.png, 2 by RL.png and 2 by RR.png) do you also want to have 8 corresponding filler trials? That would give you 16 trials where the sentence is preceded by a flanker task. Would you want to then have another 16 filler trials where the sentence is *followed* by a flanker image (4 with LL.png, 4 with LR.png, 4 with RL.png and 4 with RR.png)? Finally, how many more independent iterations of each task type do you want to mix in? And do you want to license sequences that would end the experiment on a flanker task?
The situation would be a little simpler (although not much) if, instead of randomly generating the fillers during runtime, you defined a pseudo-randomized set of filler items in your tables to compensate your experimental items, as you would simply reference all the sentences and images by hand and the newTrial
s would be pretty generic
Re-using the flanker
and sentence
functions I defined in my previous message (and assuming a ‘yes’ answer where it applies to all the questions I raise above) you could write a single function to generate each type of trials without having to repeat whole pieces of code, eg:
trialOfType = (type,row) => newTrial(type,
newCanvas("FixationCanvas", 1800, 900)
.add(675,400, newImage("Fixation.png"))
.scaling("page")
.print("center at 50vw","middle at 50vh")
,
newTimer("wait", 1000).start().wait()
,
clear()
,
...( type=="flanker-sentence"||type=="flanker" ? flanker(row) : sentence(row) )
,
...( type.match('-') ? [
getTimer("wait").start().wait()
,
getCanvas("FixationCanvas").print("center at 50vw","middle at 50vh")
,
getTimer("wait").start().wait()
,
clear()
,
...( type=="flanker-sentence" ? sentence(row) : flanker(row) )
] : [ null ] )
)
.setOption("hideProgressBar",true)
Template("flanker-sentence_experimental.csv", row => trialOfType("flanker-sentence", row))
Template("flanker-sentence_filler.csv", row => trialOfType("flanker-sentence", row))
Template("sentence-flanker.csv", row => trialOfType("sentence-flanker", row))
Template("flanker.csv", row => trialOfType("flanker", row))
Template("sentence.csv", row => trialOfType("sentence", row))
Sequence( rshuffle("flanker-sentence", "sentence-flanker", "flanker", "sentence") )
Jeremy