[FieldTrip] ft_combineplanar on Neuromagdata

Hanneke.vanDijk at med.uni-duesseldorf.de Hanneke.vanDijk at med.uni-duesseldorf.de
Fri Jan 24 13:11:05 CET 2014

Dear Fred,

First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar.

My workflow is slightly different, but maybe that makes the difference....,

in preprocessing I use (but I suppose you could also try that in freqanalysis)
> cfg.channel                     = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a  1).

p = 
         label: {204x1 cell}

Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result.

I hope this somehow helps..

Best, Hanneke

Hanneke van Dijk, PhD
Institute for Clinical Neuroscience,
Heinrich Heine Universität Düsseldorf, Germany
Hanneke.vanDijk at med.uni-duesseldorf.de
Tel. +49 (0) 211 81 13074   

-----Ursprüngliche Nachricht-----
Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux
Gesendet: Freitag, 24. Januar 2014 10:57
An: FieldTrip discussion list
Betreff: [FieldTrip] ft_combineplanar on Neuromagdata

Dear fieldtrip users,

sorry to bother you with this really trivial question.
I am running into an issue using ft_combineplanar on Neuromag data.

The code I am using is as follows:

cfg = [];
cfg.channel = {'MEGGRAD'};

grad_data = ft_selectdata(meg_data);

%after this step there are only planar-gradients left

cfg = [];
cfg.method = 'mtmfft';
cfg.output = 'pow';
cfg.taper = 'hanning';
cfg.foi = 0:100;
cfg.keeptrials = 'no';

spectrum1 = ft_freqanalysis(cfg,grad_data);

% returns the FFT power spectrum

cfg = [];

spectrum2 = ft_combineplanar(cfg,spectrum);

% this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels

However, spectrum does not change.
This can be seen by

isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1

Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left.

Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here?

Any advice would be highly appreciated.


fieldtrip mailing list
fieldtrip at donders.ru.nl

More information about the fieldtrip mailing list