Time Course UI


Jump to: navigation, search


[edit] Time Course UI

The Time Course User Interface is a subset of tools for analyzing and visualizing the mean time course across a region of interest (ROI). It can produce a number of plots summarizing the time course, including:

  • The whole time course, with color patches indicating the duration of different event periods during a scan;
  • The mean peri-stimulus time courses (plus standard error of the mean across event repetitions) for different conditions
  • Several ways for measuring the amplitude of responses to different conditions:
    • The mean difference between user-designated 'peak' and 'baseline' periods in the peri-stimulus time courses
    • Dot-product projection amplitudes (or 'relative fMRI amplitudes'), as used in Ress et al., 2000 among other papers.
    • Beta coefficients from a General Linear Model
  • Individual peri-stimulus time courses for each trial / block
  • Visualization of the results of an ROI-based General Linear Model
  • Visualization of the reuslts of an ROI-based Traveling-Wave Analysis

[edit] Using the Interface

[edit] Launching the TCUI

In mrVista 1, the TCUI can be launched from one of two menus: 'Plots' | 'Time Course UI' or 'EventRelated' | 'TimeCourse UI'. (They're in multiple places because people have different intuitions about how to launch it.)

In mrVista2, the TCUI can be launched from the 'Time Course' button on the ROI Panel in mrViewer, the menu option 'Plots' | 'Time Course UI', or the menu option in the Session GUI 'View' | 'Time Course UI'.

[edit] Plots Menu

The visualization options described above are all accessible through the Plots menu in the TCUI. The default view is a combined view of the event-related averages (+/- SEMs across event repetitions), and the estimated amplitudes of each time course, based on the peak and baseline periods specified in the event-related parameters.

[edit] Analysis Menu

Here are some of the options available in the analysis menu:

  • Blur time course: this performs a low-pass filter ( blur.m ) on the time course, with a cutoff of around 30 cycles / scan.
  • Detrend time course: this performs a form of high-pass filter ( removeBaseline2.m )on the time course, with an approximate cutoff of around 3-4 cycles / scan.
  • Apply GLM: this applies a general linear model to the ROI time course, and visualizes the results.
  • Apply Cor Anal: This applies a coherence analysis to the ROI time course, and visualizes the results. Note that when you select Visualize CorAnal Results from the Plots menu, this only applies it once, and uses the stored results to display it. If you want to modify the parameters; e.g., the number of cycles for the stimulus frequency or the frames from the scan to use, you should re-select this option from the analysis menu.

[edit] Condition Names, Colors, Order

The Settings menu allows you to edit the names and colors corresponding to different event numbers. You can also do more advanced things like re-order the condition numbers ( tc_reorderCondNums ) or group several conditions together as a single condition ( tc_groupConditions ).

Having made these changes to the stimulus definition, you can save .par files corresponding to the modified specification by selecting Export | Save parfiles as.... (command: tc_saveParfiles ).

[edit] Visualization Settings

Selecting conditions to view : You can make the results from only some experimental conditions visible, by selecting/deselecting them in the 'Conditions' menu. By default, the peri-stimulus results from the null (condition 0) condition are hidden in this way.

[edit] Using Time Course Data Outside the GUI

The TCUI functions all work around a 'tc' struct, which is independent of the GUI and can be readily worked with in the command window/scripts. The tc struct is stored as a GUI figure's UserData property, and can be dumped to the MATLAB workspace using the menu 'Analysis' | 'Dump Data to Workspace'.

The tc struct is "object-y", in that it has several properties (fields of the struct) which describe it, and "methods" particular to its class -- although for simplicity's sake, it's not implemented formally as an object.

[edit] Time Course Properties

The fields of a tc struct include the following fields, 'inherited' from a more general 'event-related analysis' class, and created by the files er_chopTSeries and/or er_chopTSeries2 (more about these functions below):

  • tc.wholeTc: 1 x nFrames vector containing the mean time series, detrended and concatenated across all relevant scans. This time course is the mean across all selected voxels for the region of interest (which is specified in the tc.roi substruct).
  • tc.allTcs: nTimeWindow x maxNTrials x nConds matrix, containing event-related time courses. 'nTimeWindow' refers to the number of MR frames contained within the specified peri-stimulus time window for each trial: this time windows is specified in the event-related parameter params.timeWindow. (Note that the time window is specified in seconds relative to each event onset, then converted into MR frames by the code). 'maxNTrials' refers to the maximum number of separate 'trials' (or more genrally, event onsets) for any of the conditions (often this is the 0, or null/offset condition). 'nConds' refers to the total number of conditions. If one condition has more trials than others, columns for the other conditions are padded w/ NaNs.
  • tc.meanTcs: nTimeWindow x nConds matrix of mean event-related time courses for each condition.
  • tc.sems: nTimeWindow x nConds matrix of standard errors of the mean for each time point in the tc.meanTcs matrix.
  • tc.amps: maxNTrials x nConds matrix of amplitudes for each trial. As with tc.allTcs, if one condition has more trials than others, the other conditions are padded with NaNs. Thus, to get the mean and standard deviation across trials use:
    > nanmean(tc.amps);
  • tc.trials: trial (or 'event') onset structure, created with er_concatParfiles. In mrVista2, this structure is part of a generalized 'stim' structure, and can read mrVista / FS-FAST .par files (stimReadPar) or BrainVoyager prtFiles (stimReadPrt).

Due to legacy code, some of the more relevant event-related parameters are duplicated as first-level fields in the tc struct: *tc.timeWindow* specifies the time, in seconds relative to stimulus onset, with which to compute event-related time courses; tc.peakPeriod specifies those time points (again in secs) to consider 'peak' response periods when using event-triggered averages (*tc.params.ampType*=='difference') or deconvolved amplitudes (*tc.params.ampType*=='deconvolved'). *tc.bslPeriod* specifies a corresponding 'baseline' period when it is expected that there should not be a response. If the *tc.params.normBsl* parameter is set to 1, the MR frames contained with in the tc.bslPeriod window are set to have a mean of 0 when computed event-related time courses.

[edit] Time Course Methods

The methods specfic to time course objects all start with 'tc_', Examples of methods:

  • tc_recomputeTc(tc, [useDefaults=0]): re-computes the time course (chopping using er_chopTSeries2()), providing a user dialog if desired to allow the user to modify the event-related parameters in tc.params, before re-chopping.
  • tc_blurTimeSeries(tc): perform a low-pass filter using a binomial kernel. (_NOTE_: This is often useful in removing noise which is clearly outside the frequency range of an experimental design. Given that high-pass filtering is already commonly used as a detrending method, I wonder if this option should ultimately be integrated into the pre-processing tools...)
  • tc_plotWholeTc(tc): plots the whole time course, including colored patches specifying onsets of various conditions.
  • tc_meanAmpsPlusTcs(tc): plots the mean +/-SEM amplitudes for each condition, as well as the mean time courses (+/- SEM). The default view in a TCUI.
  • tc_applyGlm(tc): applies a general linear model to a time course, given the event-related parameters. Key parameters for this are: tc.params.glmHRF, which specifies which hemodynamic impulse response function to use (or, if tc.params.glmHRF==0, to 'deconvolve' the time course without an HRF); and tc.params.eventsPerBlock, which specifies the duration of block-design events in units of MR frames.
  • tc_visualizeGLM(tc): visualizes key aspects of the input and output of the general linear model.
  • tc_openFig(tc): opens a new figure for visualizig a time course UI, adding the standard menus.

Many other methods are available for tc objects. Use the tab-complete option (or lookfor tc_ ) to get a full list.

Some event-related methods (starting with 'er_') are also closely related to the time course methods:

er_chopTSeries(): creates an 'event-related analysis' structure from a mrVista view, which contains the basic data fields used by tc structs, such as tc.wholeTc, tc.allTcs, etc.

er_chopTSeries2(): more generalized version of er_chopTSeries

[edit] Across-session analyses

tc_combineTcs will combine the data from several time course structures into one. There are several options for how to do this: for instance, if each time course has the same design, it can average the whole time course from each input together; alternately, it can concatenate everything, and run a big analysis on the combined time course. The default behavior is to concatenate the time courses, as well as computing the mean +/- SEM across input event-related averages in the input time courses (as you would in an across-subjects analysis).

tc_acrossSessions will load up several mrVista sessions in sequence, load the specified ROI for each session, grab the time course, then call tc_combineTcs to analyze the group data.

The tc_combineTcs and tc_acrossSessions code provide a number of methods for combining data across sessions and subjects. The default method does the following: for each session, the mean amplitudes of response are estimated using a General Linear Model for that session's data. The mean peri-stimulus time courses are also estimated for that session. Then the mean amplitudes and SEMs are estimated as the mean and standard error of the mean between the mean amplitudes (beta weights) from the GLM. The mean time courses (and time-point-specific SEMs) are estimated from the mean time courses for each session.

[edit] Screen Shots

Personal tools