User Tools

Site Tools


optseq2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
optseq2 [2014/07/24 13:14]
eric removed
optseq2 [2014/10/03 13:05] (current)
eric created
Line 1: Line 1:
 ====== Why Simulate? ====== ====== Why Simulate? ======
  
-In event-related fMRI, it is often beneficial to capture data showcasing different parts of the hemodynamic response function (HRF) within each condition. However, it is extremely inefficient (in terms of both time and finance) to simply allow the HRF to return to baseline after every stimulus. Therefore, in order to capture as much of the HRF as possible without wasting time, researchers incorporate a technique called //​jittering//​ in experimental design to include controlled variance in interstimulus intervals (ISIs). With the necessary assumption of linear additivity, co-occurring HRs can be //​deconvolved//​ using what we learn about the shape of the function from capturing these different points of the HRF.+In event-related fMRI, it is often beneficial to capture data showcasing different parts of the hemodynamic response function (HRF) within each condition. However, it is extremely inefficient (in terms of both time and finance) to simply allow the HRF to return to baseline after every stimulus. Therefore, in order to capture as much of the HRF as possible without wasting ​valuable scanner ​time, researchers incorporate a technique called //​jittering//​ in experimental design to include controlled variance in interstimulus intervals (ISIs). With the necessary assumption of linear additivity, co-occurring HRs can be //​deconvolved//​ using what we learn about the shape of the function from capturing these different points of the HRF.
  
-It goes without saying that different patterns of jittering will result in different portions of the HRF being captured, so there exist both efficient and inefficient patterns. Testing each pattern you develop on a real participant and evaluating the results is simply not an option. This is where fMRI simulation comes into play. It's possible to do yourself with a bit of MATLAB/​Python code, or with some programs put out by the AFNI group at the NIH (detailed on the CogNeuroStats Blog [[http://​blog.cogneurostats.com/?​p=334|here]]),​ or with OptSeq2, a simulation program developed at MGH.+It goes without saying that different patterns of jittering will result in different portions of the HRF being captured, so there exist both efficient and inefficient patterns. Testing each pattern you develop on a real participant and evaluating the results is simply not an option. This is where fMRI simulation comes into play. It's possible to do yourself with a bit of MATLAB/​Python code, or with some programs put out by the AFNI group at the NIH (detailed on the CogNeuroStats Blog [[http://​blog.cogneurostats.com/?​p=334|here]]),​ or with OptSeq2, a simulation program developed ​by researchers ​at Massachusetts General Hospital.
  
-====== ​Acquiring ​OptSeq2 ======+====== ​Downloading ​OptSeq2 ======
  
 OptSeq2 can be downloaded from the FreeSurfer website [[http://​surfer.nmr.mgh.harvard.edu/​optseq/​|here]]. Simply put the downloaded file in the directory in which you wish to simulate, or drop it into a source path like your AFNI or FreeSurfer binaries directory so you can access it from anywhere. OptSeq2 can be downloaded from the FreeSurfer website [[http://​surfer.nmr.mgh.harvard.edu/​optseq/​|here]]. Simply put the downloaded file in the directory in which you wish to simulate, or drop it into a source path like your AFNI or FreeSurfer binaries directory so you can access it from anywhere.
Line 11: Line 11:
 ====== Using OptSeq2 ====== ====== Using OptSeq2 ======
  
-OptSeq2 can accept a number of options, which are denoted by a double-dash (%%--%%). A full list of options can be found [[http://​surfer.nmr.mgh.harvard.edu/​optseq/​optseq2.help.txt|here]],​ but only four pieces of basic information are necessary in order to begin simulating fMRI experiments:​+OptSeq2 can accept a number of options, which are denoted by a double-dash (%%--%%). A full list of options can be found [[http://​surfer.nmr.mgh.harvard.edu/​optseq/​optseq2.help.txt|here]],​ but only seven pieces of basic information are necessary in order to begin simulating fMRI experiments:​
   * TR (%%--tr%%)   * TR (%%--tr%%)
   * Number of timepoints (%%--ntp%%)   * Number of timepoints (%%--ntp%%)
   * Range of allowable ISIs (%%--PSDwin%%)   * Range of allowable ISIs (%%--PSDwin%%)
   * Event definitions (%%--ev%%)   * Event definitions (%%--ev%%)
-  * How long to simulate (%%--n+  * How long to simulate (%%--nsearch%%) 
 +  * How many timing files to keep (%%--nkeep%%) 
 +  * An output prefix with which to label the timing files generated (%%--o%%)
  
 +====== Example ======
  
- +Here is an example of an OptSeq2 call that models an fMRI experiment with 200 acquisitions,​ a TR of 2.0 seconds, a post-stimulus duration window [2 4], and two conditions of thirty stimuli each. OptSeq2 will generate 100,000 timing files and keep the top three. 
 + 
 +<​code>​ 
 +optseq2 \ 
 +--ntp 200 \ 
 +--tr 2.0 \ 
 +--psdwin 2 4 \ 
 +--ev condA 2 30 \ 
 +--ev condB 2 30 \ 
 +--nsearch 100000 \ 
 +--nkeep 3 \ 
 +--o best 
 +</​code>​ 
 + 
 +====== Discussion on Options and Necessary Arguments ====== 
 + 
 +===== Post-stimulus Delay Window ===== 
 +**//​%%--psdwin min max dPSD%%//**
  
   ​   ​
 +Simply enough, //psdwin// requires two arguments, the minimum and maximum amount of time between the offset of one stimulus and the onset of the next. //dPSD// is an optional argument which specifies the sampling rate and must be an even multiple of the TR. If left unspecified,​ OptSeq2 sets this equal to the TR. Both //min// and //max// must be multiples of //dPSD//.
 +
 +==== Event Definition: ====
 +**//%%--ev %%//**
 +
 +You must provide an event definition for each condition in the experiment you want to simulate. //ev// takes three arguments: a label for the condition, the duration of each event in this condition (must be an even multiple of the TR), and the number of events of this condition which are to occur.
 +
 +
optseq2.txt · Last modified: 2014/10/03 13:05 by eric