Howdy, Stranger!

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

Supported by

Stimulus presentation after response

Hey,

I have a response time experiment during which participants need to indicate via their keyboard whether a triangle that appears on the screen is to the left or right of a fixation point. Currently, after they respond, the fixation point appears again and after several miliseconds another triangle appears.

Is it possible to ensure that that after they provide a response, the triangle will stay on screen for a set duration regardless of their response time? Only after that time, the fixation point and the next triangle appear (again for the same fixed time), while still logging their response times for each triangle?

Thanks,

Comments

  • Hi @Tomer_02,

    If I understand correctly, you want to keep the ISI constant, ensuring that the triangle remains on the screen for a specific duration irrespective of when the participant respond during that interval.

    You could do it in two ways. One is to use co-routines (see information here: https://osdoc.cogsci.nl/4.0/manual/structure/coroutines/).

    Another way would be to use some coding and a feedback object. Yo would need to insert some code after the keyboard objec and in that code you would need to calcualte the different between a set interval (the total time you want the triangle to be displayed) and the response time measured by the keyboard object. You would then use this difference as the duration of a feedback object located right after the piece of code. The feedback object should have the same appearance as the sketchphad where you display the triangle.

    Hope this helps.

    Please avoid posting the same message several times, it is confusing for users of the forum. Once your message has been posted, it is visible to the users.

    Best,

    Fabrice.

    Buy Me A Coffee

  • edited September 2023

    Hi Fabrice,

    Thanks for the answer. The second option is what I meant to do in the other post. I tried doing so using inline_script, but as you might have read I didn't succeed.

    My aim is to create a variable called "presentation", which is the difference between the set interval (600 milliseconds) and the response time, and use it as the duration in the following feedback item.

    my code:

    exp.set ('presentation', 600-'response_time')

    I keep getting an error message which states that this is not supported. What should I do?

    Thanks again,

    Tomer

  • Hi Tomer,

    Please share complete code or better yet your experiment with a complete error message. With the bits of information you provide it is not really easy to identify the problem.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    This is the error I get:

    Error: PythonError

    Error while executing inline script (run phase)

    This error occurred on line 1 in the run phase of item new_4_inline_script.

    Traceback (most recent call last):
      File "<new_4_inline_script.run>", line 1, in <module>
    TypeError: unsupported operand type(s) for -: 'int' and 'str'
    

    I also added a picture of this part of the experiment. The code is in the inline script part and it just includes the following code in the run phase:

    exp.set ('presentation', 600-'response_time')

    What I want is that the stimulus (in the target item) won't disappear after the participant's response. I thought to do so by creating the variable "presentation" and using it as the duration of the feedback item, which shows the same as the target sketch pad.

    Thanks, Tomer

  • Hi @Tomer_02,

    As @eduard pointed out, it would be helpful if you uploaded your experiment or a strip down version of it. It would also be useful if you confirmed which version of Open Sesame you're using. From the error message, it seems that the issue is that you're trying to mix numerical and alphanumerical variables.

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice,

    A strip-down of my experiment is attached.

    Open Sesame version is  4.0 Melodramatic Milgram.

    I appreciate your support,

    Tomer

  • FabFab
    edited September 2023

    Hi @Tomer_02,

    Thanks for uploading a stripped down version of your task.

    I spotted several issues:

    (1) You had set the duration of your target sketchpad to 600 ms. That means that the task would wait for 600ms before moving on to the keyboard event. I assume this is not what you actually wanted to do since this method means that you are actually recording response times from the offset of the sketchpad. That is, the sketchpad appears for 600ms, and then only you start recording response times. I changed the duration of the target sketchpad to 0ms, so that the response time starts being measured right from the appearance of the target sketchpad.

    (2) Your Python code was, I think, inaccurate and oldd ated. It were trying to subtract something alphanumerical from something numerical. Furthermore, the exp.set method dates back to an older version of Open Sesame. Since Open Sesame 3 and even more so from Open Sesame 4, the handling of variables is much easier. You simply need to use the following:

    presentation = 600-response_time
    

    As simple as that in Open Sesame 4.

    (3) The duration of your feedback object was set incorrectly. You used presentation, which does not mean anything to the program because it does not know what this refers to. You need to tell the program it refers to a variable. This is done using [presentation] (in versions 3 or 4 of Open Sesame) or {presentation} (in version 4). The latter is recommended from now on if you're using Open Sesame 4 *see release notes> https://osdoc.cogsci.nl/4.0/notes/400/).

    I attach a modified version of your task so that you can see how I implemented these changes. I added another feedback object that displays the response time so that you can verify that it is now working.

    I noticed that your objects are names with _1 in their names. if you're using many loops that use the same structure and objects, it is better to use linked copies than new copies every time. Linked copies make it easier to make changes that need to be applied throughout. Let's imagine that you have three loops doing the same thing, with the only different being the actual pictures to be displayed. The pictures names would be contained in the loops, but the rest of the trial structure is the same. Let-s say that you decide that want your fixation sketchpad to appear for 500 ms instead of 600 ms. If you made different copies of the fiixation sketchpad, you have to go and change that parameter in each of the three copies. If you use a linked copy, you just have to change it in one instance of the three and all three get updated.

    Hope this helps,

    Fabrice.

    PS: if you use the @ handler when replying to messages in the forum, the person you send the message too gets notified. Just type @ and the first letters of your correspondent's username and a pull down menu will pop up.

    Buy Me A Coffee

  • edited September 2023

    Hi @Fab

    It works and looks great.

    Thanks you for your support. I Highly appreciate it.

    Tomer.

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