<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Dear FieldTrip community,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
I am Akshi, a fifth-year student of Integrated Master's (B.Tech + M.Tech) in Computer Science at IIIT-Bangalore, India. I am interested in understanding how brain processes language using EEG data.<br>
<br>
I would like to begin by expressing my gratitude to everyone for maintaining this awesome resource which is of great help to both newcomers and experts alike.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I am using a dataset for which 61 actively-amplified electrodes and one ground electrode were used according to Easycap M10 layout. I have some concerns regarding the preprocessing steps I'm taking. I shall be extremely grateful to get any comment and advice
 on this.<br>
<br>
The raw data has the following structure:<br>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
hdr (1x1 struct)</div>
</div>
</blockquote>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);">
<blockquote style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
label (62x1 cell)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
time (1x1 cell)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
trial (1x1 cell)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
fsample - 500</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
sampleinfo [1, 366525]</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
cfg (1x1 struct)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
</blockquote>
<font face="Calibri, Arial, Helvetica, sans-serif">Here, <i>cfg</i> has <i>refchannel</i> =[ ] and
<i>refmethod</i> = 'avg'. <i>label </i> has total 62 entries which are: 1 to 61 (except 29), VEOG, and aux5.</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">A proc structure containing the preprocessing parameters has been given which includes
<i>trl</i>, <i>badchans</i>, <i>implicitref</i> as 29 and <i>refchannels</i> as 25 and 29.</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">I have used ft_redefinetrial to get epoched data followed by ft_preprocess to apply hpfilter, followed by ft_channelrepair to fill values
 for bad channels (here I added 29 as the missing channel). The data until now has 61 channels.</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">Then I use the following cfg for re-referencing:</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">cfg_reref.implicitref   = '29';
<div>cfg_reref.reref = 'yes';</div>
cfg_reref.refchannel = proc.proc.refchannels;<br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">rereferenced_data = ft_preprocessing(cfg_reref, repaired_data);<br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">Now, the
<i>label</i> of rereferenced_data has 59 channels only.</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><font face="Calibri, Arial, Helvetica, sans-serif">Could someone please tell why this is happening and if the preprocessing steps are in the right order? I can give link to raw data, proc
 file and my script if needed.<br>
<br>
I am working with EEG for the first time. Any help would be highly appreciated.<br>
<br>
Thanking you,<br>
<br>
Sincerely,<br>
Akshi<br>
IIIT-Bangalore, India</font></div>
</body>
</html>