<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 Min-Young,
<div class=""><br class="">
</div>
<div class="">Did you check the original paper that is referenced in the code? I suggest to start there.</div>
<div class=""><br class="">
</div>
<div class="">Also, re-referencing to the average is achieved by <b class="">subtraction</b> of the mean over channels, i.e. : data - mean(data)</div>
<div class="">The line you refer to is <b class="">adding</b> the mean of some variable (data_z) to data, which is not average rereferencing.</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 21 Oct 2020, at 04:06, Min-Young Kim <<a href="mailto:mykim@kriss.re.kr" class="">mykim@kriss.re.kr</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Dear FieldTrippers,<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">I am working with 19 Ch EEG data acquired with Biosemi system. To test re-reference options, I tried average earlobes, common average, and REST methods in the preprocessing. However, I found that the EEG for REST was almost the same
 as the EEG for common average. When I looked at the ft_preproc_rereference.m, the line 141 says<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">>>data_z = G * pinv(Gar, 0.05) * data;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">But then in line 144<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">>>data_z = data + repmat(mean(data_z), size(G,1), 1);<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Isn’t the line 141 enough to generate REST EEG signals? To me, the line 144 seems to be the common average referenced EEG data. I would appreciate if someone explains the meaning of the line 144.<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Thanks,<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Min-Young<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Min-Young Kim, Ph.D.<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Tel: +82) 42 - 868 - 5204 (Office)<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Email:<span class="Apple-converted-space"> </span><a href="mailto:mykim@kriss.re.kr" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mykim@kriss.re.kr</a><o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Quantum Technology Institute<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class="">Korea Research Institute of Standards and Science<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10pt; font-family: "맑은 고딕";" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>