[FieldTrip] FW: From a .csv data file, to a recognized dataset by fieldtrip
gj
gina.joue at univr.it
Wed Apr 27 18:24:16 CEST 2016
Hi Mina,
I'm definitely not a FieldTrip expert, but I recently did something
similar with .dat files that was just tab-delimited EEG data in the
format [nsamples x nchan].
I followed this page closely:
http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat
Basically, I created the following FT data structure:
data.label % [nchan x 1] cell array of string labels for channels
data.fsample % sampling frequency in Hz
% for each trial t:
data.trial{t} = load('eeg.dat'); % load your EEG data file -- should be
[nchan x nsamples]
data.time{t} % [1 x nsamples] vector corresponding to the time axis for
each trial in SECONDS at each sampling point!
If you've set all of that, you should be able to doublecheck your data
by plotting it, e.g.
cfg = [];
cfg.viewmode = 'vertical'; % 'butterfly" superimposes channels
cfg.continuous = 'no';
ft_databrowser(cfg,data);
To prepare your channel layouts in FT data format, it seems like you
need the electrodes in the ff formats
1. in mm in MNI coordinates and FT 2-D data format (see also templates
in your FT subfolder: template/electrode/). If you don't have this, you
can prepare your channel layout by using ft_prepare_layout() (check out
the comments in the code or 'help ft_prepare_layout'). Then check that
you've set up your data structure correctly with ft_plot_lay();
2. in phi/theta coordinates of FT_DATATYPE_SENS format (some templates
in FT subfolder template/layout/). Check out "help FT_DATATYPE_SENS"
Your fiducials should be at the beginning of the list of your channels.
Hope that is somewhat useful.
Good luck!
g
More information about the fieldtrip
mailing list