[FieldTrip] ft_redefinetrials and problems with selecting data afterwards, and averaging

Cécilia Mazzetti Cecilia.Mazzetti at unige.ch
Wed Oct 7 15:30:38 CEST 2020


Thanks a lot Eelke!

I will try immediately and let you know..

Is it the case all the time when using ft_redefinetrials? That one gets errors when trying to average those data?

I hope that's the same causing the problems in the source grandaverage, but I do think so since it doesn't occur if computing the datasets with a different 'trial fun' and not using redefinetrial...



Keep you posted thanks again!!!


Cecilia


Cecilia Mazzetti, Postdoc Researcher

Faculté de médecine de l'Université de Genève

Chemin des Mines 9, 1202 Genève

+41 2237 90992

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Eelke Spaak <e.spaak at donders.ru.nl>
Sent: Wednesday, October 7, 2020 2:57:52 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] ft_redefinetrials and problems with selecting data afterwards, and averaging

Hi Cecilia,

It might help to manually change the time axes for the response-locked
data to something that matches the baseline data (provided the
segments are of equal length). (E.g. dat_resp.time = dat_cue.time; or
something similar.)

Cheers,
Eelke

On Tue, 6 Oct 2020 at 17:58, Cécilia Mazzetti <Cecilia.Mazzetti at unige.ch> wrote:
>
> Hello  everyone,
>
> I keep having this problem and not being able to solve it.
>
> Main goal is to do a source analysis of some data, the baseline is cue locked, while the active window is response locked.
>
>
> When determining the active window, I use redefinetrial (with offset as only parameter) to create the epochs response locked.
>
> This works, but when I try and select some data from this response locked ones, FT gives me an error:
>
>
> Error using  <
>
> Matrix dimensions must agree.
>
> Error in ft_selectdata>getselection_time (line 981)
>
>   if all(cfg.latency<mintime) || all(cfg.latency>maxtime)
>
> Error in ft_selectdata (line 279)
>
> if hastime,    [seltime,    cfg] = getselection_time   (cfg, varargin{:}, cfg.tolerance, cfg.select); end
>
>
>
>
> Also if computing common filters from cue locked and response locked (baseline and active windows) data, I eventually get a vector of zeroes in the avg.pow field when grand averaging the conditions
>
>
>
> pow: [6426x0 double]
>
>
>
>
> maybe some problem in the averaging occurs because of redefine trials?
>
>
>
>
> Thanks in advance to whoever will help!!!
>
>
>
>
>
>
> Cecilia Mazzetti, Postdoc Researcher
>
> Faculté de médecine de l'Université de Genève
>
> Chemin des Mines 9, 1202 Genève
>
> +41 2237 90992
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201007/6ae29631/attachment.htm>


More information about the fieldtrip mailing list