megplanar input structure

Akiko Ikkai akiko at NYU.EDU
Thu Sep 23 01:20:19 CEST 2010


Thank you very much for suggestions earlier. Visualization of the ERF using planar gradient runs smoothly (with cfg.keeptrials = 'no';).

I'm now trying to run cluster-based permutation tests on ERF with planar gradient, following the tutorial. I'm confused with what the input structure should look like.

My confusions come from the difference between figure1 (tutorial:cluster_permutation_erf:clusperm_erf_anaprot_stat_planar_ficvsfc.png) and the middle part of the tutorial page ("Using planar gradient data" in cluster_permutation_timelock). In figure, there is additional timelockanalysis between megplanar and combineplanar, whereas in the main text, combineplanar directly follows megplanar.

I tried 3 things: 1. Without timelockanalysis (after megplanar), I get an error in permutation with an input
ERF1 =

      trial: {1x137 cell}
      label: {157x1 cell}
       grad: [1x1 struct]
    fsample: 500
       time: {1x137 cell}
        cfg: [1x1 struct]

[stat] = timelockstatistics(cfg, ERF1, ERF2);

??? Reference to non-existent field 'dimord'.

Error in ==> prepare_timefreq_data>forcedimord at 577
inputdim  = tokenize(input.dimord, '_');

Error in ==> prepare_timefreq_data at 176
  [remember{c}, hascrsspctrm] = forcedimord(varargin{c});

Error in ==> statistics_wrapper at 318
  [cfg, data] = prepare_timefreq_data(cfg, varargin{:});

Error in ==> timelockstatistics at 115
[stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> cluster_ERF_bwTrialtest_planar at 50
[stat] = timelockstatistics(cfg, ERF1, ERF2);

2. manually added dimord to the same input
ERF1.dimord = 'rpt_chan_time';

[stat] = timelockstatistics(cfg, ERF1, ERF2);

??? Undefined function or method 'isnan' for input arguments of type 'cell'.

Error in ==> prepare_timefreq_data at 215
  if isempty(findstr(remember{c}.dimord, 'time')) || all(isnan(remember{c}.time))

Error in ==> statistics_wrapper at 318
  [cfg, data] = prepare_timefreq_data(cfg, varargin{:});

Error in ==> timelockstatistics at 115
[stat, cfg] = statistics_wrapper(cfg, varargin{:});

3. With timelockanalysis (after megplanar), it crashes during combineplanar

??? Subscripted assignment dimension mismatch.

Error in ==> checkdata>raw2timelock at 1136
    tmptrial(i,:,begsmp(i):endsmp(i)) = data.trial{i};

Error in ==> checkdata at 366
        data = raw2timelock(data);

Error in ==> combineplanar at 356
    data = checkdata(data, 'datatype', 'timelock', 'feedback', 'yes');


... so, I'm trying to figure out what input structure timelockstatistics requires in order to run with planar gradient. I'm converting all inputs to single in order to avoid memory error, but I don't think that is the cause of the problem.

Thanks in advance! Akiko


----- Original Message -----
From: jan-mathijs schoffelen <jan.schoffelen at DONDERS.RU.NL>
Date: Tuesday, September 21, 2010 5:37 am
Subject: Re: [FIELDTRIP] megplanar input structure
To: FIELDTRIP at NIC.SURFNET.NL

> Dear Akiko,
>
> I think that your crash may be related to the issue of missing
> channels. Antony already pointed you to a way how to fix this. As to
>
> your first question: ft_megplanar indeed works with data containing a
>
> trial field (as cell-array). However, no need for you to worry about
>
> this; if your input data is for example a 'timelock' structure,
> fieldtrip automatically converts this structure into one containing a
>
> 'trial'.
>
> Best wishes,
>
> Jan-Mathijs

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



More information about the fieldtrip mailing list