Howdy, Stranger!

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

Supported by

[solved] Recording multiple responses in one trial

edited August 2011 in OpenSesame
On GitHub, Trombonechamp points out that multiple responses in one trial will overwrite each other. This makes it problematic to record, for example, the duration that has elapsed between two key presses.

Proposed solution
Add a prefix or suffix to all response variables, so that responses from multiple items won't overwrite each other. For example, a keyboard_response item named "resp", would record responses as [response_resp]. This is in addition to the old [response] variable, which is kept for backward compatibility.

Current workaround
To solve this issue for now, an inline_script item is required that renames the variables after they have been collected. For example:
self.experiment.set("response_a", self.get("response")) self.experiment.set("response_time_a", self.get("response_time")) self.experiment.set("correct_a", self.get("correct"))

Comments

  • edited 8:44AM
  • edited 8:44AM

    Hi Sebastiaan,
    How do you collect multiple responses using the Parallel Plugin? The above code does not seem to work using this method.
    Thanks
    Anthony McGuffie

  • edited 8:44AM

    Hi Anthony,

    The problem described in this post is that there used to be only a single response variable, which made it impossible to distinguish responses collected in multiple response items. For example when you had two keyboard_response items in a trial sequence. But the solution proposed above has been implemented already way back. (The post is from 2011.) See also:

    But this is unrelated to the parallel plug-in. Could you describe in more detail what you're trying to do, and what problems you run into?

    Cheers!
    Sebastiaan

  • edited 8:44AM

    Hi Sebastiaan,

    I am trying to create an Implicit Memory task that I have previously used in E-Prime.

    It is a dual task where participants are shown a word for 0-2000ms and at the same time (0-1000ms) there is a 3 digit number (num1) displayed above. At 1000ms-2000ms a second 3 digit number is displayed (num2) and (num1) disappears.

    The user responds with an 'x' if the word is living and also an 'm' if num1 and/or num2 is an odd number.

    This means there is a possible number of 3 individual responses within the 2000ms stimulus presentation. I have created 2 sketchpads (stim1) and (stim2) each duration being 1000ms and used the Parallel Plugin to record the responses.

    The problem I have is when using the Parallel Plugin, where to insert the inline code following the keyboard_response to collect all 3 responses. Has this method been tried in the past?

    I have supplied a link for you to get an idea of what i am trying to achieve.

    https://www.dropbox.com/s/it4yafta9huun9a/ImplicitMemory.opensesame?dl=0

    Thanks

    Anthony McGuffie

  • edited November 2014

    Hi Anthony,

    Right, I see. So if I understand correctly, you want to show three sketchpads (num1, num2, and blank) and collect three responses at the same time. Is that correct?

    You can do this by adding two sequences to your parallel item. The first sequence contains three keyboard_response item, thus collecting three responses. The second sequence contains three sketchpads for the stimulus presentation. Like so:

    image

    So I don't think you will need any scripting at all for this. For a simple example, see this gist:

    Cheers!
    Sebastiaan

  • Hi Sebastiaan,
    I have been working on open sesame for making a time series experiment for Necker cube perceptual switches. So how can I collect more than 250 key press responses on every perceptual switch which showing the same Necker cube target for around 5-6 minutes as a free viewing task. considering the fact that target should remain consistently in the screen without creating any visible changes.

    Thanx
    Shradha

  • Hi Shradha,

    There are two ways:

    1) A little crude, but you can make a simple loop with a sketchpad (for the cube with a duration of 0), a keyboard_response (duration keypress) and a logger. The trick is to set the number of repetitions of the loop to a very high value, so that it basically runs forever (sort of). Additionally, you check in the loop how much time has passed since you entered it, and break it as soon as 5-6 minutes have passed.

    2) Move everything into an inline_script. Something like that:

    cv = canvas()
    kb = keyboard()
    path = exp.pool[u'image_in_pool.png']
    cv.image(path)
    block_dur = 300000 # 5 minutes
    
    t0 = cv.show()
    while clock.time-t0<block_dur:
        var.response,var.response_time = kb_get_key()
        log.write_vars()
    

    Quite simple, you see?

    Good lcuk,

    Eduard

    Buy Me A Coffee

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