Howdy, Stranger!

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

Supported by

[open] Separate reaction time in one trial

edited April 2014 in OpenSesame

Hello.

First of all, I must say that OpenSesame is quite interesting little program for making experiments. I started to use it for my research, and I have a problem.

So, I'll present one stimulus to subjects binoculary and their task will be to hold specific keyboard button (e.g. a or l) for some amount of time. The stimulus will be presented for 10 seconds and subjects will have to hold A or L button during that time; of course, they can shift their response (e.g. hold key A for 5.67 sec and key L for 4.33 sec, or they can hold only ).

And, that's my problem. Is there any way for recording two separate reaction times (for each key separate, because I'm testing the amount of time looking at one part, and the amount of time looking at other part of stimulus) for one stimulus, during limited time?

Thanks!

p.s. I started learning python, but...I'm still a noob.

Comments

  • edited 8:43PM

    Hi Nikolas,

    So if I understand correctly, you want to log all key press and release events that occur within this 10 s period, right? This is not too difficult to implement using an inline_script like the one below. You you can also find many variations of this basic problem here on the forum.

    The script below deals only with key presses, though. Key releases are a bit tricky, and it depends on the back-end how you can capture those. See for example:

    Cheers!
    Sebastiaan

    from openexp.keyboard import keyboard
    # Specify a duration and a list of allowed responses
    duration = 10000
    allowed_responses = ['a', 'l']
    # Create a keyboard object. The 0 ms timeout means that we can use it for
    # continuous polling.
    my_keyboard = keyboard(exp, timeout=0, keylist=allowed_responses)
    # Loop for the duration of time
    start_timestamp = self.time()
    response_number = 0
    while self.time() - start_timestamp < duration:
        # Poll the keyboard
        key, response_timestamp = my_keyboard.get_key()
        # If a response was given, register it as `response_0`, `response_1`, etc.
        if key != None:
            response_time = response_timestamp - start_timestamp
            exp.set('response_%s' % response_number, key)
            exp.set('response_time_%s' % response_number, response_time)
            response_number += 1
    
  • edited 8:43PM

    Yep, that's what I would like to do :)

    And thanks a lot! I'll try to make some combination out of these scripts, and I'll send results :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games