Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Add a short brake in between the fully randomized presentation of 200 trials

I am presenting 200 trials in a randomized order to the participants. As this could be boring to them, I want to have a brake in the presentations, say after 100 trials. Please could you kindly advice what to do for this.
Thanks in advance,
Masoud

Comments

  • Hi Masoud,

    I ran into this same challenge a few years ago and came up with a solution using Python code. The following code takes the names of each of the files in the file pool and assigns them in a random order to variables which can be called back later.

    In my case, I needed to randomly present five images from one set (labeled c1.png through c10.png), then present 5 images from the other set (labeled cf1.png through cf10.png), and then complete the two sets. The way I have this set up, I can refer to [i1] through [i10] (for set one) or [u1] through [u10] as variable substitutes for the names of the images. If I knew what was changing between your trials, I may be better able to help. Otherwise, I have included the code that I used below:
    '

    import random
    
    pictures = []
    
    for x in range(1,11):
        pictures.append(self.experiment.get_file("c" + str(x)+ ".png"))
    
    random.shuffle(pictures)
    
    selection = []
    
    for x in range(1,6):
        self.experiment.set("u"+str(x), pictures.pop())
    
    selection = []
    
    for x in range(6,11):
        self.experiment.set("u"+str(x), pictures.pop())
    
    pictures = []
    
    for x in range(1,11):
        pictures.append(self.experiment.get_file("cf" + str(x)+ ".png"))
    
    random.shuffle(pictures)
    
    selection = []
    
    for x in range(1,6):
        self.experiment.set("i"+str(x), pictures.pop())
    
    selection = []
    
    for x in range(6,11):
        self.experiment.set("i"+str(x), pictures.pop())
    

    '

  • Thanks a lot.
    As you can see, there are 10 valenced and 10 neutral pictures, each one presented on the left or right the screen. This was a modified dot-probe task. A fixation point followed by a x1 and x2 photos (png) in a same sketchpad and then a dot appeared in the next trial in one of the -256 or +256 locations. Here I managed the program to always present the dot in the location of the n6-n15 stimuli.
    I hope this give you more information then I can have your kind comment on how to change the script to satisfy for adding a short brake between the trails.
    Thanks,
    Masoud

    PS:
    The full design including 200 trails runs as follow:
    x1 x2 location
    bc2 n6 256
    bc2 n7 256
    bc2 n8 256
    bc2 n9 256
    bc2 n10 256
    bc2 n11 256
    bc2 n12 256
    bc2 n13 256
    bc2 n14 256
    bc2 n15 256
    bc3 n6 256
    bc3 n7 256
    bc3 n8 256
    bc3 n9 256
    bc3 n10 256
    bc3 n11 256
    bc3 n12 256
    bc3 n13 256
    bc3 n14 256
    bc3 n15 256
    fd2 n6 256
    fd2 n7 256
    fd2 n8 256
    fd2 n9 256
    fd2 n10 256
    fd2 n11 256
    fd2 n12 256
    fd2 n13 256
    fd2 n14 256
    fd2 n15 256
    fd3 n6 256
    fd3 n7 256
    fd3 n8 256
    fd3 n9 256
    fd3 n10 256
    fd3 n11 256
    fd3 n12 256
    fd3 n13 256
    fd3 n14 256
    fd3 n15 256
    mc2 n6 256
    mc2 n7 256
    mc2 n8 256
    mc2 n9 256
    mc2 n10 256
    mc2 n11 256
    mc2 n12 256
    mc2 n13 256
    mc2 n14 256
    mc2 n15 256
    mc3 n6 256
    mc3 n7 256
    mc3 n8 256
    mc3 n9 256
    mc3 n10 256
    mc3 n11 256
    mc3 n12 256
    mc3 n13 256
    mc3 n14 256
    mc3 n15 256
    mr2 n6 256
    mr2 n7 256
    mr2 n8 256
    mr2 n9 256
    mr2 n10 256
    mr2 n11 256
    mr2 n12 256
    mr2 n13 256
    mr2 n14 256
    mr2 n15 256
    mr3 n6 256
    mr3 n7 256
    mr3 n8 256
    mr3 n9 256
    mr3 n10 256
    mr3 n11 256
    mr3 n12 256
    mr3 n13 256
    mr3 n14 256
    mr3 n15 256
    in2 n6 256
    in2 n7 256
    in2 n8 256
    in2 n9 256
    in2 n10 256
    in2 n11 256
    in2 n12 256
    in2 n13 256
    in2 n14 256
    in2 n15 256
    in3 n6 256
    in3 n7 256
    in3 n8 256
    in3 n9 256
    in3 n10 256
    in3 n11 256
    in3 n12 256
    in3 n13 256
    in3 n14 256
    in3 n15 256
    n6 bc2 -256
    n7 bc2 -256
    n8 bc2 -256
    n9 bc2 -256
    n10 bc2 -256
    n11 bc2 -256
    n12 bc2 -256
    n13 bc2 -256
    n14 bc2 -256
    n15 bc2 -256
    n6 bc3 -256
    n7 bc3 -256
    n8 bc3 -256
    n9 bc3 -256
    n10 bc3 -256
    n11 bc3 -256
    n12 bc3 -256
    n13 bc3 -256
    n14 bc3 -256
    n15 bc3 -256
    n6 fd2 -256
    n7 fd2 -256
    n8 fd2 -256
    n9 fd2 -256
    n10 fd2 -256
    n11 fd2 -256
    n12 fd2 -256
    n13 fd2 -256
    n14 fd2 -256
    n15 fd2 -256
    n6 fd3 -256
    n7 fd3 -256
    n8 fd3 -256
    n9 fd3 -256
    n10 fd3 -256
    n11 fd3 -256
    n12 fd3 -256
    n13 fd3 -256
    n14 fd3 -256
    n15 fd3 -256
    n6 mc2 -256
    n7 mc2 -256
    n8 mc2 -256
    n9 mc2 -256
    n10 mc2 -256
    n11 mc2 -256
    n12 mc2 -256
    n13 mc2 -256
    n14 mc2 -256
    n15 mc2 -256
    n6 mc3 -256
    n7 mc3 -256
    n8 mc3 -256
    n9 mc3 -256
    n10 mc3 -256
    n11 mc3 -256
    n12 mc3 -256
    n13 mc3 -256
    n14 mc3 -256
    n15 mc3 -256
    n6 mr2 -256
    n7 mr2 -256
    n8 mr2 -256
    n9 mr2 -256
    n10 mr2 -256
    n11 mr2 -256
    n12 mr2 -256
    n13 mr2 -256
    n14 mr2 -256
    n15 mr2 -256
    n6 mr3 -256
    n7 mr3 -256
    n8 mr3 -256
    n9 mr3 -256
    n10 mr3 -256
    n11 mr3 -256
    n12 mr3 -256
    n13 mr3 -256
    n14 mr3 -256
    n15 mr3 -256
    n6 in2 -256
    n7 in2 -256
    n8 in2 -256
    n9 in2 -256
    n10 in2 -256
    n11 in2 -256
    n12 in2 -256
    n13 in2 -256
    n14 in2 -256
    n15 in2 -256
    n6 in3 -256
    n7 in3 -256
    n8 in3 -256
    n9 in3 -256
    n10 in3 -256
    n11 in3 -256
    n12 in3 -256
    n13 in3 -256
    n14 in3 -256
    n15 in3 -256

Sign In or Register to comment.