PennController for IBEX › Forums › Support › Using Group for two different blocks › Reply To: Using Group for two different blocks
April 4, 2020 at 5:41 pm
#4996

Participant
Thank you for the reply, and sorry for the poor description, but yes! That’s what I’m trying to do.
What I had tried was basically this
Trial,trialImage,trialAudio,Group,Block,imageLeft,imageRight
1,blanket.jpg,blanket_accent.mp3,A,training,NA,NA
2,fridge.jpg,fridge_accent.mp3,A,training,NA,NA
3,bed.jpg,bed_accent.mp3,A,training,NA,NA
1,blanket.jpg,blanket_accent.mp3,B,training,NA,NA
2,fridge.jpg,fridge_accent.mp3,B,training,NA,NA
3,bed.jpg,bed_accent.mp3,B,training,NA,NA
1,NA,hand_accent.mp3,A,test,hand.jpg,unlabeled1.jpg
2,NA,egg_accent.mp3,A,test,unlabeled2.jpg,egg.jpg
3,NA,milk_accent.mp3,A,test,milk.jpg,unlabeled3.jpg
1,NA,hand_accent.mp3,B,test,hand.jpg,unlabeled1.jpg
2,NA,egg_accent.mp3,B,test,unlabeled2.jpg,egg.jpg
3,NA,milk_accent.mp3,B,test,milk.jpg,unlabeled3.jpg
where Group of course was Group and Block was Block, like yours. I suppose the .CSV is correct, then, so now I’m wondering why it seems to have trouble. It moved through the trials and selected a Group just fine before I added the training trials.
Here’s the rest, basically:
//training
Template( PennController.defaultTable.filter("Block","training") ,
variable =>
newTrial(
newAudio("trainingAudio",variable.trialAudio)
.play()
,
newImage("trainingImage", variable.trialImage)
.print()
,
newKey("J")
.log()
.wait()
)
.log( "ID" , getVar("ID") )
)
//test
Template( PennController.defaultTable.filter("Block","test") ,
variable =>
newTrial(
newAudio("testAudio",variable.trialAudio)
.play()
,
newImage("left", variable.imageLeft),
newImage("right", variable.imageRight),
newCanvas(1400,680)
.add( 0 , 0 , getImage("left") )
.add( 730, 0 , getImage("right") )
.print()
,
newKey("FJ")
.log()
.wait()
)
.log( "ID" , getVar("ID") )
)
SendResults()
It’s adapted right from the tutorial. I used defaultTable because my CSV is currently the only one in the folder.