Turn Time Audit on For Everything

46 views
Skip to first unread message

kyleheid...@u.northwestern.edu

unread,
Aug 7, 2013, 10:30:33 AM8/7/13
to e-p...@googlegroups.com
Hi
I'm new to e-basic, so I don't know if this is possible, but is there some way to write an inline file that will turn Time Audit on for everything (I'm doing an fMRI study, so it's very important to track all the timing information).

I looked through the generate code and found what appears to be the code that turns on time audit for an individual object (in this case a TextDisplay called PreBlockInstructions)

PreBlockInstructions.Run

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetDelay, PreBlockInstructions.OnsetDelay

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetTime, PreBlockInstructions.OnsetTime

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameDurationError, PreBlockInstructions.DurationError

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetToOnsetTime, PreBlockInstructions.OnsetToOnsetTime


I would like to make an inline that iterates over every declared variable of the TextDisplay type and call code similar to the above on each of those TextDisplays.

Is this possible/feasible?

David McFarlane

unread,
Aug 8, 2013, 2:17:21 PM8/8/13
to e-p...@googlegroups.com
Well, if you are really determined, then you might use
Rte.GetObject() to iterate through all the E-Objects and do as you
like (see that topic in the E-Basic Help facility).

But this seems a very peculiar request. Ordinarily, you would take
care of this in E-Studio from the Property Pages of each object of
interest -- either go to the Duration/Input tab and select the
desired Data Logging, or for finer granularity go to the Logging tab
and select whatever you like.

-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
take any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they
strive to respond to all requests in 24-48 hours, so make full use of
it. 3) In addition, PST offers several instructional videos on their
YouTube channel (http://www.youtube.com/user/PSTNET ). 4) If you do
get an answer from PST staff, please extend the courtesy of posting
their reply back here for the sake of others.
\----

Paul Groot

unread,
Aug 8, 2013, 3:52:22 PM8/8/13
to e-p...@googlegroups.com
In addition to David's advise, I would also suggest adding a few lines of E-Basic script to calculate stimulus (and response) onset times that are relative to the start of the start of the MRI scanner. These values can then be added to the output file using the c.SetAttrib method. This is a very easy to do and it will save a lot of post processing. (I've seen people creating lots of excel sheets just to get onset times for SPM or FSL. Very time consuming and error-prone.)

Just follow these steps:

1) Declare a global variable to store the scanner start time (i.e. onset time of first EPI scan). This time is normally determined by handling the trigger onset pulse as input response. The global variable should be of type Long (integer) and should be placed in the global user script section:

   Dim ScannerOnset as Long

2) Then copy the trigger onset time to the global declared variable by adding the following after the object that handles the scanner trigger:

   ScannerOnset = WaitForScanner.RTTime

(replace WaitForScanner with the name the actual object)
Also make sure the RTTime attribute itself is logged properly to be able to verify timing.

3) Add a few lines of script at the end of the trial procedure to save the relative times to the log output:

   c.SetAttrib "RelStimOnset", CStr(Stim.OnsetTime - ScannerOnset)

(replace Stim with the name of the stimulus object)
Also make sure the onset attribute itself is logged properly to be able to verify timing.

Repeat 3) for all relevant onset and response times.


that's it

Paul


On 8 August 2013 20:17, David McFarlane <mcfa...@msu.edu> wrote:
Well, if you are really determined, then you might use Rte.GetObject() to iterate through all the E-Objects and do as you like (see that topic in the E-Basic Help facility).

But this seems a very peculiar request.  Ordinarily, you would take care of this in E-Studio from the Property Pages of each object of interest -- either go to the Duration/Input tab and select the desired Data Logging, or for finer granularity go to the Logging tab and select whatever you like.

-----
David McFarlane
E-Prime training online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff take any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours, so make full use of it.  3) In addition, PST offers several instructional videos on their YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do get an answer from PST staff, please extend the courtesy of posting their reply back here for the sake of others.
\----


At 8/7/2013 10:30 AM Wednesday, kyleheidtman2012@u.northwestern.edu wrote:
I'm new to e-basic, so I don't know if this is possible, but is there some way to write an inline file that will turn Time Audit on for everything (I'm doing an fMRI study, so it's very important to track all the timing information).

I looked through the generate code and found what appears to be the code that turns on time audit for an individual object (in this case a TextDisplay called PreBlockInstructions)

PreBlockInstructions.Run

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetDelay, PreBlockInstructions.OnsetDelay

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetTime, PreBlockInstructions.OnsetTime

      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameDurationError, PreBlockInstructions.DurationError
      c.SetAttrib PreBlockInstructions.Name & ebDot & ebLogNameOnsetToOnsetTime, PreBlockInstructions.OnsetToOnsetTime


I would like to make an inline that iterates over every declared variable of the TextDisplay type and call code similar to the above on each of those TextDisplays.

Is this possible/feasible?

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/5203e0d2.060b320a.7694.6932SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.



kyleheid...@u.northwestern.edu

unread,
Aug 12, 2013, 9:04:28 AM8/12/13
to e-p...@googlegroups.com
Great.  Thanks a lot for your help
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages