Time frequency Analysis Plotting!

Muthuraman Muthuraman muthuraman10 at HOTMAIL.COM
Wed Jan 31 16:27:41 CET 2007


Hello,

Because of excitement of seeing the results i wrote the last mail
When i started to go through the results still something is wrong
i am not sure whether in the plotting or the  code itself
i have attached the figures with this mail from the time frequency analysis
and the channels for which i am plotting C3  has a strong 5hz and 10 hz
process
and M1 has also 5 hz nad 10 hz process

according to it i should get a horizontal dark line in the time frequency
plot for Power of M1 and C3
but it can be intermittently disappeared
i get a vertical line in the starting of the plot which just looks lke a
broad band signal in the range 2 hz to 5 hz

U can go through the plots and give me ur suggestions on that

hdr     = read_fcdc_header('pd_mof_tr0_c_0306.cnt');
emgindx = strmatch('M', hdr.label);
rstindx = setdiff(1:length(hdr.label),emgindx);

trl = [];
trl(:,1) = [21:1000:74520-1000]';
trl(:,2) = [1020:1000:74520]';
trl(:,3) = 0;


cfg.dataset = 'pd_mof_tr0_c_0306.cnt';
cfg.trl     = trl;
cfg.channel = hdr.label(rstindx);
cfg.blc     = 'yes';
data        = preprocessing(cfg);

cfg.channel  = hdr.label(emgindx);
cfg.hpfilter = 'yes';
cfg.hpfreq   = 10;
cfg.rectify  = 'yes';
emg          = preprocessing(cfg);

for j = 1:length(emg.trial)
  emg.trial{j} = blc(emg.trial{j});
end
data         = appenddata([],data,emg);

%---freqanalysis-mtmconvol
cfg=[];
cfg.output='powandcsd';
cfg.method='mtmconvol';
cfg.channel    = channelselection({'all' 'M1'}, data.label);
cfg.foi=2:1:30;
numfoi=length(cfg.foi);
cfg.t_ftimwin=zeros(1,numfoi);
cfg.t_ftimwin(:)=0.05;
cfg.toi=0.1:0.05:0.9;
cfg.taper='hanning';
cfg.pad=1;
cfg.keeptrials='no';
TFRmult=freqanalysis(cfg,data);


cfg=[];
cfg.baselinetype='relative';
cfg.zlim=[-2e-1 1.1e+2];
cfg.showlabels='yes';
cfg.channel='P2';
singleplotTFR(cfg,TFRmult);

And is this the right way to specify the limits for Z


Thanking you

with regards
M.Muthuraman.

>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] Time frequency Analysis!
>Date: Wed, 31 Jan 2007 11:21:46 +0100
>
>Dear Muthuraman,
>
>In your last mail you wrote:
> >I do get any warning while executing the singleplotTFR function
>Does this mean that you do, or do not get any warnings?
>
> >cfg.ouput='powandcsd';
>Please note that it should read cfg.ouTput (without the capital letter T)
>
>
> >cfg.baselinetype=[0.1 1.0];
>This is obviously wrong: cfg.baselinetype specifies how to do baseline
>correction. This can be 'relative' 'absolute' or 'relchange'. Please
>consult
>the help of this function, or of freqbaseline.m
>You specify the baseline-interval with cfg.baseline.
>
> >cfg.zlim=[-2e-27 2e-27];
>Your values seem to be completely clipped. Did you try around with
>different
>zlims? A typical value of 2e-27 applies to MEG, when no relative or
>relchange baselining is involved. EEG is measured in mV's, and power is
>measured in mV's-squared, so something in the order of 2e-6 seems more
>appropriate to me.
>
>Note that the nans arise when there is not sufficient data in the
>timewindow
>outside [0.25 0.75]. This of course is due to the fact that your data is
>only defined between [0 1], and your timewindow for the time-frequency
>analysis is 0.5 seconds.
>
>Yours,
>
>Jan-Mathijs
>
>
>
>
> >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] Time frequency Analysis!
> >Date: Tue, 30 Jan 2007 17:34:44 +0100
> >
> >Dear Muthuraman,
> >
> >It pleases us that we finally got you to try multi-tapers for your
>spectral
> >analysis! Sometimes it's hard convincing people, but in the end...
> >
> >First of all there's a typo in your configuration for the frequency
> >analysis; this does not explain your results, but as an extra service to
> >you
> >I'd like to point it out. You specify cfg.ouput, where I guess you mean
> >cfg.output. Moreover, since you have an EMG-channel in your data, you
>might
> >be interested in computing the coherence, but therefore you have to
>specify
> >cfg.output = 'powandcsd'.
> >
> >Regarding your nans: did you check whether there are any numbers in
> >TFRmult.powspctrm. If this is the case, your problem most likely arises
>in
> >the plotting. You specify cfg.baselinetype = 'relative', but you do not
> >specify the baseline-interval. Do you get a warning when executing the
> >singleplotTFR-function?
> >If there are only nans in your TFRmult, then I don't get it, because your
> >configuration looks OK to me?
> >
> >By the way, which version of fieldtrip are you using? If you are using an
> >old one, it might be worthwile to download the latest version (there's a
> >daily update on the FTP-server, you can get there through the
> >fieldtrip-website), and try the script again (with the small changes
> >suggested).
> >
> >Yours,
> >
> >Jan-Mathijs
> >
> >
> >-----Original Message-----
> >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
>Behalf
> >Of Muthuraman Muthuraman
> >Sent: Tuesday, January 30, 2007 3:40 PM
> >To: FIELDTRIP at NIC.SURFNET.NL
> >Subject: [FIELDTRIP] Time frequency Analysis!
> >
> >Hello Fieldtrippers,
> >
> >I have question regarding the Time-Frequency analysis using tapers,
> >'mtmconvol' or time frequency analysis using wavelets 'wltconvol'
> >these are the parameters i use, i get all the values to be Nan's
> >Is there something wrong which i need to change in the parameters for the
> >timefrequency analysis
> >
> >hdr     = read_fcdc_header('pd_mof_tr0_c_0306.cnt');
> >emgindx = strmatch('M', hdr.label);
> >rstindx = setdiff(1:length(hdr.label),emgindx);
> >
> >trl = [];
> >trl(:,1) = [21:1000:74520-1000]';
> >trl(:,2) = [1020:1000:74520]';
> >trl(:,3) = 0;
> >
> >
> >cfg.dataset = 'pd_mof_tr0_c_0306.cnt';
> >cfg.trl     = trl;
> >cfg.channel = hdr.label(rstindx);
> >cfg.blc     = 'yes';
> >data        = preprocessing(cfg);
> >
> >cfg.channel  = hdr.label(emgindx);
> >cfg.hpfilter = 'yes';
> >cfg.hpfreq   = 10;
> >cfg.rectify  = 'yes';
> >emg          = preprocessing(cfg);
> >
> >for j = 1:length(emg.trial)
> >   emg.trial{j} = blc(emg.trial{j});
> >end
> >data         = appenddata([],data,emg);
> >
> >%---freqanalysis-mtmconvol
> >cfg=[];
> >cfg.ouput='pow';
> >cfg.sgn='data';
> >cfg.method='mtmconvol';
> >cfg.channel    = channelselection({'all' 'M1'}, data.label);
> >cfg.foi=2:2:30;
> >numfoi=length(cfg.foi);
> >cfg.t_ftimwin=zeros(1,numfoi);
> >cfg.t_ftimwin(:)=0.5;
> >cfg.tapsmofrq=zeros(1,numfoi);
> >cfg.tapsmofrq(:)=10;
> >cfg.toi=-0.5:0.05:1.0;
> >cfg.taper='dpss';
> >cfg.pad=2;
> >cfg.keeptrials='no';
> >TFRmult=freqanalysis(cfg,data);
> >
> >%---Plotting
> >cfg=[];
> >cfg.baselinetype='relative';
> >cfg.zlim=[-2e-27 2e-27];
> >cfg.showlabels='yes';
> >cfg.channel='C3';
> >singleplotTFR(cfg,TFRmult);
> >
> >
> >Thanking you
> >
> >With regards
> >M.Muthuraman.
> >
> >_________________________________________________________________
> >Tickle your funny bone with Rahul Phondke
> >http://content.msn.co.in/Lifestyle/Moreonlifestyle/LifestyleFB_101106_1455.
>h
> >tm
>
>_________________________________________________________________
>Catch all the cricketing action right here. Live score, match reports,
>photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx

_________________________________________________________________
Share your story and get it featured on MSN
http://content.msn.co.in/Contribute/Default.aspx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pd0306-timefrequencyplot-C3.fig
Type: application/octet-stream
Size: 5356 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20070131/7be8df45/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pd0306-timefrequencyplot-M1.fig
Type: application/octet-stream
Size: 5367 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20070131/7be8df45/attachment-0001.obj>


More information about the fieldtrip mailing list