Back to the main page.

Bug 1294 - ft_redefinetrial.m rare channel label output

Status CLOSED INVALID
Reported 2012-01-29 22:32:00 +0100
Modified 2013-10-26 18:13:51 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Diego Lozano Soldevilla - 2012-01-29 22:32:59 +0100

Hi, I want to make a trial selection after TF analysis but using ft_redefinetrial, I get a rare label output that mess all MEG channel data cfg = []; cfg.trials = wmtrl;%vector of 1x45 elements meg2 = ft_redefinetrial(cfg,meg); the input is freq data with 273 channels, 29 frequencybins and 103 timebins selecting 45 trials selecting 45 trials the call to "ft_redefinetrial" took 2 seconds and an estimated 0 MB >> meg2 meg2 = label: {1x7917 cell} time: {1x45 cell} trial: {1x45 cell} fsample: 20.0000 trialinfo: [45x5 double] cfg: [1x1 struct] meg2.label{1,1} ans = MLC11@1.960784e+00Hz ft_redefinetrial calls ft_checkdata and the former uses freq2raw subfunction that creates this channel structure (see lines 1603-10 of ft_checkdata.m): % create the channel labels like "MLP11@12Hz"" k = 0; for i=1:nfreq for j=1:nchan k = k+1; data.label{k} = sprintf('%s@%dHz', freq.label{j}, freq.freq(i)); end end What's the porpuse of this labeling? I tryed to use ft_selecdata_new but it needs to be fixed: meg2 = ft_selectdata_new(cfg,meg); ??? Error using ==> ft_selectdata_new at 84 FIXME Best, Diego


Jan-Mathijs Schoffelen - 2012-02-01 13:38:32 +0100

Hi Diego, ft_redefinetrial is a function that just works on 'raw', i.e. time-domain data. Therefore, when you give frequency domain data in the input, FT tries to convert this to time domain data again. This means that for each channel and frequency, a time course of power is created. The corresponding label is then 'MLC11' at frequency 'Y'. As such, this is not what you want, because you indeed want to use ft_selectdata. As of yet this functionality is not implemented, but we hope to be working on this soon.


Boris Reuderink - 2012-02-03 12:06:47 +0100

JM, could you resolve this bug (probably RESOLVED:INVALID), and create a new issue for the enhancement you propose? I have trouble describing it accurately, otherwise I would have done so.


Jan-Mathijs Schoffelen - 2012-02-03 16:43:34 +0100

The requested functionality is related to bug 1021. As such this one is invalid because ft_redinetrial behaves consistently. Set this one to invalid.