Howdy, Stranger!

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

Supported by

[solved] recording RT during a sketchpad

edited January 2013 in OpenSesame

Hi !!

I just began to use OpenSesame, great software !

I try to record response time of a short stimulus (15ms) immediately followed by a sketchpad, so the subject can answer after the offset of the stimulus. My problem is that the keyboard response tool, which must follow the stimulus (sketchpad tool), freeze the stimulus screen during the timeout time, i.e : it doesn't disappear after 15ms . If set up to 0, RT correspond to the duration time of the stimulus.

I've tried to use the parallel tool to set up the RT recording during the onset of the sketchpad following the stimulus, but the OpenSesame.27 version crash on me every time.

Would someone have a solution ?

Thx a lot !

Raph

Comments

  • edited 5:18AM

    Hi Raph,

    I just began to use OpenSesame, great software !

    Thank you!

    I try to record response time of a short stimulus (15ms) immediately followed by a sketchpad, so the subject can answer after the offset of the stimulus. My problem is that the keyboard response tool, which must follow the stimulus (sketchpad tool), freeze the stimulus screen during the timeout time, i.e : it doesn't disappear after 15ms . If set up to 0, RT correspond to the duration time of the stimulus.

    Doing things in parallel is a bit tricky, and often requires a bit of scripting. So let's start with the most obvious solution: If your stimulus is only 15ms, can't you just have the keyboard_response appear immediately after it? For example, like:

    • target for 15ms
    • blank display (or a mask, etc.) for 0ms
    • keyboard_response

    Or is there a reason why this wouldn't work? If not, you would need Python scripting. Perhaps this can get you started: http://forum.cogsci.nl/index.php?p=/discussion/143/open-how-do-i-collect-the-keyboard_response-after-a-stimulus-disappears/p1

    I've tried to use the parallel tool to set up the RT recording during the onset of the sketchpad following the stimulus, but the OpenSesame.27 version crash on me every time.

    The parallel plug-in is indeed experimental, although it's obviously not supposed to crash. Could you perhaps explain in more detail what happens when you try to use it? And what operating system are you using?

    Cheers!

  • edited 5:18AM

    Hi Sebastiaan !

    Thx a lot for your quick response !

    So the thing is that my stimulus appears between two loops (in order to make flickering some grey shades before and after the stimulus).
    If my keyboard_response is just after the stimulus, it records only the display time of the stimulus (is set up at 0) or freeze during the timeout time (say 2000ms).
    If my Keyboard_response is set up after the loop, it records the time of the loop plus the stimulus display time.
    [IMG]http://img.cogsci.nl/uploads/50c9cf7c680b0.jpg[/IMG]

    I've tried to use a blank display, but RT are the same.
    I may do something wrong in the set up of the all experiment, would you have an idea ?

    About the parallel plug-in, the screen freeze when it should record the response_time while showing the last loop. When I hit escape, OpenSesame stop responding, I have to use the task manager to quit. I'm on Windows 7 (64, it may be the problem).

  • edited 5:18AM

    image

  • edited December 2012

    Hi Raph,

    It seems that what you really need is to poll the keyboard and present stimuli at the same time, or at least in rapid alternation. This is quite a common request, but also tricky to do ... hence the new parallel plug-in, which should (once the kinks are ironed out) be able to provide this functionality more easily.

    But for now this will require a bit of inline scripting. I don't know how familiar you are with Python, but the example script below presents two sketchpads (or actually two canvas objects that are copied from two sketchpads) in alternation, and checks for keyboard responses at the same time. Hopefully this example will get you started, and you can adapt it to your specific stimulus sequence. If not, please don't hesitate to post further questions.

    Cheers!
    Sebastiaan

    [pastebin:SizfF1PL]

  • edited 5:18AM

    Hey Sebastiaan !

    I've spend a few days of my winter breaks trying to poll the keyboard response near the stimuli, without success, I still record only the presentation time.
    Many thanks for the inline script ! Unfortunately, I'm not familiar at all with Python coding and I don't know how to use it.

    Could you be more specific about how to use the code ? (Do I insert it in a inline script item, in my existing opensesame protocol or in a fresh new ?)

    If you have time for a quick view of my experiment, here is a link :
    https://www.dropbox.com/s/ko3ab82g201olob/tritan reg.opensesame.tar.gz
    (it is pretty basic for now), maybe will it be more easy for you to see what is going on !

    Thx again !
    cheers

    Raphaël

  • edited 5:18AM

    Hi Raph,

    Right, I should have explained that more clearly, but the inline_script is actually quite simple to use. Essentially, it handles both stimulus presentation and response collection, so you can do away with the complicated loop/ sequence structure that you have in your experiment. The only thing that it requires is that there are two sketchpads, named sketchpad_1 and sketchpad_2, from which the script copies the displays. The sketchpads themselves are set to "Run if = never", because they are only there so that the inline_script can copy their contents. Does that make sense? Below you can see a screenshot.

    That being said, not having any knowledge of Python is not the best starting point, because you will probably want to tweak the script to suit your specific needs. Nothing too difficult, because the script is already pretty much finished and explained in the code comments. I would recommend walking through (at least parts of) a Byte of Python, this will pay off immensely in the long run:

    Good luck!
    Sebastiaan

  • edited 5:18AM

    Hey Sebastiaan!

    Thanks to your many advises, I've been able to customize the inlinescript and I believe I can record RT!
    Also, you are absolutely right, I need to learn a lot about Python, starting now. I just discover how it is useful.

    Nevertheless, my experiment is a bit tricky because the two masks surrounding the stimulus need to be flickering (in several shades of grey) before and after the stimulus for a certain amount of time. I've made it possible using loops but using the inlinescript, the sketchpads are now static.
    my question is: can I tweak the script for it to display two loops instead of two sketchpads?

    cheers!

    Raphaël

  • edited 5:18AM

    Hi Raph,

    my experiment is a bit tricky because the two masks surrounding the stimulus need to be flickering (in several shades of grey) before and after the stimulus for a certain amount of time (...) using the inlinescript, the sketchpads are now static.

    I probably misunderstand the question, but: The display is flickering before and after the response, right? If you add different contents to sketchpad 1 and 2, you should see a rapid flickering (alternation between sketchpad 1 and 2) while your response is being collected. Provided that you have created a trial_sequence as in the screenshot that I posted before, of course. If that's not what you have in mind, could you explain in more detail what kind of trial structure exactly you have in mind?

    my question is: can I tweak the script for it to display two loops instead of two sketchpads.

    Not really, no. The sketchpads are in this case only used to have something to draw on (as an alternative to creating canvases using inline_script). The 'flow' of the stimulus presentation is entirely controlled by the script. A loop is also something that controls the flow, so using a loop is not compatible with the script approach used here. Does that make sense?

    Cheers!
    Sebastiaan

  • edited 5:18AM

    Hi Sebastiaan,

    So here's the structure I want to set up: a first premask sketchpad is flickering in different shades of grey, then the target appears (space bar response asked, not flickering), soon followed by a second mask, also flickering.
    The target presentation is quite quick (15ms) so I need to record RT during the second mask. I want him to flicker in different shades of grey, and not in alternation with the target, but it is all that I manage to do with the inlinescript right know.

    Can I tweak the script so I can display more canvas (about 10) in random order ?
    I could then only use the script to display my flickering second mask while recording RT.

    Thank you so much !

    Raphaël

  • edited January 2013

    Right, I think I understand. First off, just to clarify, there is no such thing as a flickering sketchpad. One sketchpad = one static display. If you want to have a flickering stimulus presentation, you need to have multiple sketchpads (or canvases, which are the inline_script counterparts of sketchpads) that are presented in alternation. (But that's probably what you meant anyway.)

    The script below is slightly adjusted from the script above so that you can presented an arbitrary number of canvases (copied from sketchpad) either in random or sequential order. I would use one inline_script of this type to correspond to one phase of your trial sequence. So for example the flickering stream before the target would correspond to a single inline_script, but the target itself would be handled by another script (but only slightly different).

    You can have three inline_scripts (say, preTarget, target, and postTarget) which can have different lengths, different canvases, different order, different ITI, etc. This should offer you considerable flexibility. See the code comments for details, and make sure also to change the response variables in each script (just change the variable names at the bottom), so that they don't overwrite each other (unless that's what you want, of course).

    Hopefully this should get you started, and good luck!

    Edit: Minor fix to the script

    [pastebin:u473t6Li]

  • edited 5:18AM

    Hey Sebastiaan !

    It works, this is awesome !

    I've managed to customize the script thanks to your many advises and to the basics tutorials, and it finally displays my protocol the way I want and it records RTs (in minus milliseconds). Fiew !

    thanks again, great software !

    Raph

  • Hello, I'm new on OpenSesame and I have a little problem similar to the one above here but that I can not solve.

    My structure is:

    Fix-300ms(Skesketchpad) -> Stimulus-480ms(Skesketchpad) -> Keyboard Response->Logger ->Feedback

    I want to collect the response during the stimulus presentation, I changed the duration settings a lot but sometimes the response makes disappear the Stimulus presentation, sometimes I need to press the bottom twice to collect the response and sometimes the response is collected after the stimulus presentation, I dont know what to do.

    In brief I need to collect response during the stimulus presentation but I can not use coroutines, can anyone help me?

    Thanks in advance!


  • Hi Jesus,

    If the duration of a sketchpad is larger than 0, it means that during that time Opensesame is not able to do anything, including response collection. In your example, responding within 480 ms after stimulus onset would essentially be ignored (and you would need to press a second time to make something happen). If you press the key after 480 ms, it would stop stimulus presentation.

    Does this make sense? So, if you want your stimulus to be presented for 480 ms and still collect a response within that time, you need to set the duration of the sketchpad to 0 and the duration of the keyboard_response to 480 ms.

    If you also want to have response collection after those 480 ms (with a fixation dot filling the screen), things are a little bit more complicated.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hi Eduard, thanks for answering! Now I understand my problem better.

    However I tried to put 0ms on stimulus and 480ms on keyboard_response and when I press the key the stimulus onset stops, so if I press on 250ms the stimulus onset is 250ms, I want it to stay during the 480ms.

    Thanks again for the explanation!

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