[FieldTrip] Assigning Channels - Error channel layout
Taylor, Danielle
danielle.taylor at okstate.edu
Fri May 31 18:46:00 CEST 2019
Hello Fieldtrippers,
My name is Danielle Taylor, and I have been developing a script that reads in data which have been preprocessed using EEGlab, in order to run a frequency analysis.
I've been successful at compiling an ERP thus far in FieldTrip. However, when I attempted to run a frequency analysis on a particular channel (Oz), it turned out that I could not select this channel, as channels had never been assigned when loading my EEGlab file.
Therefore, I am reformatting my Fieldtrip preprocessing script, but have run into an error. I can't seem to find any record of others running into this error in the discussion either, so I'm not quite sure how to move forward. My guess is that because the file is no longer a bdf (biosemi file), but instead a .set (from eeglab), that there might be problems assigning channels, but that is purely a guess.
The error I get is:
Error using load
Unknown text on line number 1 of ASCII file C:\Users\danie\fieldtrip\template\layout\biosemi32.lay
"Fp1".
Here is the script I have so far:
path_ft = 'C:/Users/danie/fieldtrip';
path_data = 'C:/Users/danie/OneDrive - Oklahoma A and M System/LEAP/ALE/EEG/SSVEP/';
addpath(path_ft);
ft_defaults;
subjects = {'001' '002' '003' '004' '005' '006' '007' '008' '009' '010'...
'012' '013' '014' '015' '016' '017' '018' '021' '022' '023'...
'025' '026' '027' '029' '031' '032' '033' '035' '036' '037'...
'038' '040' '041' '043' '044' '045' '047' '049' '050' '051'...
'052' '053' '054' '055' '056' '057' '058' '059' '060' '061'...
'062' '063' '064' '065' '066' '067' '068' '069' '070' '071'...
'072' '073' '074' '075' '076'};
load (fullfile(path_ft,'template','layout','biosemi32.lay'));
biosemi32_layout = ft_prepare_layout(cfg);
for i=1:length(subjects)
ftype = 'eeglab_set';
datapath = strcat(path_data, subjects{i});
dataset = fullfile(datapath, strcat(subjects{i},'.set'));
cfg = [];
cfg.dataset = dataset;
cfg.headerfile = dataset;
cfg.dataformat = ftype;
cfg.headerformat = ftype;
cfg = [];
cfg.dataset = dataset;
cfg.trialfun = 'ft_trialfun_general';
cfg.trialdef.eventtype = 'trigger';
cfg.trialdef.eventvalue = 'B3(5)';
cfg.trialdef.prestim = .2;
cfg.trialdef.poststim = 3;
cfg = ft_definetrial(cfg);
trl = cfg.trl;
cfg.dataset = dataset;
cfg.channel = biosemi32_layout;
cfg.outputfile = fullfile(datapath, 'dataPNU');
ft_preprocessing(cfg);
end
Any assistance would be greatly appreciated!
Thank you all,
Danielle Taylor, M.S.
Doctoral Candidate,
Clinical Psychology
Oklahoma State University
Breach of Confidentiality or Accidental Breach of Confidentiality: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute, or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190531/369b1fc5/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list