Howdy, Stranger!

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

Supported by

Response logging in series of co-routines - first trial not being logged

Hi all!

My colleague and I ran an experiment that used a word-monitoring task that we built in Open Sesame. In the word monitoring task, participants are presented with a series of words in audio form and have to press the spacebar each time they hear a "target" word. Each trial consists of 16 sequentially presented words.

The way we went about implementing this in OS was to use a series of coroutines with a sampler, keyboard response, and logger in each so that participants can respond and have their responses collected during the presentation of the stimulus. There are a series of 16 of these coroutines in a trial. The issue we are encountering, which may not be an issue at all but may actually be something endemic to how OS works, is that the recording of a response seems to occur in the row of the logfile after the stimulus during which the person responded. Thus, the participants responses are essentially shifted down one row in the logfile.

I have attached an output logfile from one of our participants so you can see this, the first row has a response of "NA" for every participant. I've also attached our OS experiment.

Any thoughts or ideas as to why this occurs, we would totally appreciate!


  • Hi,

    I am not very familiar with Co-routines, so what I say might not make sense. Generally, every row in the logfile represents the values of all logged variables at the time the logger was called. So normally, there shouldn't be any shifts. From looking at your co-routines it seems that the logger is called at the same time as all other items in your co-routine. The logger call is a somewhat different item that the other ones, in that it basically executes instantly and is that ready. So, the way I read it, at the begin of a co-routine the logger activates writes the current variables (which do not exist mostly), and closes down. Then, after the first responses have been recorded, the variables began to have a value and in the following iterations the values do appear in the log file, but carrying the information of previous trials. A way to fix this, might be to call the logger as last thing in the co-routine, or right after it.

    Does that make sense?


Sign In or Register to comment.