A way to export button press data using scripts without terminating stimulus?

ben robinson baltimore.ben at gmail.com
Wed Mar 25 15:23:16 UTC 2009


your last option, though a little messy, is the only way to go, i think.

>>- have the stimulus terminate upon response and go to the logging
script, then reappear for the remainder of the unused time, and same
for the blank screen afterward. I am attempting this solution, but it
is quite messy and round-about because the response may occur during
the stimulus presentation or during a blank screen.

here's how i would consider doing it:
first, plan to have the SlideObject, or whatever is presenting your stim
have a Duration of 0, but a response window as long as you'd like to be
collecting responses.
set up a variable to record the time (Clock.Read) in an Inline immediately
preceding your SlideObject with 0 ms duration.
then in an Inline immediately following your SlideObject, have a loop.
something like this:
Do
   If SlideObject.RT>0 And NotYetSignaledMatlab=TRUE Then
      send your event code to matlab
      NotYetSignaledMatlab=FALSE
   End If
Loop Until (Clock.Read - yourTimeVariable) > yourStimDuration
clear the screen then
Do
Loop Until (Clock.Read - yourTimeVariable) > (yourStimDuration +
yourBlankScreenDuration)

hope that helps.

ben

On Tue, Mar 24, 2009 at 2:36 PM, Emz <emzcoffey at gmail.com> wrote:

>
> Dear E-Prime people,
>
> I would like to know if E-Prime has some capability to run a script at
> any time during a task upon button press without interrupting its user-
> end activities.
>
> The problem in more detail is as follows:
>
> I am using a variant of the N-back task and would like to precisely
> log when the user presses one of the two response buttons. I know this
> is easy to do using E-Prime's logging functions; however, I am
> exporting data in real time to a MatLab matrix in another computer
> which is necessary for my experimental set-up. The data transfer is
> accomplished through a few lines of script, which I have inserted in
> appropriate places in the E-Prime code to mark events of interest.
> This works nicely, except for subject responses since the stimulus
> needs to be shown for a fixed length of time.
>
> I have considered a few possible solutions, but none seem very good:
> - have the stimulus terminate upon response and go to the logging
> script; however, this affects the task in undesirable ways
> - use script to collect and output the E-Prime reaction time, correct
> response info, etc. after the trial finishes. This means the reaction
> time data will be desynchronized with the rest of the data file and
> will require additional calculations to identify where in the data
> file the button press took place. I am concerned this will introduce
> error as there are already several data files with different sampling
> rates to be aligned post-experiment.
> - have the stimulus terminate upon response and go to the logging
> script, then reappear for the remainder of the unused time, and same
> for the blank screen afterward. I am attempting this solution, but it
> is quite messy and round-about because the response may occur during
> the stimulus presentation or during a blank screen.
>
> Ideally, I would just need a way to execute the send script during the
> stimulus presentation when the subject responds, without terminating
> the activity. Any ideas if this is even possible?
>
> Pointers / help function references, etc. all welcome,
>
>
> EC
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20090325/57d919c5/attachment.htm>


More information about the Eprime mailing list