query on coherence source analysis
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Thu Jun 1 13:58:48 CEST 2006
Dear Muthuraman
I have not been able to reproduce your error. I suggest that you get
the latest version of FieldTrip from our FTP server and try again.
best egards,
Robert
PS this is the test script I used. It uses some simulated data, which
again uses a MEG gradiometer definition and a head model from the
tutorial data.
-----------------
% read some data that is required to simulate MEG data, i.e. volume
model,
% sensor positions and MRI (optional, only for plotting)
vol = read_ctf_hdm('Subject01.hdm');
hdr = read_fcdc_header('Subject01.ds/Subject01.res4');
grad = hdr.grad;
% construct the simulated MEG data for condition A ("active")
cfg = [];
cfg.vol = vol;
cfg.grad = grad;
cfg.fsample = 300;
cfg.ntrials = 2;
cfg.triallength = 1;
cfg.dip.pos = [0 7 8];
cfg.dip.mom = [1 0 0];
cfg.dip.signal = sin(2*pi*10*(1:cfg.fsample)./cfg.fsample);
cfg.absnoise = 1e-8;
data = dipolesimulation(cfg);
% add the source signal as fake EMG channel
for i=1:cfg.ntrials
data.trial{i}(end+1,:) = cfg.dip.signal + randn(size
(cfg.dip.signal));
end
data.label{end+1} = 'EMG';
cfg=[];
cfg.output='powandcsd';
cfg.method='mtmwelch';
cfg.foi=1:2:30;
numfoi = length(cfg.foi);
cfg.taper='hanning';
cfg.t_ftimwin=zeros(1,numfoi);
cfg.t_ftimwin(:)=0.5;
cfg.channel=channelselection({'MEG' 'EMG'},data.label);
cfg.channelcmb={'MEG' 'EMG'};
freq=freqanalysis(cfg,data);
More information about the fieldtrip
mailing list