Howdy, Stranger!

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

Supported by

[open] All stimuli not shown in logger

edited September 2013 in OpenSesame

Hi,

I have a problem with the logger. In each trial the words which have been presented as stimuli are not seen in the logger (only the last word is seen). The responses given in these trials are seen.

Please help.

Comments

  • Hi,

    Could you provide us with some more information? How did you define the variables that you don't see in the logger item?

    My first guess is that you gave all the words the same identifier name (e.g. 'word'). As a consequence, the value of this variable is continuously being overwritten by the next 'word' and only the value of the last one (which is not overwritten) appears in the logger item.

    Perhaps you could upload your experimental script, such that we can have a closer look at it. You can do this by executing the following steps:

    • Open the "General properties" tab, click "Script editor" and copy the whole script,
    • go to pastebin.com or gist.github.com, upload your script there (simply paste and submit)
    • and provide us with the resulting link in your forum post.

    Best,

    Lotje

  • edited 1:07AM

    Hi,

    Here is the link to my script(experiment)--
    http://pastebin.com/4EKAMiEa
    I have not made any changes in the above script.
    I tried changing the name of the variable in each loop and accordingly I changed the variable name in the sketchpad however, changing the variable name in one sketchpad changes the variable name in all the sketchpads.

  • Hi,

    If you want to log all the variables that are used in a given loop, you have to place a logger item at the end of the sequence that this loop is iterating over. In your case, this means that you should append the existing logger item at the end of the sequence containing the sketchpad item showing the words.

    image

    I hope this helps!
    Please let us know if you have any further questions.

    Best wishes,

    Lotje

  • edited 1:07AM

    Hello,

    I did as you said. I added a logger in the sequence under every loop. Although now, the words (stimulus) are seen but there are repetitions of the last word of every trial. Also the responses that are given to these stimuli is shown 5 times (which should actually be shown only once) under different columns and not getting displayed across their respective stimulus words in the spreadsheet.

    I have mentioned the link to my logger data. It is on column 'CV' Kindly do let me know what can be done about it.
    http://www.filedropper.com/loggerdata_1

  • Hi,

    Every time the logger item is executed, a new row is created in your output file. So:

    image

    I guess what you're looking for is a column header containing all the words presented on a given memory task in a single cell (such that one row corresponds to one memory task. To achieve this, you can do the following:

    Append a couple of inline_script items to your experimental overview like so:

    image

    And paste (something like) the following code into them (see comments for more explanations):

    1. define_list_variable:

    Place the following code in the Prepare phase tab:

    # Create an empty list in which we will save
    # the words presented on a given memory task 
    # later on in the experiment:
    word_list = []
    
    # And make the list global so that we can
    # use it in subsequent inline_script items
    # as well:
    global word_list
    

    2. make_word_list:

    Place the following code in the Prepare phase tab:

    # Here, we're going to save all the words presented on 
    # a given memory task in one list.
    
    # Determine the word that will be shown by the sketchpad item
    # by using the built-in experiment function self.get()
    # More info:
    # http://osdoc.cogsci.nl/python-inline-code/experiment-functions/#experiment.get
    
    word = self.get('Stimulus')
    
    # Add the current stimulus to the word)_list by using the 
    # append() function:
    word_list.append(word)
    
    # Make the list a bit 'prettier' such that the words
    # are comma seperated (just like your response variable):
    pretty_list = ",".join(word_list)
    
    # Set the list such that the list becomes available in the
    # GUI items (notably the logger item) by using the built-in
    # experiment function exp.set():
    # More info:
    # http://osdoc.cogsci.nl/python-inline-code/experiment-functions/#experiment.set
    exp.set("word_list", pretty_list)
    

    3. reset_list:

    Place the following code in the Run phase tab (because resetting the list during the preparation phase of the experiment is too early):

    # Make sure the list is empty before the next memory task
    # starts (otherwise the words in the list will accumulate
    # until the list contains all the words presented in your experiment):
    word_list = []
    

    After applying the above steps, you will find the variable of interest in the colum 'word_list' in your logger item.

    image

    Note that since you made a new sequence item for every word loop, you will have to append the existing make_word_list inline_script item to every word sequence separately.
    Also, you have to append the reset_list item after every logger manually, to get the desired result.

    Does this make sense?

    I uploaded a new variable of your experiment here:

    Does this help?

    Best wishes,

    Lotje

  • edited 1:07AM

    Hi,

    Thank you very very much for the help. It is currently running fine. :)

    I wanted to ask that, since my experiment requires counterbalancing the conditions, I have done it manually. Now, if I want to know what are the other ways in which I can present my conditions, do I need to do that manually? Is there any other method to do the same?

  • edited 1:07AM

    There's a section on counterbalancing, which you can find here:

    Chris Longmore also created a very informative video tutorial in which he explains a couple of ways to implement counterbalancing, for simple as well as more complex paradigms:

    [youtube:zP8ucRtWU5g]

    Hope this helps!

  • edited September 2013

    Thanks for the video.

    When I change the text in any one of the text_display it changes the script in some of the text_display while some are unchanged. Why is this happening? The text_display is outside the loop.
    Please help as soon as possible.

    Regards,
    dv_r

  • edited September 2013

    Hi,

    When appending a sketchad item to the sequences within your loops, you have chosen 'append existing item'. That means that the newly-appended item is a copy of an already-existing one. Thus, if you change something in this sketchpad, it will change all of its copies as well.

    If you want to use a new sketchpad for a new sequence, choose 'append new item'.

    Good luck!

    Lotje

Sign In or Register to comment.