[FieldTrip] Epoch using events from a different file

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Oct 2 16:10:06 CEST 2019


Hi Arti,

Have you read the help documentation of ft_redefinetrial? I think it should give you sufficient pointers about how to re-epoch your data. As far as I remember, it does not operate on an event structure in the input, but rather requires (for instance) a trl matrix that has been obtained with ft_definetrial (the latter function operates on an event structure, in combination with a recipe that specifies how to parse the events. This is known as a ‘trialfun', which is possibly of your own making, e.g. if you want to do fancy stuff with your events (e.g. conditional things: if event x was followed by event y within z ms of event q when there was a response half an hour ago then, the epoch should start when event t occurs within three minutes of … (you get the hang of it?)). Please consult http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition/  for more information.

Best wishes,
Jan-Mathijs

On 27 Sep 2019, at 15:52, Arti Abhishek <mailtome.2113 at gmail.com<mailto:mailtome.2113 at gmail.com>> wrote:

Dear Jan-Mathijs,

Thank you for your email. I had a look at the documentation for ft_redefinetrial and I am not sure where I  should give the event information? I haven't used ft_definetrial earlier in the processing pipeline. Does the event data structure (with fields type, value, sample, offset, duration) be given as cfg.trials in fr_redefinetrial?

Thanks,
Arti

Date: Wed, 25 Sep 2019 08:06:57 +0000
From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: Re: [FieldTrip] Epoch using events from a different file
Message-ID: <3512026C-F136-41FD-B03E-490BF8C7FBEF at donders.ru.nl<mailto:3512026C-F136-41FD-B03E-490BF8C7FBEF at donders.ru.nl>>
Content-Type: text/plain; charset="us-ascii"

If you want to re-epoch data that is already in a fieldtrip structure, you need to use ft_redefinetrial, rather than ft_definetrial. Please see the help documentation of the function, and the website for more information.

Best wishes,
Jan-Mathijs

On Wed, Sep 25, 2019 at 5:25 PM Arti Abhishek <mailtome.2113 at gmail.com<mailto:mailtome.2113 at gmail.com>> wrote:
Dear fieldtrip community,

I am really stuck on how to use ft_definetrial when the data and events are in seperate MATLAB strctures (both in fieldtrip format). Please see my original question below. Any help would be appreciated.

Thanks,
Arti

On Sun, Sep 22, 2019 at 11:44 PM Arti Abhishek <mailtome.2113 at gmail.com<mailto:mailtome.2113 at gmail.com>> wrote:
Dear field trip community,

I am trying to epoch an EEG dataset using events from a different  file (ie, events are not present in the EEG file). I have preprocessed the EEG and event information separately. The EEG data is in the fieldtript format with the following fields;

hdr 1 x1 struct
label  64 x 1 cell
time 1 x 1 cell
trial 1 x 1 cell

I want to epoch the data using the event data (also in fieldtrip compatible format) with fields

type, value, sample, offset, duration.

I couldn't find out how to do this. How do I  use ft_definetrial in this case? All my attempts haven't worked yet. I could't find any example in the website or in the discussion list. An example would be much appreciated.

Kind regards,
Arti
_______________________________________________
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/20191002/202bfd9d/attachment.html>


More information about the fieldtrip mailing list