Howdy, Stranger!

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

Supported by

retrieve response time within trial to adjust ISI

Hi there,

Sorry for double posting this question, but it might be a particular issue related to collecting my response with mousetrap:

This must be something really straightforward, but I am stuck here. I have a trial that presents a canvas with visual response options and a sound file, both initialized by a mouse click on a start button. While listening to the sound, participants have to click on one of the responses to proceed. 

Each sound file has a certain length and I want participants to be able to give an early response if they want to but because I am also tracking their eye fixations, I do not want the canvas to proceed before the end of the sound file. I collect my mouse responses with the mousetrap plugin (interested in mouse trajectories). Apparently, the trajectories are not collected until the previous canvas/sound has finished, so I have to set the duration of canvas / sound = 0. 

My idea is to present a second canvas with a duration defined by the length of the sound file minus the response time of the mouse click. However, if I try to retrieve the [response_time] it spits out the RT of the previous trial. How can I access the response time of the just made response and incorporate it into calculating the duration of the following canvas? Any suggestions? Sorry if this is a silly question. Any help would be highly appreciated.

Best,

Timo

Comments

  • Hi Timo,

    The response time variable is being created by the mouse_response or keyboard_response item (whichever you are using). So if you would add the the second canvas after that item, it should use the current response time. Alternatively (and maybe even easier), you could just sample the current system time (clock.time()) right before the canvas starts and once again the response has been given, take the difference et voila! You'll have your response time.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Thank you Eduard, but I am struggling big time.

    Just to be sure: I insert a inline script right after the canvas and audio is initiated that clocks the time:

    var.start = clock.time()

    I then insert another inline script after the response and before the intended spill-over canvas that clocks the time again and calculate the difference between the two timestamps, correct

    var.end = clock.time()

    var.start_end = var.end - var.start

    This should give me the time from start button click to response click. But it doesn't, the numbers are off and I have no clue what happens.

    (var.RT_self = self.get("response_time") doesn't make sense either)

    For sanity check, I printed the values of these variables on the following canvas.

  • Have you put the code in the run phase of the inline_script? Can you share your experiment here? (Or, if it is very complex, a simplified version?)

    Buy Me A Coffee

  • Somehow I cannot upload the file here:

    https://we.tl/t-FOt4pmgIz0

  • One thing to do is to start recording eye data before taking the start time. Pygaze_start_recording takes about 300-400 ms to initialize. I don't think this causes delays but I usually start play the sounds before showing the image. Do these changes solve the issue? (They should)

    Aside of that, I don't know how exactly response times are calculated with the mousetrap plugin. Maybe @Pascal can help?


    Eduard

    Buy Me A Coffee

  • Does the logic of the script makes sense to you tho? None of the numbers make any sense to me. Even if you throw out the pygaze objects (or put it before taking the start time), the number remain weird...

  • Hi Timo,

    I think that I do not completely understand the procedure you want to implement, but maybe some general comments that might help:

    The response time is recorded by the mousetrap_response item in the variable response_time_[item_name] so should be able to use it directly without computing it yourself.

    As the response time is available only after the response is given, you can only use it in the run phase of your inline scripts.

    If you use a sketchpad to display the response time / time left you calculated, it will display the response time from the last trial, as the sketchpad is prepared before the trial is run. If you want to display the value of the current trial, you would have to use a feedback instead of a sketchpad item. See prepare-run distinction in the OpenSesame documentation: https://osdoc.cogsci.nl/3.2/manual/prepare-run/

    I think that you can still change the presentation duration of a sketchpad item in the run phase (I think this behavior might have changed between different versions of OpenSesame, but I am not sure). In general, I think that it would still be best practice to use a feedback item if you want to change the display duration during the trial.

    Mousetrap_response items do allow you to specify a timeout, after which they automatically continue, which might be of interest to you. You could set the number of buttons to 0 for a mousetrap_response item and specify a timeout value, to just collect mouse movement for a specified amount of time without the user being able to give a response. Afterwards, you could insert a second mousetrap_response item to collect the response.

    Does this help in some way?

    Best,

    Pascal

  • Hi Pascal,

    there is a bunch of useful information in your response, I am sure it will help us figure out who to circumvent our problem. Thank you!

    Best,

    Timo

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