Howdy, Stranger!

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

Supported by

Changing the duration of a sketchpad depending on the response time

I have some issue to access the response time value for compute the duration of a sketchpad.
In my experiment there is a Keyboard_response (called "risposta") with a duration of 10.000 (10s).
After that I have a sketchpad (ISI) and I want to show it for a duration of 10.000 - response_time_risposta.
I added a inline script ISI_duration in wich I creata a variable to compute the duration in this way
var.ISIdur= 10000-response_time_risposta
But OpenSesame says: NameError: name 'response_time_risposta' is not defined

I cannot find a way to access the variable "response_time_risposta", I saw it in the variable inspector tool.

What is the correct way to do it?

Thanks a lot,

Here is my experiment's structure


  • edited July 2017

    Hi Paolo,

    Sketchpads are drawn in the prepare phase, that is everything that is included in making them, needs to available at the prepare phase. To use information that are only computed in a trial itself (like RT), you should use feedback items (see here).

    Hope this helps.

    Buy Me A Coffee

  • I change the inline script accordingly to "the prepare-run strategy" and now is working.
    Thanks a lot for your help!

  • edited July 2017

    Alternatively, you should be able to use a sketchpad. Set duration to zero and put your Inline script after it.
    Something along these lines should work. But if there is a good reason to use feedback items instead, I'd like to hear it. Precision timing perhaps?

    # The time it needs to be presented for is 10 seconds minus the RT. For the loop calculations you need the current clock time, and your loop starts at 0
    Showtime = 10000 - var.response_time_risposta
    start_time = clock.time()
    current_time = 0
    # Update the presentation time while it's smaller than the time you want it to be presented for
    while current_time < Showtime:
        current_time = clock.time() - start_time
    # Always print when debugging
    print("In ms, ISI was presented for: ", current_time)

  • Not particular reasons. If anything, then using a feedback item will be slower, as it is executed in the run-phase. So if you need precise timing and have heavy displays, feedback items shouldn't be used (or the timing should be tested, at least).

    In general, I prefer having fewer items in my sequence, so if I can do something with only a feedback item instead of a sketchpad and an inline_script, I'd got for the feedback item. Well, actually, I would only use an inline_script and do the stimulus presentation entirely in it.


    Buy Me A Coffee

  • The timing is not so important in this case.
    I cannot figure it out how to use only the "feedback" item without the inline code.

    I choose a different solution:

    -An "Inline code" to compute the duration after "risposta" and before "ISI"
    set description "Executes Python code" set _run "var.ISIdur= 10000-var.response_time_risposta" ___prepare__ var.ISIdur=0 __end__

    -"Sketchpad ISI" with duration "[ISIdur]"


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 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