[FieldTrip] timeseries analysis

Timothy J Wanger wanger at uga.edu
Tue Feb 18 20:44:28 CET 2014


Hi,

My name is Tim Wanger, I am a graduate student working with Dean Sabatinelli at the University of Georgia.  This is my first attempt at using Field Trip.  In order to familiarize myself with the software and learn how it can analyze data collected at our lab, I put together a small dataset containing fMRI timeseries from two different experimental conditions(arousing/not-arousing).  After looking through the documentation on the Field Trip website, I came to the conclusion that 'ft_timelockanalysis' could be used to analyse timeseries data.  After setting up a cfg variable, and importing my data(does not need preprocessing), I tried running ft_timelockanalysis, but there were some errors that I am not sure how to fix.  I was wondering if anyone could help me sort this out.

data.label=region';                  % region info
data.fsample=4;                      % 250ms sampling rate (4Hz)
data.trial=timeseriesdata;          % our data, <158x50 cell> matrix.  trials have already been excised from raw data
data.time=num2cell(1:length(timeseriesdata)); % represent time in samples
data.trialinfo=arousalrating';       % experimental condition information

cfg.channel='all';
cfg.trials= 'all';
cfg.covariance='no';
cfg.covariancewindow='all';
cfg.keeptrials='no';
cfg.removemean='yes';
cfg.vartrllength=2;  % some trials are missing the 50th sample


Here is the error I am currently receiving, with some relevant Matlab command window output.

the input is raw data with 1 channels and 158 trials
Warning: removing inconsistent sampleinfo
> In ft_datatype_raw at 109
  In ft_checkdata at 213
  In ft_timelockanalysis at 105
  In testing_fieldtrip at 49
Warning: the data does not contain a trial definition
> In utilities/private/warning_once at 116
  In utilities/private/fixsampleinfo at 66
  In ft_datatype_raw at 158
  In ft_checkdata at 213
  In ft_timelockanalysis at 105
  In testing_fieldtrip at 49
Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous
recording
> In utilities/private/warning_once at 116
  In utilities/private/fixsampleinfo at 79
  In ft_datatype_raw at 158
  In ft_checkdata at 213
  In ft_timelockanalysis at 105
  In testing_fieldtrip at 49

??? Index exceeds matrix dimensions.
Error in ==> fixsampleinfo at 95
        offset(i) = time2offset(data.time{i}, data.fsample);
Error in ==> ft_datatype_raw at 158
      data = fixsampleinfo(data);
Error in ==> ft_checkdata at 213
  data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo);
Error in ==> ft_timelockanalysis at 105
data = ft_checkdata(data, 'datatype', {'raw', 'comp'}, 'feedback', 'yes', 'hassampleinfo', 'yes');
Error in ==> testing_fieldtrip at 49
[timelock] = ft_timelockanalysis(cfg, data);


So, my questions are:
1. Am I on the right track?
2. Is there a better function to be using?
3. Am I using the proper data format as an import?
4. The code is 'assuming that the trials are consecutive segments of a continuous recording', which is not the case for me, so what can/should I do about that?
5. Does anyone have a template matlab script and demo dataset (for timeseries analysis) that runs without errors, that I could look at?  It would help me to just step through the analysis to see what's happening, and an example of input data/parameters.

Thanks in advance!
-Tim Wanger?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140218/340ef099/attachment.html>


More information about the fieldtrip mailing list