Howdy, Stranger!

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

Supported by

Keypress influencing display duration

Hi,

I am fairly new to OS (and not a coding genius either :)). I have just set up an experiment where I show the target display for 200 ms (sketchpad duration 0, keypress duration 195), and another blank screen for a variable interval of 600-700ms (sketchpad duration 0, second keypress variable duration 595-695 ms).

What unfortunately happens, is, that a keypress forces the trial to end earlier, as

  • the duration of the first and second keypress is shortened if I press a response key within the first 200 ms
  • the duration of the second keypress is shortened if I press a response key within the next 600-700 ms

However, I would like to turn this off so I get constant intervals between two target displays (except the random interval mentioned above). In PsychoPy, this is possible by unticking the "force end of routine" tickmark at the stimulus. Is this somehow possible here as well?

Thanks for help and kind regards,

Bence

Comments

  • Hi @szaszkob ,


    Do you want to run your study online or locally? If locally, perhaps you can have a look at the coroutine functionality?



    If online, you will possibly have to use some lines of JavaScript by using an inline_javascript item.



    If you would like to give us more specific help, could you please provide us with some more information about the trial sequence? For example, what is happening in the second part of the trial? What is the second response? (In other words, why didn't you simply add a blank sketchpad with a certain duration instead of a keyboard_response item with a timeout)?


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Hi Lotje,

    I intend to run the experiment locally. Attached, you can see the trial sequence in the version without coroutines. I also tried it with a coroutine but did not get the result I was looking for. I also attached the whole version of my to-be-experiment if the .zip if you want to have a better understanding.

    The idea is to show stimuli in the target display for 200 ms, followed in the second part of the trial by 600 ms blank screen, answer should be possible during both. I added a second keyboard response (which actually should be the same response) because I did not know how to show two different screens during which a) an answer should be possible b) when a key was pressed OS should not proceed to the next element in the sequence but wait for the 600 ms.

    If I added a blank sketchpad with 600 ms duration after the first keyboard response element, an answer would only be possible for the 200 ms defined, right? But if I added only one keyboard response with 800 ms and then a blank sketchpad, then the stimuli would be shown for 800 ms which would be wrong.

    The keyboard response should be pos

    sible from the moment on the stimuli are shown - 800 ms long.

    I designed the trial as the following:

    BlockIndication = Is only shown in the first trial in a block and indicates the target for that block.

    Fixation_display_begin = Also only shown in the first trial of the block to have the same interval at the beginning as between the following trials

    Fixation_display_random_1 = a random interval between 0 and 100 ms at the beginning of the trial

    Target_display = Shown for 200 ms (set on 0 in the sketchpad but set by the duration of the following keyboard response), contains the stimuli

    Keyboard_response1 = Indicates that response should be possible from the onset of the target display on

    Fixation_display_blank + keyboard_response2 = As the interval between the onset of the stimuli should be 800 ms, this is the rest of the time where an answer is possible, showing a blank screen.

    Logger = Self-explanatory

    Break = Only every 56 trials


  • Hi Bence,

    I added a second keyboard response (which actually should be the same response) because I did not know how to show two different screens during which a) an answer should be possible b) when a key was pressed OS should not proceed to the next element in the sequence but wait for the 600 ms.

    There are two possibilities (that I see) to go about this:

    1) Use Python code directly. Then you can very straightforwardly use a structure like this (pseudo code):

    while (no response given) or (timeout not reached): 
        if elapsed_time < 200:
            show canvas one()
        else:
           show canvas two()
        key - get_keypress()
    

    2) have two keyboard items after each sketchpad (one for 200 the other for 600 ms), and after the second, you compute the response time, based on the total response time.

    Does that help? If not I can try to be more specific.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    It actually seems to work now with the co-routines Lotje mentioned before... I just have to measure if it is the exact timeframe. But many thanks for the code, I will use it as a backup (and in my current experiment I'm programming at the moment :))

    Best regards,

    Bence

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