PennController for IBEX › Forums › Support › Randomize blocks and trials but keep breaks in the same order › Reply To: Randomize blocks and trials but keep breaks in the same order
May 17, 2023 at 2:51 pm
#10599
ediachek
Participant
Hi Jeremy,
I’m also trying to make an experiment with randomized blocks and this is super helpful! However, I have a few more questions.
My each block will include study trials and test trials. Right now, these are 2 separate templates and I’m not sure how to unite them into 1 block. Here is what I have so far, I’d really appreciate your guidance!
-Yev
//Phase 1 Block 1: Study Trials [randomized in Sequence]
Template("bell_bottoms_study_2AFC_1.csv", row =>
newTrial("trials_study",
newText("study_question","Click on the image as described in the audio")
.center()
.cssContainer({"margin-bottom":"1em"})
,
//Load images
newImage("target", row.target_filename),
newImage("foil", row.foil_filename),
//Load audio
newAudio("audio", row.audio_file),
//Display images
newCanvas("image_study", 1000, 500)
.add(0, "middle at 60%", getImage("target"))
.add(550, "middle at 60%", getImage("foil") )
.print()
//.center()
.log()
,
//Play audio with instructions
getAudio("audio")
.play()
,
//Allow to select
newSelector("answer_study")
.add(getImage("target"), getImage("foil"))
.shuffle()
.log()
.wait()
,
newTimer("post-trial", 1000).start().wait()
)
//Phase 2: Test Trials [randomized in Sequence]
Template("bell_bottoms_test_2AFC.csv", row =>
newTrial("trials_test",
//Question
newText("Which image did you see in the previous section of the study?").print().center().cssContainer({"margin-bottom":"1em"}),
//Load images
newImage("target", row.target_filename),
newImage("distractor", row.distractor_filename),
newSelector("answer_test"),
//Display images
newCanvas("image_study", 1000, 500)
.add(0, "middle at 60%", getImage("target"))
.add(500, "middle at 60%", getImage("distractor") )
.print()
//.center()
.log()
,
//Allow to select
newSelector("answer_study")
.add(getImage("target"), getImage("distractor"))
.shuffle()
.log()
.wait()
)
- This reply was modified 1 year, 5 months ago by ediachek.