Trigger, count images => change stimulus?

Hello,

I've the following problem. I want to make several measurements at Siemens scanner.
I use different EPI-sequences consecutively (automatically).

In the different EPI-sequences I would display a different visual stimulus.

1) EPI 1: FMRI Stimulus 1
2) EPI 2: FMRI Stimulus 2
3) EPI 1: FMRI Stimulus 1
4) EPI 2: FMRI Stimulus 2
and so one...

As the measurement time after for --for example-- EPI1 seems to vary between 46 and 48 seconds
(only a manual measurement with a watch, but the end of the psychtoolbox-script [the presented stimulus]
and the measurement of the scanner doesn't seem to be the same)

Furthermore the shimming time seems also to vary, therefore a fixed time value seems not so appropriate.

My new idea is to use the trigger to end the presentation of "Stimulus 1" and wait for the next
trigger/starting trigger of EPI 2.

My first step was to count how often I type 6 (the trigger pulse is the key 6). I only type
5 times '6' but the counter goes to 23... (my numer_images was 24)

----

while (count_bild < number_images)

if KbCheck(KbName('6'))
count_image=count_image + 1 ;
['Count_' int2str(count_image)]
end

end

---

Does anyone have the same problem, or already solved it? At which part of the documentation should I closer look?


Thanks

Andi
KbStrokeWait would have worked here.

KbTriggerWait, maybe followed by a KbReleaseWait to avoid counting the same trigger multiple times, would also work and provide higher robustness against misdesigned or misconfigured trigger hardware on scanners. KbTriggerWait is made to wait for fast scanner keyboard triggers.

-mario

--- In psychtoolbox@yahoogroups.com, "Diederick C. Niehorster" <dcnieho@...> wrote:
>
> Dont use KbCheck, it'll report that the key is down as long as it is down,
> which will be for multiple frames. See help KbCheck and check out the other
> functions it mentions to see which suits you best.
>
> Best,
> Dee
>
> On Wed, Oct 19, 2011 at 17:31, <_andi__@...> wrote:
>
> > **
> >
> >
> > Hello,
> >
> > I've the following problem. I want to make several measurements at Siemens
> > scanner.
> > I use different EPI-sequences consecutively (automatically).
> >
> > In the different EPI-sequences I would display a different visual stimulus.
> >
> >
> > 1) EPI 1: FMRI Stimulus 1
> > 2) EPI 2: FMRI Stimulus 2
> > 3) EPI 1: FMRI Stimulus 1
> > 4) EPI 2: FMRI Stimulus 2
> > and so one...
> >
> > As the measurement time after for --for example-- EPI1 seems to vary
> > between 46 and 48 seconds
> > (only a manual measurement with a watch, but the end of the
> > psychtoolbox-script [the presented stimulus]
> > and the measurement of the scanner doesn't seem to be the same)
> >
> > Furthermore the shimming time seems also to vary, therefore a fixed time
> > value seems not so appropriate.
> >
> > My new idea is to use the trigger to end the presentation of "Stimulus 1"
> > and wait for the next
> > trigger/starting trigger of EPI 2.
> >
> > My first step was to count how often I type 6 (the trigger pulse is the key
> > 6). I only type
> > 5 times '6' but the counter goes to 23... (my numer_images was 24)
> >
> > ----
> >
> > while (count_bild < number_images)
> >
> > if KbCheck(KbName('6'))
> > count_image=count_image + 1 ;
> > ['Count_' int2str(count_image)]
> > end
> >
> > end
> >
> > ---
> >
> > Does anyone have the same problem, or already solved it? At which part of
> > the documentation should I closer look?
> >
> > Thanks
> >
> > Andi
> >
> >
>