[FieldTrip] How to obtain the frequency power spectrum of ica components?

Ashley Greene agreene24 at gmail.com
Wed Aug 6 10:11:10 CEST 2014


Hi Eelke,

It worked fine once I just created a new cfg. It's always the small,
overlooked things...

Thanks!!

Ashley


On Wed, Aug 6, 2014 at 4:32 PM, Eelke Spaak <eelke.spaak at donders.ru.nl>
wrote:

> Hi Ashley,
>
> In addition to Roey's remark, in general I would say it is not a good
> idea to explicitly modify the xxx.cfg.previous structure. Just create
> a new cfg from scratch for each FT function call:
>
> cfg = [];
> cfg.method = 'mtmfft';
> cfg.foi = ....
> etc.
>
> compfreq = ft_freqanalysis(cfg, comp);
>
> Best,
> Eelke
>
> On 6 August 2014 09:07, Roey Schurr <roeysc at gmail.com> wrote:
> > Dear Ashly,
> >
> > I'm trying to recreate the error you got, but I couldn't.
> > Did you specify the method? Try using
> >       comp.cfg.previous.method = 'mtmfft';
> >
> > When I run ft_freqanalysis using the mtmfft method on the comp structure
> I
> > get from the ICA tutorial, everything seems to work fine. Did  you try
> > running the same function on a tutorial structure?
> >
> > Best.
> > Roey
> >
> >
> > On Wed, Aug 6, 2014 at 8:12 AM, Ashley Greene <agreene24 at gmail.com>
> wrote:
> >>
> >> Hello,
> >>
> >> I'm somewhat new to ft, so forgive me if this is a seemingly trivial
> >> question.
> >> I ran runica on ft preprocessed MEG data, but I also want to see the
> >> frequency power spectrum of the components. I've tried using
> freqanalysis on
> >> the components in the following manner:
> >>
> >>
> >> comp.cfg.previous.tapsmofrq=4;
> >> comp.cfg.previous.foi=[0:2:30];
> >> comp.cfg.previous.t_ftimwin = 5./comp.cfg.previous.foi;
> >> comp.cfg.previous.toi=[-0.5:0.05:1.5];
> >> comp.cfg.previous.channel='all';
> >>
> >> [freqcomp] = ft_freqanalysis(comp.cfg.previous, comp)
> >>
> >>
> >> // but the errors I receive are as follows:
> >>
> >>
> >> Warning: Input arguments must be scalar.
> >> > In specest/private/ft_preproc_polyremoval at 57
> >>   In ft_specest_mtmfft at 66
> >>   In ft_freqanalysis at 526
> >> ??? For colon operator with char operands, first and last operands must
> be
> >> char.
> >>
> >> Error in ==> ft_preproc_polyremoval at 58
> >> for i = 0:order
> >>
> >> Error in ==> ft_specest_mtmfft at 66
> >>   dat = ft_preproc_polyremoval(dat, polyorder, 1, ndatsample);
> >>
> >> Error in ==> ft_freqanalysis at 526
> >>         [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper',
> >> cfg.taper, options{:}, 'feedback', fbopt);
> >>
> >> // Is using freqanalysis on the components possible? If so, what needs
> to
> >> be modified in order to employ it? If not, is there another method to
> >> outputting the frequency power spectrum of ica components?
> >>
> >> Thanks,
> >>
> >> Ashley
> >>
> >>
> >>
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140806/0fbf4b7d/attachment-0001.html>


More information about the fieldtrip mailing list