[FieldTrip] channelcmb with removed channels

Allison Connolly ting.ac at gmail.com
Wed May 11 19:30:14 CEST 2011


I am trying to do beamforming on some MEG data. However, some of the sensors
railed during the recordings, so I want to remove them from the analysis. I
declare the channels I want to use during import with ft_preprocessing by
saying:
cfg.channel                 = {'MEG','-TRIGGER','-RESPONSE',...
    '-UACurrent','-MxA','-MyA','-MzA','-GxxA','-GyxA','-GyyA',...
    '-GzyA','-GzxA','-MxaA','-MyaA','-MzaA','-E1','-E2','-E3','-E4',...
    '-A40','-A57','-A76','-A77','-A79','-A81','-A88','-A89','-A96',...
    '-A100','-A102','-A103','-A108','-A112','-A113','-A114','-A116',...
    '-A120','-A121','-A123','-A124','-A125','-A126','-A127','-A128',...
    '-A129','-A130','-A131','-A124','-A139','-A140','-A141','-A142',...
    '-A144','-A145','-A146','-A147','-A148'};

Then I use ft_freqanalysis to calculate the cross spectral density and
ft_prepare_leadfield to create the brain grid. When I try to run
ft_sourceanalysis, I get this error:
creating dipole grid based on user specified dipole positions
13718 dipoles inside, 144943 dipoles outside brain
???  In an assignment  A(I) = B, a matrix A cannot be resized.

Error in ==> prepare_freq_matrices at 115
    Cf(find(crsspctrmindx)) =
freq.crsspctrm(crsspctrmindx(find(crsspctrmindx)), fbin);

Error in ==> ft_sourceanalysis at 461
    [Cf, Cr, Pr, Ntrials, cfg] = prepare_freq_matrices(cfg, data);


I think it is because I have removed channels. When I try to run
ft_freqanalysis while specifying the channels in cfg.channel, i get this
error:
the input is raw data with 111 channels and 60 trials
??? Error using ==> ft_freqanalysis at 352
*channels in cfg.channelcmb not present in cfg.channel*
*
*I think I need to explicitly define cfg.channelcmb, but I don't know how to
do this if I have removed channels.

-Allison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110511/dc1718f1/attachment.html>


More information about the fieldtrip mailing list