This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
analysis:course-w16:week7 [2016/02/05 16:08] mvdm [Loading Neuralynx data into FieldTrip] |
analysis:course-w16:week7 [2018/07/07 10:19] (current) |
||
---|---|---|---|
Line 205: | Line 205: | ||
=== Processing Neuralynx events files (.nev) === | === Processing Neuralynx events files (.nev) === | ||
- | Apart from neural data stored in ''.ncs'' and ''.ntt'' files, the Neuralynx system also stores //events// in a file called ''Events.Nev'' (see [[analysis:nsb2015:week2|Module 2]] for details). Here is an example usage for the specific task in this data: | + | Apart from neural data stored in ''.ncs'' and ''.ntt'' files, the Neuralynx system also stores //events// in a file called ''Events.Nev'' (see [[analysis:course-w16:week2|Module 2]] for details). Here is an example usage for the specific task in this data: |
<code matlab> | <code matlab> | ||
Line 445: | Line 445: | ||
%% load the data | %% load the data | ||
fc = FindFiles('*.ncs'); % get filenames of all LFPs recorded | fc = FindFiles('*.ncs'); % get filenames of all LFPs recorded | ||
- | data = ft_read_neuralynx_interp(fc); % load them all -- this will take a while | + | data_all = ft_read_neuralynx_interp(fc); % load them all -- this will take a while |
data_all.hdr.Fs = data_all.fsample; % for some reason this is missing from the header | data_all.hdr.Fs = data_all.fsample; % for some reason this is missing from the header | ||
Line 451: | Line 451: | ||
cfg = []; | cfg = []; | ||
cfg.layout = 'ordered'; cfg.channel = data.label; | cfg.layout = 'ordered'; cfg.channel = data.label; | ||
- | layout = ft_prepare_layout(cfg, data); | + | layout = ft_prepare_layout(cfg, data_all); |
</code> | </code> | ||