[FieldTrip] Trial definition using events from seperate text file and continous eeg data
Stephen Whitmarsh
stephen.whitmarsh at gmail.com
Wed Jan 23 09:13:32 CET 2019
Hi Ighoyota ben,
You will have to create your own trial definition (trl). In (very) short:
1) read your text file in matlab, using whatever MATLAB functions are
easiest (e.g. dlmread)
2) create a variable called *trl *that contains N rows for N trials, with 3
columns: start, end, and offset in *samples, *with sample numbers starting
from the beginning of you file.
The offset determines t=0, e.g. when you want to read data before the
trigger. E.g., if sampled at 1000Hz, and want trials from -1.0 to 2.0
around your triggers (i.e. 3000 samples), you would have something like
(taking random sample values for where your trials occur):
trl =
[12300, 15300, -1000;
18000, 21000, -1000;
25050, 28050, -1000]
3) enter that in *cfg.trl*, together with your file name in *cfg.dataset*,
and run data = ft_preprocessing(cfg). E.g.:
cfg = [];
cfg.dataset = 'myfile.edf';
cfg.trl = trl;
data = ft_preprocessing(cfg)
I hope this explains the general idea. It will be good to follow a
tutorial, to get the whole run-through. and take extra care to look at the
trial definition part (take e.g. a peak at the cfg.trl)
HTH,
Stephen
On Wed, 23 Jan 2019 at 01:12, Ben Ighoyota Ajenaghughrure <ighoyota at tlu.ee>
wrote:
> Hello All,
>
> I need help creating trial definitions for my continous eeg data using
> events time locked in a seperate text file.
>
> I have my continous eeg data recorded during game interaction without any
> event information.
> The Game events are stored in a text file in miliseconds precission.
>
> Both game and eeg recorder runs on the same PC. To take care time
> synchronisation issues.
>
> My problem is how to define trails for eeg data using the event file
> stored seperately , because currently my eeg data does not have any event
> information.
>
> I am new to fieldtrip but have done this task in eeglab and would love to
> move on to using fieldtrip toolbox.
>
> Looking forward to your support.
>
> Best Regards
>
> Ighoyota ben.
> _______________________________________________
> 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/20190123/548f8727/attachment-0002.html>
More information about the fieldtrip
mailing list