Howdy, Stranger!

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

Supported by

[solved] possible to use time logger within trail?

edited October 2013 in OpenSesame

Hi,

thank you so much for this forum.
In a dection task I would like to record multiple responses in one trail, as we measure the time it takes participants to detect multiple features. Importantnly, participants use the same response-key, and the trail terminates when the time (eg 30s) is over, independent of the responses.
Unfortunately, now the output only gives me the log (time ect) of a single response.
Is it possible to record multiple response (-times) in one trail ? Maybe similar to a time logger?

Kind regards,

Comments

  • edited 1:50PM

    Hi,

    Perhaps you could look at a previous thread on a similar topic:

    Please let us know if this is not exactly what you're looking for, or if you have trouble implementing this method in your experiment.

    Best wishes,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 1:50PM

    Hi Lotje,

    thank you soo much! And my excuses that I did not find the existing threat myself. Now Im half there. The logger tells me the number of presses, but it does not give me the times. Is that also possible? Now only the first (or last?) press is shown.
    Kind regards,

  • edited October 2013

    Hi,

    Saving the time stamps corresponding to all key presses within a current trial could be done like so:

    # Determine the timeout in ms:
    timeout = 3000
    
    # Create keyboard_response item:
    from openexp.keyboard import keyboard
    my_keyboard = keyboard(exp, keylist=['space'], timeout = 0)
    
    # Determine the timestamp of the start of the response
    # interval:
    start_time = self.time()
    
    # Give the number of spacebar presses a starting
    # value, namely 0.
    nPresses = 0
    
    # Collect keyboard response until 3000 ms (or whatever
    # you set the timeout to) passed:
    
    # Define the maximum number of responses:
    maxResp = 20
    
    # Make variables for time stamps, that have 'None' as 
    # starting value:
    for i in range(maxResp):
    
        # Create variable name (i.e. column header
        # in output file):
        varName = "time%.2d" % i
    
        # Assign the value 'None' :
        exp.set(varName, "None")
    
    
    while True:
    
        # Get new timestamp:
        current_time = self.time()
    
        # Continue only if the duration is still
        # smaller than timeout:
        if current_time - start_time < timeout:
    
            # Collect keyboard response:
            key, end_time = my_keyboard.get_key()
    
            # Add to the number of presses if response was not 
            # 'None' (meaning no key was pressed):
            if key != None:
                nPresses +=1
    
                # Create variable containing current time stamp
                # (called 'time01', 'time02', etc.)
                varName = "time%.2d" % nPresses
    
                # Set the new variable and give it the 
                # corresponding value:
                exp.set(varName, end_time)
    
        # If (more than) 3000 ms have passed, advance to the 
        # next part of your experiment:
        else:
            break
    
    # Set the number of spacebar presses for future use in the 
    # user interface (notably, the logger item).
    self.experiment.set('nPresses', nPresses)
    
    

    Now your output file should contain column headers called 'time01', 'time02', etc., containing the time stamps corresponding to the first and the second button press, etc.

    Does this help? Please let us know if you have any further questions!

    Good luck!

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 1:50PM

    yeees! Thank you soo much!

    It is really amazing that you spend your time and effort to help us!

    big hug!

  • edited 1:50PM

    Dear Lotje!

    It works like a charm, thank you so much!
    Now I would like to show my participants a video while they have to detect certain features. So i could use exacly the same experiment, only now "while" playing the video. I tried the built in vlc player but it seems to only first play the video and then collect the resonses, but not collect responses until the video stops.

    Kind regards,

  • edited 1:50PM

    Yeah, the event detection system is not really well implemented for the vlc plugin. I will have a look at it soon. It however is tested and it works for the gst variant of the media_player, so you might want to try that!

    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