[FieldTrip] ft_sourcestatistics does not recognize source input data

Cristiano Micheli michelic72 at gmail.com
Mon Jan 2 13:43:57 CET 2017


Dear Markus

Happy new year to you!

It might be about the number of sources declared as 'inside' in your head
volume.
Please double check the indices of your source.inside field because an
error of the type:


*Error in ft_datatype_source (line 187)            val{indx(k)}(1,:,:,:) =
dat{indx(k)};*


might indicate that there is a problem there. In fact if the source.inside
field is empty I would imagine that this error would pop up. However I am
not 100% sure because you did not include your src structures as
attachments.

You might want also to try the option

*dbstop if error *(toggle back with 'dbstop if clear')

to identify the contents of your variable without interrupting the running
functions/scripts
 (it's an automatic breakpoint).


Best of luck!
Cris Micheli




On Mon, Jan 2, 2017 at 1:20 PM, Werkle, Markus <werkle at mpib-berlin.mpg.de>
wrote:

> Dear Jan-Mathijs,
>
> thank you for you fast reply. But unfortunately, removing the fields does
> not change the error message et all.
>
> Best,
> Markus
>
> *********************************************************************
> Dr. Markus Werkle-Bergner, Dipl. Psych.
> Senior Research Scientist (W2)
>
> Jacobs Foundation Research Fellow 2017-2019
>
> Max Planck Institute for Human Development
> Center for Lifespan Psychology
>
> Lentzeallee 94, 14195 Berlin
>
> Tel.: 0049 (0)30 82406 447 Fax.: 0049 (0)30 824 99 39
> Mail: werkle at mpib-berlin.mpg.de
> http://www.mpib-berlin.mpg.de/en/staff/markus-werkle-bergner
> *********************************************************************
>
> ________________________________________
> Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]"
> im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [
> jan.schoffelen at donders.ru.nl]
> Gesendet: Montag, 2. Januar 2017 12:50
> An: FieldTrip discussion list
> Betreff: Re: [FieldTrip] ft_sourcestatistics does not recognize source
> input data
>
> Markus,
>
> Can you remove the self-baked fields ‘stim’ and ‘rating’ and try again
> please?
> Thanks,
> BW,
> JM
>
>
> J.M.Schoffelen
> Senior Researcher, VIDI-fellow
> Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
>
>
>
>
>
>
> > On 02 Jan 2017, at 12:41, Werkle, Markus <werkle at mpib-berlin.mpg.de>
> wrote:
> >
> >
> > Dear Fieldtrippers,
> >
> >
> > happy new year to everyone here!
> >
> > This is the second attempt to get help on an issue with
> ft_sourcestatistics. As I still can not figure out where the problem
> resides, I give it a new try.
> >
> > My goal is to use a common DICS filter to reconstruct single-trial data
> in three conditions. Afterwards, I want to run a test for a linear effect
> across the conditions. I thought to follow closely the descriptions in
> http://www.fieldtriptoolbox.org/example/common_filters_in_beamforming ,
> especially in the way I extract the single-trial data. However, when I run
> ft_sourcestatistics, the single trial source data is not recognized as
> source data ...
> >
> > Any ideas on what went wrong?
> >
> > Below is the code and error-messages:
> >
> >
> >
> > When I run the code below:
> >
> > %-----------------------------------------------------------
> -----------------------------------------------
> > src_descrcfg = [];
> > src_descrcfg.keeptrials = 'yes';
> > src00 = ft_sourcedescriptives(src_descrcfg,src00);
> > src01 = ft_sourcedescriptives(src_descrcfg,src01);
> > src11 = ft_sourcedescriptives(src_descrcfg,src11);
> >
> >
> > src_statscfg = [];
> > src_statscfg.parameter   = 'trial.pow';
> > src_statscfg.method      = 'analytic';
> > src_statscfg.statistic   = 'indepsamplesregrT';
> > src_statscfg.alpha       = 0.05;
> > src_statscfg.correctm    = 'no';
> >
> > src_statscfg.design(1,:)  = [ones(1,src00.df) 2*ones(1,src01.df)
> 3*ones(1,src11.df)];
> > src_statscfg.ivar         = 1; % the 1st row in cfg.design contains the
> independent variable
> >
> > src_stat = ft_sourcestatistics(src_statscfg, src00, src01, src11);
> > %-----------------------------------------------------------
> -----------------------------------------------
> >
> > I get the following output and error message:
> >
> > original data contained 201 trials
> > the call to "ft_sourcedescriptives" took 0 seconds and required the
> additional allocation of an estimated 48 MB
> > original data contained 113 trials
> > the call to "ft_sourcedescriptives" took 0 seconds and required the
> additional allocation of an estimated 0 MB
> > original data contained 46 trials
> > the call to "ft_sourcedescriptives" took 0 seconds and required the
> additional allocation of an estimated 0 MB
> > Index exceeds matrix dimensions.
> >
> > Error in ft_datatype_source (line 187)
> >            val{indx(k)}(1,:,:,:) = dat{indx(k)};
> >
> > Error in ft_checkdata (line 251)
> >  data = ft_datatype_source(data);
> >
> > Error in ft_sourcestatistics (line 100)
> >  varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'source',
> 'feedback', 'no');
> >
> >
> >
> > src00, src01, and src11 are source-solutions from a dics-beamformer with
> the following content:
> >
> >
> > src00 =
> >
> >          freq: 9.7656
> >     cumtapcnt: [201x1 double]
> >           dim: [27 36 30]
> >        inside: [29160x1 logical]
> >           pos: [29160x3 double]
> >        method: 'rawtrial'
> >         trial: [1x201 struct]
> >            df: 201
> >           cfg: [1x1 struct]
> >    sampleinfo: [201x2 double]
> >        rating: [201x2 double]
> >          stim: {201x3 cell}
> >
> >
> > The source-solutions were based on a common dics-filter after running
> the following code:
> >
> > %-----------------------------------------------------------
> -----------------------------------------------
> > % compute single trial spectra
> > mtmfftcfg.keeptrials = 'yes';
> > mtmfft_singletrl = ft_freqanalysis(mtmfftcfg,data);
> >
> > % project all trials through common spatial filter %
> > dics_alltrl_cfg = [];
> > dics_alltrl_cfg = dics_commoncfg;
> > dics_alltrl_cfg.grid.filter = dics_common.avg.filter; % use the common
> filter computed in the previous step!
> > dics_alltrl_cfg.rawtrial    = 'yes';      % project each single trial
> through the filter. Only necessary if you are interested in reconstructing
> single trial data
> >
> > tmp_dics_all = ft_sourceanalysis(dics_alltrl_cfg, mtmfft_singletrl); %
> contains the source estimates for all trials/both
> > %-----------------------------------------------------------
> -----------------------------------------------
> >
> >
> > Any ideas, why the data is not recognized as source-data when calling
> ft_sourcestatistics (obviously it is recognized correctly with
> ft_sourcedescriptives ...).
> >
> >
> > Thank you very much for your help.
> >
> > Best regards,
> > Markus
> >
> >
> >
> > *********************************************************************
> > Dr. Markus Werkle-Bergner, Dipl. Psych.
> > Senior Research Scientist (W2)
> >
> > Jacobs Foundation Research Fellow 2017-2019
> >
> > Max Planck Institute for Human Development
> > Center for Lifespan Psychology
> >
> > Lentzeallee 94, 14195 Berlin
> >
> > Tel.: 0049 (0)30 82406 447 Fax.: 0049 (0)30 824 99 39
> > Mail: werkle at mpib-berlin.mpg.de
> > http://www.mpib-berlin.mpg.de/en/staff/markus-werkle-bergner
> > *********************************************************************
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170102/528242d8/attachment-0002.html>


More information about the fieldtrip mailing list