trl information in ft_resampledata

Niels Kloosterman N.A.Kloosterman at UVA.NL
Wed Sep 15 16:08:47 CEST 2010


Hi Hannah,

What you need to do is also resample the start and stop indices in the trl,
as this still contains the indices relative to the sample rate from before
ft_resample. The line of code that did it for me was:

        data.cfg.trl(:,1:3) = round(data.cfg.trl(:,1:3) * (1/cfg.fsample) *
cfg.resamplefs);       %resample the trl indices too or visual artifact
rejection won't work

Where fsample is your original sample rate and resamplefs the sample rate
after resampling. If all is well the trl is now also updated as you discard
trials during visual artefact rejection.

Hope this helps.

Best,
Niels

---

Niels A. Kloosterman MSc.| PhD student | University of Amsterdam | Cognitive
Neuroscience Group | Dept. of Psychology | Roetersstraat 15, A614 | 1018 WB
Amsterdam | Tel: +31 20 525 6847

On 9/15/10 1:45 PM, "Hannah Schulz" <Hannah.schulz at UNI-KONSTANZ.DE> wrote:

> Hello,
>
> I have a problem with a new fieldtrip version (7.9.2010). When I do
> ft_resampledata after preprocessing and then do a reject visual with
> cfg.method='summary' I get this warning :
>
> the input is raw data with 130 channels and 75 trials
> Warning: the trial definition in the
> configuration is inconsistent with the actual
> data
>> In public/private/fixtrialdef at 66
>    In checkdata at 559
>    In ft_rejectvisual at 159
> Warning: failed to create sampleinfo field
>> In public/private/fixtrialdef at 73
>    In checkdata at 559
>    In ft_rejectvisual at 159
>
>
> I also get an empty trl structure in the "artefact free" dataset .
> Unfortunately I do need the proper trl structure for my further
> analysis, could anybody help me how solve that problem? (With an older
> fieldtrip version it workes fine)
> Thank you very much in advance,
> Hannah Schulz
>
>
>
>
>
>
> Dipl. Psych. Hannah Schulz
>
> OBOB-Lab
> University of Konstanz
> Department of Psychology
> P.O. Box D25
> 78457 Konstanz
> Germany
>
> Tel: ++49 - (0)7531 - 88 42 50
> Fax: ++49 - (0)7531 - 88 28 91
> Email: hannah.schulz at uni-konstanz.de
> Homepage: http://www.uni-konstanz.de/obob
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and
> EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100915/1327b764/attachment.html>


More information about the fieldtrip mailing list