Time Frequency Analysis!

Jan Mathijs Schoffelen Jan.Schoffelen at FCDONDERS.RU.NL
Wed Feb 21 14:46:14 CET 2007


What about specifying a correct time axis?

I would say, that a sampling rate of 800 hertz has a sampling interval of
0.00125 seconds, so your data.time{1} = 0:0.00125:30-0.00125; instead of
what you had.

JM

-----Original Message-----
From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
Of Muthuraman Muthuraman
Sent: Wednesday, February 21, 2007 2:40 PM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] Time Frequency Analysis!

Hi JM,

After changing the padding  to 30 still i get the values from 0.125 to 0.625

and all the other values are Nan's in the TFR.

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, 21 Feb 2007 13:39:33 +0100
>
>Hi Muthu,
>
>Please put cfg.pad at 30.
>As you can read in the frequency analysis tutorials, the cfg.pad is used to
>pad out your data with zeros until the specified length, to obtain the
>spectral interpolation required. I suspect that having your cfg.pad at only
>2, while having a data length which is way longer, you run into problems.
>
>JM
>
>
>-----Original Message-----
>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
>Of Muthuraman Muthuraman
>Sent: Wednesday, February 21, 2007 1:15 PM
>To: FIELDTRIP at NIC.SURFNET.NL
>Subject: Re: [FIELDTRIP] Time Frequency Analysis!
>
>Hello JM,
>
>The time axis in my data which i define from 0 to 30 secs
>
>data1.time{1,1}=0:0.0375:29.99875;
>
>after making the changes it works now but i get the only values from
>
>0.125 to 0.625 and all the other values are Nan's
>
>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, 21 Feb 2007 12:41:24 +0100
> >
> >What's the time-axis in your data?
> >
> >JM
> >
> >-----Original Message-----
> >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
>Behalf
> >Of Muthuraman Muthuraman
> >Sent: Wednesday, February 21, 2007 12:16 PM
> >To: FIELDTRIP at NIC.SURFNET.NL
> >Subject: Re: [FIELDTRIP] Time Frequency Analysis!
> >
> >Hello,
> >
> >A brief on how to do i get the data1, I have the data for 24000 data
>points
> >with 800 Hz sampling rate (30 secs of data), i construct my own data
>format
> >according to the data format specified in fieltrip with
> >data.label,fsample,trial,time.
> >I tried the way you have mentioned with the window length
> >this is what i do
> >
> >cfg=[];
> >winlen=0.5;
> >halfwin=winlen/2;
> >nwin=2.*(30./winlen)-1;
> >cfg.output='pow';
> >cfg.method='mtmconvol';
> >cfg.channel    = channelselection({'all' 'all'}, data1.label);
> >cfg.foi=2:1:30;
> >cfg.t_ftimwin=zeros(1,nwin).*winlen;
> >cfg.toi=[0:halfwin:30-winlen];
> >cfg.taper='hanning';
> >cfg.pad=2;
> >cfg.keeptrials='no';
> >TFRmult=freqanalysis(cfg,data1);
> >
> >and it throws a error
> >??? Subscript indices must either be real positive integers or logicals.
> >
> >Error in ==> freqanalysis_mtmconvol at 424
> >           autspctrmacttap(sgnlop,:) = dum(acttimboi);
> >
> >Error in ==> freqanalysis at 167
> >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data);
> >
> >Please let me know, why do i get this error
> >
> >
> >Thanking you
> >
> >with regards
> >M.Muthuraman.
> >
> > >From: Christian Hesse <c.hesse 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: Mon, 19 Feb 2007 13:12:03 +0100
> > >
> > >Hi Muthuraman,
> > >
> > >ok, in that case you can try the following (this assumes you have
> >windows
> > >of length "winlen" which overlap by "halfwin = winlen/2")
> > >
> > >winlen = 0.5;
> > >% this is in seconds you can also use another time window
> > >halfwin = winlen/2;
> > >
> > >% the total number of windows covering the 30 second period
> > >nwin = 2.*(30./winlen) - 1;
> > >
> > >cfg.method = 'mtmconvol';
> > >cfg.output = 'pow';
> > >cfg.t_ftimwin = ones(1,nwin).*winlen;
> > >cfg.toi = [0:halfwin:30-winlen];
> > >
> > >The important things here to check are
> > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements
> > >2) the times you specify in cfg.toi actually correspond to your time
> >axis
> > >(i.e. do not start before or go on after).
> > >
> > >If you want to use a different overlap, you need to calculate nwin
> > >slightly differently.
> > >
> > >Hope this helps more,
> > >Christian
> > >
> > >
> > >
> > >>Thanks for the suggestion but using the mtmfft which i have done
> >already
> > >>and it works, my interest now is that i would like to use  the Time
> > >>frequency analysis 'mtmconvol'  to estimate the power in  the time
> > >>frequency scale, in which how to get the whole 30secs  continous  data
> >in
> > >>one time frequency plot(TFR).
> > >>
> > >>Thanking you
> > >>
> > >>with regards
> > >>M.Muthuraman.
> > >>
> > >>>From: Christian Hesse <c.hesse 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: Mon, 19 Feb 2007 11:56:19 +0100
> > >>>
> > >>>Hi Muthuraman,
> > >>>
> > >>>>One more question regarding the Time frequency Analysis, i have  EMG
> > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30
> >seconds
> >
> > >>>>of continous data). I would like to do the  Timefrequency  analysis
> >for
> > >>>>this data and to see the power for  the whole 30 seconds
> > >>>
> > >>>use preprocessing to get the EMG data into a single 30s trial (if
>you
> > >>>want to analyze the rectified EMG, then do the rectification  in
> > >>>preprocessing), then use frequanalysis with
> > >>>
> > >>>cfg.method = 'mtmfft';
> > >>>cfg.output = 'pow';
> > >>>
> > >>>this should give you the power spectrum of your EMG data over the
> > >>>entire 30 second period.
> > >>>
> > >>>Regards,
> > >>>Christian
> > >>>
> > >>>
> > >>>---------------------------------------------------------------------

>-
> > >>>Christian Hesse, PhD, MIEEE
> > >>>
> > >>>F.C. Donders Centre for Cognitive Neuroimaging
> > >>>P.O. Box 9101
> > >>>NL-6500 HB Nijmegen
> > >>>The Netherlands
> > >>>
> > >>>Tel.: +31 (0)24 36 68293
> > >>>Fax: +31 (0)24 36 10989
> > >>>
> > >>>Email: c.hesse at fcdonders.ru.nl
> > >>>Web: www.fcdonders.ru.nl
> > >>>---------------------------------------------------------------------

>-
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>_________________________________________________________________
> > >>Tried the new MSN Messenger? It's cool! Download now. http://
> > >>messenger.msn.com/Download/Default.aspx?mkt=en-in
> > >>
> > >
> > >----------------------------------------------------------------------
> > >Christian Hesse, PhD, MIEEE
> > >
> > >F.C. Donders Centre for Cognitive Neuroimaging
> > >P.O. Box 9101
> > >NL-6500 HB Nijmegen
> > >The Netherlands
> > >
> > >Tel.: +31 (0)24 36 68293
> > >Fax: +31 (0)24 36 10989
> > >
> > >Email: c.hesse at fcdonders.ru.nl
> > >Web: www.fcdonders.ru.nl
> > >----------------------------------------------------------------------
> > >
> > >
> > >
> > >
> >
> >_________________________________________________________________
> >Get Married in 2007. Join Shaadi.com
> >http://www.shaadi.com/ptnr.php?ptnr=mhottag
>
>_________________________________________________________________
>Crave for a healthier lifestyle? Ask an expert
>http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm

_________________________________________________________________
Spice up your IM conversations. New, colorful and animated emoticons. Get
chatting! http://server1.msn.co.in/SP05/emoticons/



More information about the fieldtrip mailing list