Howdy, Stranger!

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

Supported by

How to collect two key responses within the same time window?

edited February 2017 in OpenSesame

I need to collect two responses one followed by the other within 1600ms. I need separate RT's for both the response. Also i would like how to collect RT of the second response relative to the first response in the log file.

Comments

  • Hi Rampriya,

    This older thread might be helpful:

    If you want to calculate and log the absolute RT and the relative RT between the response, you can add and subtract the timestamps within the while True loop of that script. The are quite some threads around on the forum that might help you with that.

    Best,
    Laurent

  • I'm a beginner to open sesame. I'm still not getting it :| . any other relevant link from forum would be of great help.

  • edited February 2017

    Hi,

    Is this code what you want?


    kb = keyboard() # first response start_time1 = clock.time() k1,t1 = kb.get_key() if k1 != None: response_time1 = t1-start_time1 k2,t2 = kb.get_key(timeout=1600) if k2 != None: response_time2 = t2-t1 else: response_time2 = None

    Eduard

    Buy Me A Coffee

  • Please don't discuss the same issues in two separate threads. It will make the forum very messy!

    Buy Me A Coffee

This discussion has been closed.