[FieldTrip] Trial definition using events from seperate text file and continous eeg data
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):
[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)
On Wed, 23 Jan 2019 at 01:12, Ben Ighoyota Ajenaghughrure <ighoyota at tlu.ee>
> 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
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip