query on coherence analysis

Muthuraman Muthuraman muthuraman10 at HOTMAIL.COM
Tue Jun 20 10:40:17 CEST 2006


Hello Jan

The answers for the questions you have asked
and also i have attached some figures with this mail
1-using welch periodogram method
2-using fieldtrip 'mtmfft'
3-using fieldtrip 'mtmwelch'

Did you have a look into fd.powspctrm, and fd.cohspctrm?
-yes,both look the same so something is surely going wrong

Does it contain normal numbers, zeros, or nan?
-yes, it has normal numbers but the vlaues are from 1.0 to 10.0 not as
normal in the case of 0.1 to 1 in coherence spectrum

Did you try out other methods, to be specified in cfg.method?
-yes using 'mtmfft' i have attached the figure in the mail in which i dont
get the correct frequency content and the values are less

-In the 'mtmwelch' method i get a error when i am plotting, even then i am
able to see the figure
??? Error using ==> char
Cell elements must be character arrays.

Error in ==> singleplotER at 326
  t=[char(cfg.channelname) ' / ' num2str(cfg.channelindex) ];

-In the 'mtmconvol' i am not able to plot i get a error
selected 60 channels for coherence
??? Error using ==> plot
Vectors must be the same lengths.

Error in ==> singleplotER at 272
  plot(varargin{k-1}.(cfg.xparam), P, style);


please go through it and give your comments

and one more question for the source analysis
what are the values we need,when i open the elec1010 there are four values
x,y,z values and what is the fourth value

with regards
muthu

>From: Jan Mathijs Schoffelen <Jan.Schoffelen at FCDONDERS.RU.NL>
>Reply-To: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
>To: FIELDTRIP at NIC.SURFNET.NL
>Subject: Re: [FIELDTRIP] query on coherence analysis
>Date: Fri, 16 Jun 2006 09:15:15 +0200
>
>Dear Muthuraman,
>
>At first glance I don't have a clue what's going on.
>Did you have a look into fd.powspctrm, and fd.cohspctrm?
>Does it contain normal numbers, zeros, or nan?
>It might be a bug in freqanalysis_mtmwelch.
>Did you try out other methods, to be specified in cfg.method?
>If yes, did this also give strange results? If no, could you try out
>cfg.method = 'mtmconvol' instead of 'mtmwelch'? Please have a look at the
>documentation which additional options you have to specify.
>What matlab-version do you use? Do you use the latest fieldtrip-version?
>
>One additional thing: please note that you specified the odd frequencies
>1:2:29, whereas your time-window is half a second wide. These are not
>optimal settings, since the frequency-resolution of your time-window is 2
>Hz. This means that your time-window never contains an integer amount of
>cycles of the frequency you want to estimate. This might lead to strange
>results, though I don't think it has anything to do with your present
>problem. However, I would use cfg.freq = 2:2:30 in combination with a
>time-window of 0.5 s
>
>Yours,
>
>Jan-Mathijs
>
>-----Original Message-----
>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
>Of Muthuraman Muthuraman
>Sent: Thursday, June 15, 2006 4:00 PM
>To: FIELDTRIP at NIC.SURFNET.NL
>Subject: Re: [FIELDTRIP] query on coherence analysis
>
>Hello
>
>Thankyou for the previous help it works now
>i am able to proceed further to calculate the coherence
>
>The problem now the coherence obtained using the mtmwelch
>when i plot the coherence figures for the channels
>all the coherence figures for the different channel looks the same
>is there is a bug in how i am calculating the coherence
>
>These are the steps i carried out in calculating the coherence
>
>headerfile='pd_mof_tr0_c_0306.cnt';
>hdr = read_fcdc_header(headerfile);
>cfg.trl = [];
>for i=1:floor(hdr.nSamples/hdr.Fs)
>   cfg.trl(i,1) = (i-1)*hdr.Fs + 1;
>   cfg.trl(i,2) = (i  )*hdr.Fs;
>   cfg.trl(i,3) = 0;
>end
>
>cfg.headerfile=headerfile;
> >>cfg.datafile=headerfile;
> >>[data] = preprocessing(cfg);
>
>-and after the data is preprocessed i change the channel labels from actual
>cz to eeg26 and so on
>
>
>
>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({'EEG' 'EMG2'},data.label);
>cfg.channelcmb={'EEG' 'EMG2'};
>freq=freqanalysis(cfg,data);
>
>
>-when i calculate using freqanalysis i get these warnings
>
>1.000 Hz : WARNING - using only one taper for specified smoothing
>Warning: Size vector should be a row vector with integer elements.
> >In freqanalysis_mtmconvol at 360
>   In freqanalysis at 182
>   In freqanalysis_mtmwelch at 67
>   In freqanalysis at 182
>and so on till 30.000 hz
>
>-and while processing
>
>processing trial 2: 1000 samples
>Warning: Size vector should be a row vector with integer elements.
> >In freqanalysis_mtmconvol at 398
>   In freqanalysis at 182
>   In freqanalysis_mtmwelch at 67
>   In freqanalysis at 182
>
>
>
>fd=freqdescriptives([],freq);
>
>
>cfg=[];
>cfg.xparam='freq';
>cfg.yparam='cohspctrm';
>cfg.xlim=[3 30];
>cfg.cohrefchannel='EMG2';
>cfg.box='yes';
>cfg.showlabels='yes';
>
>cfg.channelname='EEG27';
>singleplotER(cfg,fd);
>-when i try to plot i get this error
>??? Error using ==> char
>Cell elements must be character arrays.
>
>Error in ==> singleplotER at 326
>   t=[char(cfg.channelname) ' / ' num2str(cfg.channelindex) ];
>
>
>please , look at it and help me in this regard
>
>thanking you
>with regards
>muthuraman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Welch Periodogram Method.fig
Type: application/octet-stream
Size: 20550 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20060620/3ede865a/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fieldtrip-'mtmfft'.fig
Type: application/octet-stream
Size: 21189 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20060620/3ede865a/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fieltrip-'mtmwelch'.fig
Type: application/octet-stream
Size: 3635 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20060620/3ede865a/attachment-0008.obj>


More information about the fieldtrip mailing list