• Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame
Menu

Andy's Brain Blog

Street Address
City, State, Zip
Phone Number
fMRI, Neuroimaging, and More

fmri, neuroimaging, and more

Andy's Brain Blog

  • Blog
  • About
  • Publications
  • Videos
  • Workshops
  • CV
  • Contact Me
  • Hall of Fame

E-Prime Tutorial #11: Making Your Experiment Scanner-Compatible

June 23, 2017 Andrew Jahn

This tutorial uses many of the concepts you've learned so far about E-Prime: Objects, attributes, E-Basic code, and more. It is a summary of everything we've done in the previous tutorials and also applies your learning to something you may do for your research: Creating a scanner-compatible E-Prime experiment.

When a scanner starts acquiring fMRI images, it sends a pulse through a cable that is plugged into the computer running E-Prime. (The setup for this varies between laboratories - for example, you may need to bring your own laptop to the control room and plug in the cable yourself - so you'll need to ask what the procedure is where you work.) It is becoming more common for scanners to run a few "dummy" scans before sending the pulse. During these dummy acquisitions no data is collected. Make sure to ask your scanner technician whether these dummy scans are part of your sequence; if they aren't, you may need to discard the first few images during your analysis. 

The first step is to synchronize the pulse with the onset of your experiment. The pulse is typically a number (such as "5") or a special keyboard character (such as the backtick, " ` ", found in the upper left corner of the keyboard). We can create an object that listens for this special character, and which executes a block of InLine code to timestamp when the pulse was sent.

Synchronizing E-Prime and the Scanner pulse. In this example a TextSlide object called WaitScanner terminates when it receives the number "5" (Duration/Input tab not shown). An InLine object after the WaitScanner object assigns the value of the RTTime attribute into the variable StartTimestamp.

Another feature of many fMRI experiments is "Jitter", or variable duration between trials. Adding jitter to experiments with conditions that are relatively close to each other (e.g., less than 10-15 seconds apart) allows the independent estimation of the hemodynamic response to each condition. We can add this by creating a nested List object called JitterList. This is created through the Nested attribute in a List, and Lists can be nested recursively (e.g., nested Lists can contain nested Lists, with no theoretical upper limit).

Note that the variable "StartTimestamp" will need to be declared in the User script.

Another useful option is to add InLine objects that output the timing information into a text file as the experiment runs. This is easier to manage than sifting through the edat files and trying to reconstruct the timing manually.

And that's it! If you're new to E-Prime, these tutorials should give you the foundation you need to begin creating your own experiments and adapting them to fMRI scanners. Remember that the best way to learn it is to do it: Following along with these tutorials is a good start, and you'll gain an even deeper understanding if you use the same framework to create a new experiment for your own study. Search the Internet for other example experiments, change different settings, and observe what happens. The more you use it, the more fluent you will become.

← High-Pass Filtering and the Nyquist FrequencyE-Prime Tutorial #10: E-Merge and E-DataAid →
Archive
  • September 2024
  • June 2024
  • March 2024
  • January 2024
  • June 2023
  • May 2023
  • April 2023
  • February 2022
  • January 2022
  • January 2021
  • December 2020
  • April 2020
  • December 2018
  • April 2018
  • January 2018
  • December 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • November 2016
  • August 2016
  • July 2016
  • February 2016
  • January 2016
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • April 2012
  • March 2012

What's on Andy's Brain this month?

Connect with Andy!

Powered by Squarespace