Howdy, Stranger!

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

Supported by

[open] Experiment does not save anymore

edited November 2013 in OpenSesame


The experiment attached does not save all of its data. It did before, but not anymore since I inserted an inline script for the randomization of sequences (copied from another topic here) and created a dummylist with these sequences in it. Could you please take a look?

This is the experiment:

This is how the logger saved the data before (and how I would like it to save the data):

This is how its saves the data now:

Thank you so much.



  • edited 8:31PM

    Hi Marianne,

    If variables are missing from the logfile, you can add them explicitly by disabling 'Automatically detect and log all variables' in the logger, and add the missing variables through the 'Add custom variable' button.

    If this doesn't solve things, could you describe your problem in more detail so we don't have deduce the problem from inspecting your experiment and logfiles!


  • edited December 2013

    I'm sorry, i'll try my best to explain in more detail.

    We present subjects with eye-movements (smooth-pursuit plugin) and beeps at the same time. There are high and low beeps and participants have to respond as fast as possible to the beeps by pressing "z" or "/" on the keyboard. Simultaneously they have to follow the movement of the dot with their eyes. After that they have to recall a memory and make the same eye movements while thinking of that memory. Afterwards they score the memory on 2 VAS (slider plugin).
    This loop is repeated for eye-movements of different frequencies (0.4, 0.6, 0.8, 1.0, 1.2 Hz and no eye-movements (blank)). These loops are presented randomly.

    A loop of one certain frequency (smoothpursuit+beeps only) looks like this:

       -Smooth_pursuit (e.g., 0.4 Hz, for 170000 ms)
       -LoopBeeps (2 beeps, repeated 40 times)
        -Advanced_delay (duration 2600 ms, jitter 400 ms)
        -Sampler (sound file [beep] defined in "Loopbeeps", duration = 0) 
        -Synth (length=0, duration = 0)
        -Keyboard_response ([CR] defined in "Loopbeeps", allowed responses z,/, Timeout=2000 ms, flush pending keypresses)

    I want opensesame to record the reaction time to each beep, and whether the response is correct (high or low tone). When a button is pressed, the next beep must be presented with an interval of 2600 ms +/- 400 ms. The experiment has to wait with presenting a new tone until a button is pressed in response to last tone OR until 2000 ms are over (Timeout = 2000 ms).

    So: beep - wait - buttonpress - 2600+/-400ms - beep

    Or: beep - wait - 2000 ms timeout - 2600+/-400ms - beep

    Did I do this correctly? (I guess not)

    Right now the logger does not log all responses. For most beeps the output file says response = none (despite the fact that I really pressed the buttons). Furthermore the experiment always seems to wait for 2000 ms until presenting a new tone, even when a button was pressed.

    Furthermore the logger does not log which eye_movement frequency was presented. I declared a new variable in "LoopDualTask", i.e., "EyeMovement_frequency" with the correct frequency underneath. But the logger does not record this; displays NA instead.

    I want to note that for random presentation of the different loops of different frequencies, I had to use an inline script from this website:

      import random
      sequence_list = ['04sequence', '06sequence', '08sequence', '10sequence', '12sequence', 'NoEM_sequence']

    ...and I had to create a dummy list with all the frequency loops. This dummy list is set to "run if = never". I'm not sure whether this interferes with logging, but after I inserted this script the experiment did not log everything anymore.

    Before, the experiment DID log all responses, DID log EyeMovement_frequency (and I believe it did not wait till 2000 ms before continuing to the next beep, but I'm not sure). Of course, before the frequency loops were not presented at random.
    I'm a total noob and can't figure out what went wrong.

    I have another question about this study design. It is not very elegant to present the smooth_pursuit for 170.000 ms, which is a guestimation of how long it would take for a participant to respond to all beeps. It would be nice if the eye movements stopped after the participant responds to the last beep. How can i do that?
    So how can you make to operations in a Parallel stop at the same time?

    Thank you in advance

  • edited 8:31PM

    Hi Marianne,

    Well that's quite a lot that you want to do at the same time! I think you'll be much better of using an inline_script than trying to build this using the GUI. It may be possible, but it will end up being a complicated mess (looking at the structure you describe above, that may have already happened!).

    Below you see a script that does the following, which, from what I understand, is about what you need:

    • Show an oscillating smooth pursuit target
    • Play 2 beeps, and record the response time after each one.
    • End after second response

    This is script is a bit tricky, because it requires some bookkeeping about where you are in the trial. But if you carefully walk through the logic of the loop and carefully read the comments, you should be able to figure out how it works.

    import math
    from openexp.canvas import canvas
    from openexp.keyboard import keyboard
    from openexp.synth import synth
    amp = 200. # Vibration amplitude (pixels)
    freq = .5 # Vibration frequency (hz)
    T = 1000. / freq # Vibration duration is derived from frequency
    dur1 = 1000 # Duration before first beep
    dur2 = 1000 # Duration before second beep, relative to the first response
    # Create canvas, keyboard, and synth (beep) objects
    my_canvas = canvas(exp)
    my_keyboard = keyboard(exp, timeout=0)
    my_synth1 = synth(exp, freq='a1')
    my_synth2 = synth(exp, freq='c1')
    wait_for_resp1 = False
    wait_for_resp2 = False
    t0 = self.time()
    while True:
        # Draw the smooth pursuit target
        t = self.time() - t0
        dx = amp * math.sin(((t % T)/T) * 2 * math.pi)
        my_canvas.fixdot(x=my_canvas.xcenter() + dx)
        # If its time for the first beep, and it hasn't already been played, then
        # play it and start waiting for the first response.
        if dur1 != None and t >= dur1:
            wait_for_resp1 = True
            dur1 = None
        # If its time for the second beep and the first beep has already been
        # played and we are not waiting for the first response, then play it and
        # start waiting for the second response.
        if dur1 == None and not wait_for_resp1 and dur2 != None and t >= dur2:      
            wait_for_resp2 = True
            dur2 = None
        # If we are waiting for the first response, log it, and adjust the duration
        # for the second beep based on the response time.
        if wait_for_resp1:      
            resp, t_resp = my_keyboard.get_key()
            if resp != None:
                exp.set('response_1', resp)
                exp.set('response_time_1', t_resp - t0)
                wait_for_resp1 = False
                dur2 += t_resp - t0
        # If we are waiting for the second response, log it, and break the loop.
        # Done!
        if wait_for_resp2:      
            resp, t_resp = my_keyboard.get_key()
            if resp != None:
                exp.set('response_2', resp)
                exp.set('response_time_2', t_resp - t0)
        # Sleep a bit to give the computer time to do other things, such as playing
        # the beep in the background.

    Good luck!


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 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