Howdy, Stranger!

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

Supported by

[solved] How to block a response during fixation?

edited September 2011 in OpenSesame
Hi,
During a fixation, if I press a response button it gets stored and as soon as the stimulus come on screen the program acts like of the subject pressed a response key immediately as soon as the stimulus appears. I would like that if the subject presses a button during fixation, nothing happens.

Comments

  • edited 2:29AM

    Also...
    using a srbox I want to impose a 1000ms timeout so that the stimulus stays on screen for 1000ms. If the subject answers, after 1000ms next screen is a feedback screen. But if subject fails to answer, at 1000 ms a different feedback screen tell the subject to answer faster and moves to the next trial. Using the timeout function in srbox, when I did not answer in 1000ms an error appeared saying that: 'Error: Runtime error
    Description: An error occured in srbox 'srbox': Only number keys are accepted in dummy mode'

  • edited 2:29AM

    Hi Frankanayet,

    Regarding your first question:

    if I press a response button it gets stored and as soon as the stimulus come on screen the program acts like of the subject pressed a response key immediately as soon as the stimulus appears.

    I suspect something is wrong with the order or the durations of the items, since OpenSesame would normally ignore key presses until a "keypress" duration is encountered or a keyboard_response item. So something like the following should give you the desired behavior:

    1) fixation sketchpad (duration = 1000)
    2) target sketchpad (duration = 0)
    3) keyboard_response

    Regarding the SR Box error message, that's a bug. I've filed an issue https://github.com/smathot/OpenSesame/issues/35. Thanks for bringing this to my attention!

    Hope this helps!

    Kindest regards,
    Sebastiaan

  • edited 2:29AM

    Thanks for your reply Sebastian,
    However, I had exactly that setup, I tried changing the srbox for a keyboard_response item, but I got exactly the same problem.

  • edited 2:29AM

    Really? Just for my understanding: The problem is that the key presses during fixation are not "flushed", so that they lead to a response as soon as the target appears, right?

    I haven't installed attachment functionality in the forum yet, but perhaps you can email me the experiment or upload it somewhere and post the link here? I suspect it's some subtle difference in the experiment, because it should work, but it's difficult for me to tell what it could be without seeing the experiment.

  • edited September 2011

    [Continuing from e-mail]

    I took a look at your experiment and it looks fine. It also works correctly for me. So that's very strange... Based on your previous question I gather that you're using Mac OS, right? It could be that flushing doesn't work properly on the Mac. But I'll have to confirm that with someone who has a Mac.

    I'll get back to you on this!

  • edited 2:29AM

    It does appear to be a Mac OS specific bug. I asked Mark and he confirmed the problem. I opened an issue about this on GitHub.

    I'll mark this post as solved, because the problem the problem appears to have been tracked down.

    Again, thanks for bringing this to my attention!

  • edited 2:29AM

    Hi Sebastiaan,

    I am still having problems with the timeout issue...it seems I have a couple of related problems.
    1. if I have fixation = 1000ms, then sketchpad = 0 and then a timeout of 1000, then the [response_time] is read appropriately (using print statements in the debug window) but the 'run if' conditions in the trial sequence are not using the information appropriately.
    2. I actually need the sketchpad to stay on screen fr 1000ms regardless of the fact that the subject responds before the timeout or not. If I change the duration of the sketchpad to 1000ms then the 'response_time' says 1001ms or timeout even regardless of when i press the button. I have tried checking and unchecking the start response interval box and it doesn't work either way.

    Also, I'm testing this on a windows machine to avoid possible mac bugs...

    I would appreciate any insights you may have!

    Thanks

  • edited 2:29AM
    if I have fixation = 1000ms, then sketchpad = 0 and then a timeout of 1000, then the [response_time] is read appropriately (using print statements in the debug window) but the 'run if' conditions in the trial sequence are not using the information appropriately.

    Are you by any chance using conditional statements with ">" or "<"? This won't work (I appreciate that this could be made clearer), because all values are interpreted as strings (so "larger than" has a different meaning than it does for numerical values). But it's difficult for me to tell what the problem is, based on your description: What do you want to do, specifically? And what goes wrong at the moment?

    I actually need the sketchpad to stay on screen fr 1000ms regardless of the fact that the subject responds before the timeout or not.

    The best way to achieve this is to insert a variable delay after the keyboard_response, so that the total delay (response_time + delay) is always the same. The the delay would be (in your case) 1000ms - response_time.
    You could do this in a number of ways, but the simplest way is probably by inserting an inline_script item right after the keyboard_response, with the following code in the run phase:

    self.sleep(1000 - self.get("response_time"))

    Does this make sense?

    (If you change the duration of the sketchpad this will have the effect of waiting for some time until keypresses are accepted. This is probably not what you want.)

  • edited 2:29AM

    Ok... I was using a > in the run if conditional... however I solved the problem by switching the conditional into on inline script and using a 'feedback' variable in the run if conditional with different values for the different options like this...

    if self.get('response') == '1' and rtime < 1000:
    self.experiment.set('feedback','LEFT')
    print 'i should show left feedback!'
    elif self.get('response') == '2' and rtime < 1000:
    self.experiment.set('feedback','RIGHT')
    else:
    self.experiment.set('feedback','FASTER')

    With regards to the 1000ms delay your solution works great!

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