<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Danielle,
<div class=""><br class="">
</div>
<div class="">You need to have a close look at what you define to be cfg.channel. This should be a list of channel names: {’somechannel’;’someotherchannel’;’yetanotherchannel’}, or simply ‘all’, rather than a layout structure that you currently provide.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 31 May 2019, at 18:46, Taylor, Danielle <<a href="mailto:danielle.taylor@okstate.edu" class="">danielle.taylor@okstate.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div dir="ltr" class="">
<div class="gmail_default" style="font-family:georgia,serif">Hello Fieldtrippers,</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">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.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">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.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">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.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">The error I get is:</div>
<div class="gmail_default" style="font-family:georgia,serif">Error using load<br class="">
Unknown text on line number 1 of ASCII file C:\Users\danie\fieldtrip\template\layout\biosemi32.lay<br class="">
"Fp1".<br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">Here is the script I have so far:</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
path_ft = 'C:/Users/danie/fieldtrip';<br class="">
path_data = 'C:/Users/danie/OneDrive - Oklahoma A and M System/LEAP/ALE/EEG/SSVEP/';<br class="">
<br class="">
addpath(path_ft);<br class="">
ft_defaults;<br class="">
<br class="">
subjects = {'001' '002' '003' '004' '005' '006' '007' '008' '009' '010'...<br class="">
            '012' '013' '014' '015' '016' '017' '018' '021' '022' '023'...<br class="">
            '025' '026' '027' '029' '031' '032' '033' '035' '036' '037'...<br class="">
            '038' '040' '041' '043' '044' '045' '047' '049' '050' '051'...<br class="">
            '052' '053' '054' '055' '056' '057' '058' '059' '060' '061'...<br class="">
            '062' '063' '064' '065' '066' '067' '068' '069' '070' '071'...<br class="">
            '072' '073' '074' '075' '076'};<br class="">
<br class="">
 load (fullfile(path_ft,'template','layout','biosemi32.lay'));<br class="">
 biosemi32_layout = ft_prepare_layout(cfg);<br class="">
<br class="">
for i=1:length(subjects)<br class="">
    <br class="">
    ftype = 'eeglab_set';<br class="">
    datapath = strcat(path_data, subjects{i});<br class="">
    dataset = fullfile(datapath, strcat(subjects{i},'.set'));<br class="">
<br class="">
    cfg           = [];<br class="">
    cfg.dataset = dataset;<br class="">
    cfg.headerfile = dataset;<br class="">
    cfg.dataformat = ftype;<br class="">
    cfg.headerformat = ftype;<br class="">
<br class="">
    cfg           = [];<br class="">
    cfg.dataset = dataset;<br class="">
    cfg.trialfun  = 'ft_trialfun_general';<br class="">
    cfg.trialdef.eventtype = 'trigger'; <br class="">
    cfg.trialdef.eventvalue = 'B3(5)';  <br class="">
    cfg.trialdef.prestim    = .2;<br class="">
    cfg.trialdef.poststim   = 3; <br class="">
    cfg = ft_definetrial(cfg); </div>
<div class="gmail_default" style="font-family:georgia,serif">    trl           = cfg.trl;<br class="">
    <br class="">
    cfg.dataset = dataset;<br class="">
    cfg.channel = biosemi32_layout;<br class="">
    cfg.outputfile = fullfile(datapath,  'dataPNU');<br class="">
    ft_preprocessing(cfg);<br class="">
end<br class="">
<br class="">
</div>
<div class="gmail_default" style="font-family:georgia,serif">Any assistance would be greatly appreciated!</div>
<div class="gmail_default" style="font-family:georgia,serif">Thank you all,</div>
<div class="gmail_default" style="font-family:georgia,serif"><br class="">
</div>
<div class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">
<p class="MsoNormal"><font class=""><span style="font-size:9.5pt;font-family:Georgia,serif" class="">Danielle Taylor, M.S.</span><span style="font-size:9.5pt" class=""><u class=""></u><u class=""></u></span></font></p>
</div>
<div class="">
<p class="MsoNormal"><font class=""><span style="font-size:9.5pt;font-family:Georgia,serif" class="">Doctoral Candidate,</span><span style="font-size:9.5pt" class=""><u class=""></u><u class=""></u></span></font></p>
</div>
<div class="">
<p class="MsoNormal"><font class=""><span style="font-size:9.5pt;font-family:Georgia,serif" class="">Clinical Psychology</span><span style="font-size:9.5pt" class=""><u class=""></u><u class=""></u></span></font></p>
</div>
<div class="">
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Georgia,serif" class=""><font class="">Oklahoma State University</font></span><span style="color:rgb(80,0,80);font-size:9.5pt" class=""><u class=""></u><u class=""></u></span></p>
</div>
<div style="color:rgb(80,0,80)" class="">
<p class="MsoNormal"><span style="font-size:9.5pt" class=""><u class=""></u> <u class=""></u></span></p>
</div>
<p class="MsoNormal" style="color:rgb(80,0,80)"><i class=""><u class=""><span style="font-size:7.5pt;font-family:Georgia,serif;color:rgb(153,153,153)" class="">Breach of Confidentiality or Accidental Breach of Confidentiality:</span></u></i><i class=""><span style="font-size:7.5pt;font-family:Georgia,serif;color:rgb(153,153,153)" class=""> 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.</span></i></p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>