[FieldTrip] warning: the trial definition in the configuration is inconsistent with the actual data

Dieter Devlaminck dieter.devlaminck at inria.fr
Wed Mar 28 13:07:34 CEST 2012


Dear Eelke,

Thank you for answering so quickly.

> Do keep in mind, though (also for other people on the list, who might
> find this post in the future), that you cannot interpret the
> reconstructed sampleinfo in terms of the original recording anymore.
> This is not an issue with the plotting functions (since you do not
> directly use the manipulated data anyway), but might become relevant
> when you e.g. use ft_databrowser or ft_artifact_zvalue, which can
> return segments of interest in your data, specified in begin and end
> samples.

Indeed, this is the main reason why I asked this question, as it might have repercussions when calling other methods.

Is there a reason why the sampleinfo field disappears when calling the ft_timelockanalysis method? The field is still present in my data after calling the ft_redefinetrial method. I assume the normal operation is that the sampleinfo field is still present as it is normally used by subsequent methods?

A second thing I noticed is that now that I read my file with ft_preprocessing as one continuous trial and then partition my data into trials with ft_definetrials and ft_redefinetrials that the trialinfo (where I set some custom labels with my own trialfun) field has disappeared. If I first call ft_definetrials and the ft_preprocessing the trialinfo field is still there.

Best regards,
Dieter Devlaminck

----- Oorspronkelijk bericht -----
> Van: "Eelke Spaak" <eelke.spaak at donders.ru.nl>
> Aan: "Email discussion list for the FieldTrip project" <fieldtrip at donders.ru.nl>
> Verzonden: Woensdag 28 maart 2012 11:39:05
> Onderwerp: Re: [FieldTrip] warning: the trial definition in the configuration is inconsistent with the actual data
> Dear Dieter,
> 
> You have correctly tracked down the cause of the warning: the actual
> data is inconsistent with a trl-matrix found somewhere in your
> data.cfg (.previous) tree.
> 
> The reason you are getting these warnings is that certain FieldTrip
> functions (apparently including ft_topoplotER and/or some of its
> dependencies) require a data.sampleinfo field in your data structure
> that is consistent with the actual data. In general, data.sampleinfo
> is an Nx2 matrix containing, for each trial in the data, the indices
> of the begin and end sample of that trial, with respect to the
> original data set (on disk). If such a consistent data.sampleinfo does
> not exist, as is the case with your data, fieldtrip will simply
> reconstruct this sampleinfo by using 1 as the begin sample of trial 1,
> and k as its end sample, where k is the number of samples in trial 1.
> Trial 2 will be numbered from k+1 to k+n, where n is trial 2's length,
> etc. This allows all FT functions depending on sampleinfo to function
> adequately. Thus, given that you understand where the warning comes
> from (as is the case), you should not worry about it and can safely
> ignore it.
> 
> Do keep in mind, though (also for other people on the list, who might
> find this post in the future), that you cannot interpret the
> reconstructed sampleinfo in terms of the original recording anymore.
> This is not an issue with the plotting functions (since you do not
> directly use the manipulated data anyway), but might become relevant
> when you e.g. use ft_databrowser or ft_artifact_zvalue, which can
> return segments of interest in your data, specified in begin and end
> samples.
> 
> Best,
> Eelke
> 
> On 28 March 2012 11:26, Dieter Devlaminck <dieter.devlaminck at inria.fr>
> wrote:
> > Dear All,
> >
> > When I try to invoke the 'ft_topoplotER(cfg,GA_FC)' command, I get
> > the
> > following warning
> >
> > Warning: the trial definition in the configuration is inconsistent
> > with the
> > actual data
> >
> > This happens both with the tutorial data as with my own data and is
> > apparently caused by the fact that in the data structure there is a
> > field
> > 'previous' which in turn contains a field 'trl' which contains
> > information
> > on all triggers found in my original data. As I only take the
> > average of the
> > trials corresponding to certain target stimuli with
> > ft_timelockanalysis
> > (using 'cfg.trials = find(data.cfg.trl(:,end));') and then try to
> > make a
> > plot of that, fieldtrip finds an inconsistency in the dimensions and
> > then
> > does some kind of reconstruction, stating the following
> >
> > Warning: reconstructing sampleinfo by assuming that the trials are
> > consecutive segments of a continuous recording
> >
> > This worries me a bit as I do not know exactly what it is doing
> > although the
> > tutorial plot seemed to be the same as the one on the website. What
> > can I do
> > to avoid this warning?
> >
> > I use fieldtrip version 20120308 and matlab R2010b on fedora 14.
> >
> > Thanks in advance,
> > Best regards,
> > Dieter Devlaminck
> >
> > _______________________________________________
> > 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



More information about the fieldtrip mailing list