[solved] Logging responses with logger
Hello - My trials consist of: sampler ("hear_cons" present a sound) + sketchpad ("view_cons" present the choices) + text_input ("input_cons" participant inputs choice) + sketchpad ("rate_cons" present the 1-5 rating scale) + logger
Basically, the participants are hearing sounds, identifying them, and then rating how good they were. I want to collect (1) the participants' input from input_cons and also (2) the key (1 through 5) they pressed to advance from the rate_cons step. When I open up the logger, I expect to see a "response" variable available for view_cons, input_cons, and rate_cons. Instead, I see one line that says "response", and as the source it lists "hear_cons; input_cons". I thought maybe OpenSesame cannot log the keypress used to advance a sketchpad, and that's why view_cons and rate_cons are not available as sources (if this is indeed the case, please let me know).
However, when I actually run the experiment and I look at the logger output, I get response data *only* for rate_cons. That is, for each trial the participant enters a letter for input_cons and presses a number for rate_cons, but only the number is recorded, *even though* rate_cons is not listed as a source of "response" in logger.
So, I am happy that it logs the keypress from rate_cons even though I didn't expect it to, but I am unhappy it does not log the text input from input_cons (which I did expect it to). Can someone help me understand this? What might I be doing wrong? Thanks!
Basically, the participants are hearing sounds, identifying them, and then rating how good they were. I want to collect (1) the participants' input from input_cons and also (2) the key (1 through 5) they pressed to advance from the rate_cons step. When I open up the logger, I expect to see a "response" variable available for view_cons, input_cons, and rate_cons. Instead, I see one line that says "response", and as the source it lists "hear_cons; input_cons". I thought maybe OpenSesame cannot log the keypress used to advance a sketchpad, and that's why view_cons and rate_cons are not available as sources (if this is indeed the case, please let me know).
However, when I actually run the experiment and I look at the logger output, I get response data *only* for rate_cons. That is, for each trial the participant enters a letter for input_cons and presses a number for rate_cons, but only the number is recorded, *even though* rate_cons is not listed as a source of "response" in logger.
So, I am happy that it logs the keypress from rate_cons even though I didn't expect it to, but I am unhappy it does not log the text input from input_cons (which I did expect it to). Can someone help me understand this? What might I be doing wrong? Thanks!
Comments
Hi Jjholiday,
Thank you for your interest in OpenSesame and welcome to the forum!
Your not doing anything wrong, really. What you're describing is know and inconvenient behavior of OpenSesame (issue fixed for 0.25), but luckily it's easily overcome.
Basically, all key presses (regardless of whether its during a sketchpad, keyboard_response, or whatever) are stored in the same response variables ('response', 'response_time' and 'correct'). So, in your case, the response during 'rate_cons' overwrites the response during 'input_cons'.
What you can do to resolve this is insert an inline_script somewhere after 'input_cons' and before 'rate_cons' in which the response variables are copied to new variables (so they don't get overwritten). Something like this will do the trick:
self.experiment.set("response_input_cons", self.get("response"))
self.experiment.set("response_time_input_cons", self.get("response_time"))
self.experiment.set("correct_input_cons", self.get("correct"))
Does this make sense? Hope this helps!
Kindest regards,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Perfect! Thank you!
Hi Sebastiaan:
Something similar happened to me. I am using a loop of 10 trials and in every trial I’m presenting 3 stimuli: A sound with its corresponding rating on valence and activation (each one with its correspondent key-response ¬–I’m not using response times by now); A picture that should be rated in both variables as well; And a clip that should be rated as well.
So the sequence goes like this:
Sound 1; rate valence 1; rate activation 1; Pic 1 rate valence 1; rate activation 1; Clip 1; rate valence 1; rate activation 1
…
Sound 10; rate valence 10; rate activation 10; Pic 10 rate valence 10; rate activation 10; Clip 10; rate valence 10; rate activation 10
When I open the log file I only get the ratings for each variable (valence and activation) but only for the 10 clip trials.
What can I do? Is something similar to what you already answered to Jjholiday?
Thanks in advance.
Raúl
Hi Raúl,
Have you tried using the exact same solution? This should do the trick.
Good luck!