Howdy, Stranger!

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

Supported by

[solved] Use response time to set fixation duration

edited October 2013 in OpenSesame

Hi all!
In my experiment each trial should have the same fix duration of 4000ms. This means that the duration of each trial depends on the participant's response time in this trial. Is there a way to use the response time of a participant? I know there is a variable [response_time] that I can save in the logger. However, OpenSesame tells me that this variable is not set in the sketchpad that I am using for the end fixation. Is there a way to set the variable for the sketchpad? I am using a keyboard_response item for the response collection, but the same error occured when I created a keyboard response using inline code (I used the exp.set function, which usually works in this case).
Thanks for any help! =)

Comments

  • edited 10:40PM

    The reason that you cannot use [response_time] as a duration for a sketchpad in your case is because the duration is already prepared before the response has been collected. This is related to the distinction between the prepare and the run phase:

    And at any rate, you want a duration of 4000 - [response_time], right? So using [response_time] for the duration wouldn't result in the expected behavior anyway.

    The easiest trick to pad the response time is probably to insert a simple inline_script after the keyboard_response. The following code waits for 4000 ms minus the previously collected response time. (You need to put this code in the run phase of the inline_script.)

    self.sleep(4000-self.get('response_time'))
    

    You can also take a look at this discussion about non-slip timing:

    Hope this helps!
    Sebastiaan

  • edited October 2013

    This was what I wanted, thank you!
    But I realized that I now have another question: What happens if no reaction is shown? The keyboard response is set to time out after 1700ms. So I would like the 'response_time' in the self.sleep function to be replaced by this 1700ms if no reaction is shown. How can this be done? Or is this automatically the case?

  • edited 10:40PM

    When a timeout occurs, response_time is set to the timeout value and response is set to 'None'. So in your case I think timeouts should work exactly as you want!

  • edited 10:40PM

    Perfect, thanks again!

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