fMRI Eprime task, flag e-object scripting/ fixation screen help!

44 views
Skip to first unread message

Irina Orlovsky

unread,
Aug 25, 2021, 1:36:38 PM8/25/21
to E-Prime

Hi yall!

Im running into a programming doozy on E-prime 3. I am programming an fMRI paradigm where participants will view stimuli and make a number of ratings while in the scanner. Consistent timing across trials is critical (which we set to a 4 second rating duration). 

I am wondering - am I able to create a rating slide where:
if the participant is presented with the rating screen and makes a rating in less than 4 seconds, the screen changes to a fixation for the remainder of that slide duration? Meaning, if the participant didnt use up the entire slide duration to make their rating, it would essentially give the participant an idea that they made a response and are waiting for the next slide.

From my sleuthing, Ive noticed that I may use a "flag" rather than the feedback e-object, or maybe use slide state...or both, ha? Perhaps I would need an inline script that would prompt the fixation with an if/than logic

ie. if rating duration <4000, go to [fixation slide/slide state 2(?)] - my issue with this is how to assign the timing in the inline correctly, as well ([rating duration - RatinSlide.RT]). 

any thoughts or scripting skeletons on how to resolve would be a huge help! many thanks -


Irina

    David McFarlane

    unread,
    Sep 17, 2021, 10:51:32 AM9/17/21
    to e-p...@googlegroups.com
    Irina,

    You may find a previous discussion about this type of issue at
    groups.google.com/d/topic/e-prime/ezQHrM4VIfQ . Your situation
    introduces a bit of a twist, so I will present a fresh discussion here.

    First, generally for fMRI you should use Cumulative timing mode (instead
    of Event timing mode) for all of your E-Objects.

    Now, you could set up your Procedure something like this:
    - RatingSlide (PreRelease = 0, not explained in earlier thread)
    - PostRatingCode (see below)
    - FixationSlide (Duration = same as RatingSlide)
    - PostFixationSlide

    The PostRatingCode involves some sleight of hand:
    SetNextTargetOnsetTime RatingSlide.TargetOnsetTime

    Here is how this works: Cumulative timing mode means that
    nextObject.TargetOnsetTime =
    currentObject.TargetOnsetTime + currentObject.Duration

    In your case, PostRatingCode would provide the result that
    PostFixationSlide.TargetOnsetTime
    = FixationSlide.TargetOnsetTime + FixationSlide.Duration
    = RatingSlide.TargetOnsetTime + RatingSlide.Duration

    no matter when the response to RatingSlide comes, which is just what we
    want. In fact you may check this by setting both RatingSlide and
    PostFixationSlide to log their TargetOnsetTime values and then looking
    at the relationship.


    So far so good. But in your case we still have one minor hiccup which
    did not occur with the previous thread: FixationSlide will still appear
    for at least one frame duration even when the subject gives no response.
    To fix that we have to add a Label to the Procedure and slightly
    modify our code, as follows ...

    Procedure:
    - RatingSlide
    - PostRatingCode
    - FixationSlide
    - PostFixationLabel
    - PostFixationSlide

    PostRatingCode:
    If (Clock.Read >= (RatingSlide.TargetOnsetTime +
    RatingSlide.Duration)) Then
    GoTo PostFixationLabel
    Else
    SetNextTargetOnsetTime RatingSlide.TargetOnsetTime
    End If

    That should take care of it.

    -- David McFarlane
    Reply all
    Reply to author
    Forward
    0 new messages