<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div dir="ltr">
<div>
<div id="divExp" class="divExp" style="position: relative; width: auto; margin: 0px 0px 0px 4px; padding-left: 10px; z-index: 0; font-family: 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 13px;">
<div id="divSelDisplay" class="unselected" style="position: relative; z-index: 0; top: -18px; padding-right: 15px; padding-bottom: 1px;">
<div id="divExpSubHdr" style="position: relative; height: 14px; padding-top: 7px; width: 1105px;">
<div id="divSubSent" style="position: absolute; right: 0px; width: 250px; text-align: right; bottom: 2px;">
<br>
</div>
</div>
</div>
<div id="divBdy" class="bdyItmPrt" _fallwcm="1" style="font-size: medium; word-wrap: break-word; width: auto; overflow: hidden; position: relative; top: -5px; padding: 0px 15px 15px 0px; clear: both;">
<div dir="ltr"><font face="Tahoma" size="2" color="black">
<div>Hello Everybody,</div>
<div><br>
</div>
<div>I'm just starting to use FieldTrip and I have some very basic questions.</div>
<div><br>
</div>
<div>I'm trying to analyze LFP data along with the spikes which is in Plexon format. </div>
<div><br>
</div>
<div>For the preprocessing part I tried to read it as continuous data so I did</div>
<div>
<div><font color="blue">clear all</font></div>
<div><font color="blue">close all</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg = [];</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg.dataset = 'fr041110a_nat1.plx'; %reading the data</font></div>
<div><font color="blue">data_org = ft_preprocessing(cfg);</font></div>
</div>
<div><font color="blue"><br>
</font></div>
<div>It gave me this error with 32 u int thing</div>
<div><br>
</div>
<div>
<div><font color="red">Error using timestamp_plexon (line 27)</font></div>
<div><font color="red">invalid input</font></div>
<div><font color="red"><br>
</font></div>
<div><font color="red">Error in ft_read_data (line 1064)</font></div>
<div><font color="red"> ts = timestamp_plexon(tsl, tsh); % use helper function, this returns an uint64 array</font></div>
<div><font color="red"><br>
</font></div>
<div><font color="red">Error in ft_preprocessing (line 573)</font></div>
<div><font color="red"> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample',</font></div>
<div><font color="red"> endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'),</font></div>
<div><font color="red"> 'dataformat', cfg.dataformat);</font></div>
<div><font color="red"><br>
</font></div>
<div><font color="red">Error in LFP (line 8)</font></div>
<div><font color="red">data_org = ft_preprocessing(cfg);</font></div>
<div><font color="red"><br>
</font></div>
<div><br>
</div>
<div> I though this was probably due to reading it as continuous data or something I couldn't figure out so i tried using the example to see if the code runs </div>
<div><br>
</div>
<div>
<div><font color="blue">clear all</font></div>
<div><font color="blue">close all</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg = [];</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg.dataset = 'fr041110a_nat1.plx'; %reading the data</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">hdr = ft_read_header(cfg.dataset);</font></div>
<div><font color="blue">event = ft_read_event(cfg.dataset);</font></div>
<div><font color="blue"> </font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg.trialfun = 'ft_trialfun_general'; % this is the default</font></div>
<div><font color="blue">cfg.trialdef.eventtype = 'Strobed'</font></div>
<div><font color="blue">cfg.trialdef.eventvalue = 35; % the value of the stimulus trigger for fully incongruent (FIC).</font></div>
<div><font color="blue">cfg.trialdef.prestim = 0.5; % in seconds</font></div>
<div><font color="blue">cfg.trialdef.poststim = 1; % in seconds</font></div>
<div><font color="blue">cfg.channel = {'AD01' 'AD03'};</font></div>
<div><font color="blue">cfg.continuous = 'yes';</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">trl = [];</font></div>
<div><font color="blue"> </font></div>
<div><font color="blue">for i=1:length(event)</font></div>
<div><font color="blue"> if strcmp(event(i).type, cfg.trialdef.eventtype)</font></div>
<div><font color="blue"> % it is a trigger, see whether it has the right value</font></div>
<div><font color="blue"> if ismember(event(i).value, cfg.trialdef.eventvalue)</font></div>
<div><font color="blue"> % add this to the trl definition</font></div>
<div><font color="blue"> begsample = event(i).sample - cfg.trialdef.prestim*hdr.Fs;</font></div>
<div><font color="blue"> endsample = event(i).sample + cfg.trialdef.poststim*hdr.Fs - 1;</font></div>
<div><font color="blue"> offset = -cfg.trialdef.prestim*hdr.Fs; </font></div>
<div><font color="blue"> trigger = event(i).value; % remember the trigger (=condition) for each trial</font></div>
<div><font color="blue"> trl(end+1, :) = [round([begsample endsample offset]) trigger]; </font></div>
<div><font color="blue"> end</font></div>
<div><font color="blue"> end</font></div>
<div><font color="blue">end</font></div>
<div><font color="blue"><br>
</font></div>
<div><font color="blue">cfg = ft_definetrial(cfg);</font></div>
<div><font color="blue">data_org = ft_preprocessing(cfg);</font></div>
</div>
</div>
<div><br>
</div>
<div>And I just used the trl loop from the example give in the website because i kept getting error saying the trial is not defined. However even after putting the code I still get the same error.</div>
<div><br>
</div>
<div>
<div><font color="red">Error using ft_definetrial (line 184)</font></div>
<div><font color="red">no trials were defined, see FT_DEFINETRIAL for help</font></div>
<div> </div>
<div>I don't know what else should I try because I'm having trouble just doing the preprocessing. Your help will be very much appreciated.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Sarita</div>
</div>
</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>