Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Delay between trials in sequence

Dear all,

I'm currently working on my first experiment (SC-IAT) with OpenSesame (PsychoPy backend) and need some help with timing issues.

The experiment consists of 3 block loops, each containing a sequence with stimuli presenting trials. Subjects have to react by pressing certain keys in response to the stimulus. The process is running quite smoothly (adopted it from the beginners tutorial). Just the ITI is causing some trouble.
I inserted a sketchpad with a delay of 245ms (to get 250ms) at the beginning of the sequence. This is working quite precisely. Analysis of the test data delivers averages of 250-254ms.
However, there is a rather long delay between the last item in the sequence (logger) and the onset of the ITI sketchpad item of the next trial. Unfortunately this is highly variable (500-1000ms), i.e. I can not take this delay into account in the ITI item.

Any idea if/how I can fix this?
Thanks in advance
Thorsten

Comments

  • eduardeduard Posts: 1,001

    Hi Thorsten,

    Have a look at the first few paragraphs of the documentation. There the reasons for your delay is explained. In short, Opensesame assumes everything within a sequence is time-critical and tries to minimize the delay between items in it (which is why your sketchpad works nicely). However, between sequences (including separates iterations of the same sequence, there is always some unpredictable delay. The amount of it, might vary across back-end you use, but it is nothing you can avoid entirely.

    There are a few ways to circumvent these issues. For example, if you have a fixation period in the beginning of your trial, you can set its duration dynamically, so that it already incorporates preparation time. For example, if you want a fixation dot for 1 second, you could set its duration to 1000-[prep_time]. Of course for that you need prep_time to be defined and represent the actual preparation time (the time after the previous stimulus appeared on screen, until the moment the current fixation dot should appear).
    For that to work, you probably have to do some inline-scripting.

    Alternatively, you can decide to make your entire sequencein python code, that gives you much more flexibility when it comes to timing, but requires more work.

    Does that make sense? Let us know if you need more help.

    Eduard

    Thanked by 1Thorsten
  • ThorstenThorsten Posts: 2

    Hi Eduard,

    thanks for your explanations (and sorry for my late answer). I think I understood the mechanism behind it.
    Unfortunately, as I have absolutely no clue about scripting I'm kind of stuck at this point.
    If I got it right, for the first alternative the code is used to define the prep_time variable, right? Would this be a rather big effort, or can I do this as a noob with some hits.

    One more questions about timing: This would only work if the prep_time doesn't exceed the interval itself, correct? I need an ITI of 250/300ms, but the delay is much more than this.

    Thanks again
    Thorsten

  • eduardeduard Posts: 1,001

    Hi Thorsten,

    Yes, you are absolutely right. If the delay is bigger than the desired ITI, you can't have a dynamic prep time.
    So probably, you will have to prepare your trials in advance (moving all preparations into an earlier sequence and just index which of the trials to run at a given point. Depending on your stimuli, this might be a little memory heavy though. And also here, you would have to do some inline_coding (store your stimuli for all trials in a list).

    If you upload your experiment, I can maybe show you a little example of how to do it.

    Eduard

Sign In or Register to comment.