<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle">P {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
</head>
<body style="WORD-WRAP: break-word" fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Hi all,</p>
<p> </p>
<p>When I am using ft_preprocessing to segment the data from the continuous eeg .cnt file I get segments that are exactly the same. That is,
<u>pieces of the data that correspond to different trials and that are exactly the same</u>! I don’t really know if I am doing something wrong or if there is a
<u>problem in the interaction of the ft_preprocessing and the loadcnt function</u>!!!! I am not new using fieldtrip, but I am new with .cnt files.</p>
<p> </p>
<p>I have been checking and trying different things:</p>
<p>1) My trl matrix seems to be properly defined;<br>
2) When I use curry or eeglab to segment the data I don’t get this weird repeated segments;<br>
3) Extracting the original data using ft_read_data and looking into the values that correspond to the samples of the repeated segments show that the original data of those segments is different!<br>
4) Importantly, while I am extracting the segments from the data using ft_preprocessing I get a warning message “events imported with a time shift might be innacurate”… (this do not happen with eeglab and the function for loading .cnt files is apparently the
 same);<br>
5) This is not a problem of only one participant and one of my colleagues is experiencing exactly the same problem.</p>
<p> </p>
<p>Here is the configuration that I am using to run ft_preprocessing</p>
<p> </p>
<p>cfg = </p>
<p>      dataset: 'D:\Subj01\1-OriginalData\Subj01.cnt'<br>
      dataformat: 'ns_cnt32'<br>
      headerformat: 'ns_cnt32'<br>
      eventformat: 'ns_cnt32'<br>
      demean: 'yes'<br>
      baselinewindow: [0 0.2000]<br>
      reref: 'yes'<br>
      refchannel: {'A1'  'A2'}<br>
      implicitref: {'A1'}<br>
      channel: {'all'  '-A1'  '-TP9'  '-TP10'  '-FT10'  '-FT9'  '-Trigger'}<br>
      trl: [312x5 double]</p>
<p><br>
Using this code on the output of the preprocessing shows me that trials 12, 85, 86, 87 and 89 are exactly the same!!!!!
</p>
<p>repeatedtrials =[];<br>
for i = 1:length(PreProcArtifact_cue.trial)<br>
    for j = 1:length(PreProcArtifact_cue.trial)<br>
        if PreProcArtifact_cue.trial{i} == PreProcArtifact_cue.trial{j}<br>
            if i ~= j<br>
                repeatedtrials(1+end,:) = [i j];<br>
            end<br>
        end<br>
    end<br>
end</p>
<p><br>
I uploaded my original data file, my trl matrix and the output of the preprocessing here:
<a href="https://www.dropbox.com/sh/k2nmg50le34v8a0/AAB6odjOx8wnRz10FdG4YlyXa?dl=0">
https://www.dropbox.com/sh/k2nmg50le34v8a0/AAB6odjOx8wnRz10FdG4YlyXa?dl=0</a></p>
<p> </p>
<p>Please can someone check if I am doing something wrong in order to get exactly the same segment in a different sample interval after using ft_preprocessing? It has been really frustrating to try to figure out what can be wrong and I am starting to believe
 that there is a problem in ft_preprocessing while segmenting .cnt files? Can this be the case????</p>
<p> </p>
<p>Thank you very very much!<br>
Inês Bramão<br>
</p>
</div>
</body>
</html>