[Eeglablist] Version 2026 bug? Unable to rereference to the average reference and add back online ref
Andrew Corcoran
anco at nexs.ku.dk
Fri Jul 31 03:09:14 PDT 2026
If I might belatedly follow up on Arnaud’s reply last month concerning the confusion around rereferencing and channel labels…
I went back to the code I shared and indeed it seems I mistakenly specified Cz twice (deleting the call to pop_chanedit that appended a new Cz channel solved the duplicate channel warning; after calling pop_reref).
What I’m trying to understand is how one should arrive at this solution via the gui, following the instructions on the rereferencing tutorial you linked (which was my original starting point).
I don’t see any way of adding the current reference back into the data via the pop_reref window without first appending a new Cz channel via pop_chanedit and designating it as the reference (even though Cz was explicitly designated as the reference channel at an earlier preprocessing step).
Venlig hilsen
Andrew
Dr. Andrew W. Corcoran
Postdoctoral Researcher
Københavns Universitet
Institut for Idræt og Ernæring<https://urldefense.com/v3/__https://nexs.ku.dk/__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVyhr-iS2w$ >
Nørre Alle 51, 2100 København N
ORCID<https://urldefense.com/v3/__https://orcid.org/0000-0002-0449-4883__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVxZa_KN-Q$ > | Google Scholar<https://urldefense.com/v3/__https://scholar.google.com/citations?user=yxKSfdsAAAAJ&hl=en__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVx6Y-QRzA$ > | ResearchGate<https://urldefense.com/v3/__https://www.researchgate.net/profile/Andrew-Corcoran-5?ev=hdr_xprf__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVyG6JOS5A$ > | Bluesky<https://urldefense.com/v3/__https://bsky.app/profile/corcorana.bsky.social__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVzIjjBwRw$ > | GitHub<https://urldefense.com/v3/__https://github.com/corcorana/__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVxlu6tp5A$ > | OSF<https://urldefense.com/v3/__https://osf.io/user/6brd4__;!!Mih3wA!CPfoOisZw8CE4Ql-MLBBoKDNs_HONbaqlR26oovEblkrKfoqi-R-Rp9iBhsC4BPk8CnfWOQT6M4GEVz_kRBEJA$ >
The issue is that
EEG = pop_reref( EEG, [], 'refloc', struct('labels',{'Cz'}, 'type',{'eeg'}, 'theta',177.4959, 'radius',0.029055, 'X',-9.167, 'Y',-0.4009, 'Z',100.244, 'sph_theta',-177.4959, 'sph_phi',84.77, 'sph_radius',100.6631, 'urchan',EEG.nbchan+1, 'ref',{''}, 'datachan',0) );
Is adding a second channel Cz. If you already have a channel Cz and it does not have coordinates, you should add them instead in the channel editor (or from the command line using pop_chanedit). This is detailed in that page.
https://urldefense.com/v3/__https://eeglab.org/tutorials/05_Preprocess/rereferencing.html__;!!Mih3wA!FzwrfBmBPxLmdJ_Fasn-abQBAUGHpBk41qiqMFzw20WDRK_0wJutkbz3EN7zqsBdDxfK53TfMmd0QWF1HppIzz_d$
Best wishes,
Arno
More information about the eeglablist
mailing list