[open] Logging problems/inline script issues
We've enjoyed using you're open source programme, it works great!
However, we've encountered a little problem with logging our keyboard response. Our goal is by pressing a 'j' or 'n' to record if the participant does or does not see an image. We use a loop function with a sequence, wherein the image is followed by an inline script and a logger. We've first used a keyboard response function, but in this function there was no response on when somebody pressed j or n. Next, we used an inline script, found on the webpage, but here all the logging information said "NA". We used this script:
from openexp.keyboard import keyboard my_keyboard = keyboard(exp, keylist=['j', 'n'], timeout="0") start_time = self.time() key, end_time = my_keyboard.get_key() self.experiment.set('response', key) self.experiment.set('response_time', end_time - start_time)
What we want, is for Open Sesame to record when the participant sees the image (i.e. at what time in the sequence the participant presses 'j'), and to record when the participant presses 'j' and stops recording when he stops pressing the button, so we can log for how long the participant sees the image.
Susan, Marjolein, Anouk, Tim