[FieldTrip] Epoching continuous time frequency data

Matt Erhart merhart at ucsd.edu
Tue Dec 17 01:41:02 CET 2013


I would like to run freqanalysis on my continuous data and then redefine
trials with a cfg.trl, but ft_redefinetrial is turning my continuous time
frequency data into something other than timefreq data. Is ft_redefinetrial
even designed to epoch continuous freqdata? Is there a working code snippet
around that shows exactly how to efficiently run freqanalysis on continuous
data and then epoch it?

% this cfg seems to produce reasonable results per some imagesc plotting:
cfg.method = 'hilbert'
cfg.foi    = [2:4:56];
cfg.toi = data_ds.time; %every time point works
cfg.filttype   = 'fir'; % fir seems better than firls, butter has unit
circle error
cfg.keeptrials = 'yes';
cfg.output        = 'pow';
TFRwave        = ft_freqanalysis(cfg, data_ds); % continuous data to tf

[cfg.trl, cfg.event] = txt2trl(cfg); %cfg.trl epochs non-freq data just fine
TFRwave_trials = ft_redefinetrial(cfg,TFRwave);  % warns that no trial def.
provided but doesn't error
ft_singleplotTFR(cfg, TFRwave_trials); % says TFRwave_trials is not freqdata
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131216/e5ff1d07/attachment.html>


More information about the fieldtrip mailing list