<div dir="ltr">It seems like the issue is between the number of channels in your input (48) is different from the number of channels in the sensor description (60). You should use ft_channelrepair to interpolate the removed channels, and then it should work barring any other issues.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 17, 2014 at 5:45 AM, Hwee Ling Lee <span dir="ltr"><<a href="mailto:hweeling.lee@gmail.com" target="_blank">hweeling.lee@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div dir="ltr"><div>Dear all,</div><div><br></div><div>I have 60 channel EEG resting state data, and after discarding bad channels, I am left with 48 channels common to all subjects. </div><div><br></div><div>I applied scalp current density to my data before extracting power information from my EEG data. The EEG cap that I used was in a 10-10 system, and I don't have the electrode position file. Hence, I used the default electrode position file named 'standard_1005.elc' for the purpose.</div><div><br></div><div>Here's the part of my script for the surface Laplacian:</div><div><br></div><div><br></div><div><div>    cfg_neighb.method = 'template';</div><div>    cfg_neighb.layout = 'EEG1010.lay';</div><div>    cfg_neighb.channel = 'all';</div><div>    cfg_neighb.feedback = 'no';</div><div>    </div><div>    neighbours = ft_prepare_neighbours(cfg_neighb, data7);</div><div>    </div><div>    cfg                 = [];</div><div>    cfg.method          = 'finite';</div><div>    cfg.elecfile        = 'standard_1005.elc';</div><div>    cfg.elec            = ft_read_sens(cfg.elecfile);</div><div>    cfg.trials          = 'all';</div><div>    cfg.neighbours      = neighbours;</div><div>    cfg.conductivity    = 0.33;</div><div>    </div><div>    data8               = ft_scalpcurrentdensity(cfg, data7);</div></div><div><br></div><div>When I tried to extract power from data8 (after surface Laplacian), I keep getting an error message (see below). I'm not sure why this would be the case, and would appreciate very much if someone could help me resolve the error!</div><div><br></div><div>Thank you!</div><div><br></div><div>Here's my script for extracting the power:</div><div><div> cfg                 = [];</div><div>    cfg.output          = 'pow';</div><div>    cfg.channel         = {'all'};</div><div>    cfg.method          = 'mtmfft';</div><div>    cfg.keeptrials      = 'no';</div><div>    cfg.tapsmofrq       = 5;</div><div>    cfg.layout          = 'EEG1010.lay';</div><div>    </div><div>    % for frequencies up to 30 Hz</div><div>    cfg.foilim          = [1 30]; % either the full range of frequencies (data2.hdr.Fs/2) or up to 100 Hz</div><div>    cfg.taper           = 'hanning';</div><div>    </div><div>    % find the index for the c200 condition</div><div>    pre_c200_idx = find(data8.trialinfo == 200);</div><div>    cfg.trials          = pre_c200_idx;</div><div>    LF_pre_c200        = ft_freqanalysis(cfg, data8);</div><div><br></div><div>Here's the output plus error message:</div><div><br></div><div>the input is raw data with 48 channels and 343 trials</div><div>Error using ft_datatype_sens (line 375)</div><div>inconsistent number of channels in sensor description</div><div><br></div><div>Error in ft_datatype_raw (line 138)</div><div>      data.elec = ft_datatype_sens(data.elec);</div><div><br></div><div>Error in ft_checkdata (line 223)</div><div>  data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo);</div><div><br></div><div>Error in ft_freqanalysis (line 209)</div><div>data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback',</div><div>cfg.feedback, 'hassampleinfo', 'yes');</div><div> </div></div><div>Best regards,</div><div>Hweeling</div><div><br></div></div></div>
</div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Max Cantor<div>Lab Manager</div><div>Computational Neurolinguistics Lab</div><div>University of Michigan</div></div></div>
</div>