PennController for IBEX › Forums › Support › Choosing subet of items to present › Reply To: Choosing subet of items to present
The Latin Square column refers to a native-Ibex concept, where you can group items so that Ibex automatically generates latin-square lists. It’s a convenient grouping device for such designs, but it makes it much more confusing when you need to implement another grouping reasoning, which is why PennController uses a basic “label the rows you want to show together” idea, where a latin square manipulation simply means cycling over group labels
To use native Ibex’s latin sqaure device, you would do something like this:
var items = [ [["DPrealA1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealB1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealC1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealD1", "item-1"], "PennController", newTrial( /* ... */ ) ], [["DPrealA2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealB2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealC2", "item-2"], "PennController", newTrial( /* ... */ ) ], [["DPrealD2", "item-2"], "PennController", newTrial( /* ... */ ) ], // etc. ];
This way Ibex would automatically pair the first item from “item-1” with the second item from “item-2”, the second item from “item-1” with the third item from “item-2”, and so on. You could actually easily generate such latin-square items from Template
. Using the table from your previous message with only groups 1 and 2, you could do that:
Template( "exp_Poss.csv" , exp => newTrial( // ... ) .label(["experimentais",exp.id_item.replace(/^.+?(\d+)$/,"$1")]) )
I’m using exp.id_item.replace(/^.+?(\d+)$/,"$1")
to retrieve the last digit characters of the id_item column
The problem with this method, if I’m not mistaken, is that it would pick different rows from your table every other run, which means that the latin square would always use an even counter value when running items from group 1, and an odd counter value when running items from group 2, effectively showing only half of your materials
Jeremy