Howdy, Stranger!

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

Supported by

One-shot flicker

Hi,

I’m a complete novice to Open Sesame and trying to build an experiment as part of my final year in uni.  I have previously been successful with building the experiment with the flicker paradigm but my professor has suggested that one-shot flicker is more appropriate. I am investigating change blindness and have 2IVs with 2levels each. All together 4 conditions and the stimuli are images. I want to present them in the experiment as: original image-black screen-modified image-black screen- original image. The participants will be asked to use the mouse to click on the location where they think the change happened. I will be recording RT from the moment the original image is presented last. This is all in theory of course as I don’t have a clue how to set it all up or if mouse response on Open Sesame can be used as control to record for correct/incorrect click on the location of the change. The changes in the images will be either on the left or right side of the image, but of course they have to vary in all the pairs.

I would really appreciate any advice.

Best wishes

Reny

Comments

  • Hi ,

    I have been reading old posts and scripts posted on here and tried to put something together but without success. I have put together my set up by I can’t work out how to write my script to go in all my conditions. Could anyone please have a look at what I have so far and let me know what my next step might be?

    Best wishes

    Reny

  • edited March 24

    Hi,

    It's me again, so I have put together a inline script but I am not quite sure how to add the keyboard responces to record while the last image is presented. This is what I got so far..

    #create fixiation dot canvas
    fixdot_canvas=canvas()
    fixdot_canvas.fixdot()
    # The duration for each frame
    frame_dur = 2000
    # The number of repetitions
    repetitions = 4
    # Get the filenames for the two images. This assumes that you have defined these
    # filenames as the variables `img1` and `img2` and that these files are in the
    # filepool.
    # Get the full path to a file in the file pool
    print(u'The fool path to img1.jpg is %s' % pool[u'img1.jpg'])
    # Get the full path to a file in the file pool
    print(u'The fool path to img2.jpg is %s' % pool[u'img2.jpg'])
    img1 = self.get('img1')
    img2 = self.get('img2')
    
    # Create a keyboard with a timeout that is equal to the frameduration
    my_keyboard = keyboard(timeout=5000, keylist= ['z','m'])
    
    # Create three canvas objects, for both images and a gray one to get the
    # flicker effect.
    my_canvas1 = canvas(exp)
    my_canvas1.image(exp.get_file(img1))
    my_canvas2 = canvas(exp)
    my_canvas2.image(exp.get_file(img2))
    my_canvas_gray = canvas(exp)
    my_canvas_gray = canvas(exp, bgcolor='gray')
    
    #RUN
    fixdot_canvas.show
    clock.sleep(495)
    my_canvas1.show()
    clock.sleep(2000)   
    my_canvas_gray.show()
    clock.sleep(495)
    my_canvas2.show()
    clock.sleep(2000)
    my_canvas_gray.show()
    clock.sleep(495)
    my_canvas1.show()
    
  • Hi, your code looks already really good. What is missing is the loop element. You want to keep on flickering the two images until the participants find the change, right? So it would be easy to do loop over the phases of your experiment. Furthermore, you mentioned that you want participants to click on the change, right? IN this case you don't need a keyboard response at all, but a mouse response. Check out my code below and see whether you can make sense of it?

    #create fixiation dot canvas
    fixdot_canvas=canvas()
    fixdot_canvas.fixdot()
    # The duration for each frame
    frame_dur = 2000
    # The number of repetitions
    repetitions = 4
    # Get the filenames for the two images. This assumes that you have defined these
    # filenames as the variables `img1` and `img2` and that these files are in the
    # filepool.
    # Get the full path to a file in the file pool
    print(u'The fool path to img1.jpg is %s' % pool[u'img1.jpg'])
    # Get the full path to a file in the file pool
    print(u'The fool path to img2.jpg is %s' % pool[u'img2.jpg'])
    img1 = self.get('img1')
    img2 = self.get('img2')
    
    # Create a keyboard with a timeout that is equal to the frameduration
    ms = Mouse()
    
    # Create three canvas objects, for both images and a gray one to get the
    # flicker effect.
    my_canvas1 = canvas(exp)
    my_canvas1.image(exp.get_file(img1))
    my_canvas2 = canvas(exp)
    my_canvas2.image(exp.get_file(img2))
    my_canvas_gray = canvas(exp)
    my_canvas_gray = canvas(exp, bgcolor='gray')
    
    # canvasses
    canvasses = [my_canvas1,my_canvas_gray,my_canvas2,my_canvas_gray]
    timeouts = [2000,495,2000,495]
    #RUN
    index = 0
    fixdot_canvas.show
    clock.sleep(495)
    t0 = clock.sleep()
    while True: 
    
          # show the current canvas
          if clock.time()-t0<timeouts[index]:
              canvasses[index].show()
          else:
             index = (index+1)%4
          # wait for 10ms before moving on
          button,pos,time =  ms.get_click(timeout = 10)
          # if a buttonw
          if button != None: 
              break 
    # Next you can determine whether the position of the click was correct or not. 
    
    


    Eduard

Sign In or Register to comment.