Script for redoing a trial up to 16 times or untill response

David McFarlane mcfarla9 at msu.edu
Tue Jan 5 16:00:55 UTC 2010


Ariana/Mbecs,

Your message found me just as I got hit with the 
double-whammy of the holidays and a major 
project, and by now you have either found your 
own solution or moved on to something else, but I 
will attempt a reply now anyway.

You bring up three issues:

(1) how to have every response logged when 
responses are allowed at any time during the PresentationList loop

(2) allowing a response at any time during the PresentationList loop

(3) what TrialT0 refers to

As to (1), the original problem as posed by Julia 
Gómez (see 
http://groups.google.com/group/e-prime/browse_thread/thread/5e712b8b726ea0de 
) took only one response during the 
PresentationList loop, and then exited the 
loop.  So you are asking for something rather 
different here, and I would need more details before I could answer.

As to (3), TrialT0 is just a variable that holds 
the start time of the trial (i.e., the 
PresentationList loop).  I suppose most folks 
would name it something more like TrialStartTime, 
but I have a background in physics and math so 
something like t0 (that's "t-zero") seems a more 
natural symbol for an intiial time.

Finally, issue (2) seems to strike more at what I 
promised to explain if asked, so I will belabor 
this a bit and propose two approaches.

First, one could simply use Extended Input (see 
Appendix C of the User's Guide that came with 
E-Prime) with StimArray in the example.  I.e., 
set the Time Limit of StimArray to (infinite), 
and then the subject can enter a response at any 
time during the loop.  Everything else would work without change.

Second, one could instead use Extended Input with 
a Wait object before PresentationList.  Now the structure would look like

TrialRespWait
PresentationList
     PresentationProc
         StimArray
         BlankScreen
         TrialFinishScript

TrialRespWait is a Wait object with Duration = 0 
and an Input Mask with Time Limit = 
(infinite).  One would then remove the Input Mask 
from StimArray.  Finally, TrialFinishScript would 
be modified to refer to TrialRespWait, thus,

If TrialRespWait.RT Then PresentationList.Terminate

or one of the other forms for detecting a 
response in script (also see 
http://groups.google.com/group/e-prime/browse_thread/thread/f565dc7d0d507a3 
for how to terminate any running List without 
knowing the List name, which coincidentally I also answered for you :) ).

Now the subject can respond at any time during 
the PresentationList loop, the response will go 
to the TrialRespWait object, and if TrialRespWait 
has End Action set to Terminate then the response 
will terminate either StimArray or 
BlankScreen.  Note that we no longer need 
RTStartScript and RTFinishScript, since 
TrialRespWait.RT automatically has the desired 
RT.  (In general, Wait objects are not so much 
useful for "waiting" as they are for introducing silent/invisible Input Masks.)

Note that for both of these approaches, if a 
response comes in during StimArray then the loop 
will still complete the BlankScreen.  If one 
wanted to skip the BlankScreen then one might use 
an End Action of Jump in the first approach, or 
would have to add a bit more script for the second approach.

Regards,
-- David McFarlane, Professional Faultfinder


At 11/20/2009 11:19 AM Friday, Ariana Rubin and Mbecs wrote:
>Hi David,
>
>I would love to know how to have every response logged when responses
>are allowed at any time during the PresentationList loop.  I have been
>working on a project similar to this one, and this is my last holdup.
>I am very new to EPrime and scripting, and was also wondering in this
>example what TrialT0 refers to.
>
>Thank you so much in advance!
>-AR
>-Mbecs
>
>
>On Apr 28 2008, 1:51 pm, David McFarlane <mcfar... at msu.edu> wrote:
> > Julia,
> >
> > >(1) Measuring RT from the first display.
> >
> > >As I as previously explained, I present a visual array of stimuli
> > >followed by a blank screen upto 16 times or until response
> > >(stimArray+Blank, stimArray+Blank, and so on). The RT measure I get
> > >is just from the last stimArray+Blank ( the one you respond to,
> > >instead of being from the first one). I would like to have a measure
> > >of the RT from the first display until response (whether is one or
> > >16 displays). Is there a way to do this?
> >
> > There are several ways to do this.  Here is one, for example.  You
> > will have to add some script to the start and end of your
> > PresentationList, so the structure might now look like this:
> >
> > RTStartScript
> > PresentationList
> >      PresentationProc
> >          StimArray
> >          BlankScreen
> >          TrialFinishScript
> > RTFinishScript
> >
> > RTStartScript contains script like this:
> > Dim TrialT0 as Long
> > TrialT0 = Clock.Read
> >
> > RTFinishScript contains script like this:
> > StimArray.RT = StimArray.RTTime - TrialT0
> >
> > This assumes that you want to allow a response only during the
> > presentation of each StimArray.  If you want to allow a response any
> > time during the PresentationList loop, there are other techniques,
> > which I could explain if asked.
> >
> > Once again, for more information you can look at the Clock Object and
> > InputMask Object topics in the online E-Basic help.
> >
> > I do not have an answer for your second request, I will leave that to
> > others more talented than me.
> >
> > -- David McFarlane, Professional Faultfinder

--

You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list