Re-referencing the active electrodes

Hello every body ,

May I have your attention please !

I want to share my problem with you , Please help me If anyone know the solution.

I have recorded the EEG data from 8 different locations of scalp with reference electrode on ear lobe say E1, also I put another active electrode on second ear lobe say E2 . After recording I have total 9 channel data this includes (8 data scalp channels and 1 from Ear lobe E2 ).

I want to re-reference the my recorded 8 channel data. Please tell me how to do re-referencing in this case using matlab . Or atleast please clear me the concept how to do that exactly step by step . [B]I want to apply or use any software like EEGlab or filed trip for instance.[/B]

I will be very thankful to all of you.

Best Regards
Faisal

Hi Faisal,

You want to re-reference your recordings to what reference exactly? If I understand, your recordings were recorded using one reference E1.
A re-referencing operation is simply a subtraction (electrode value - reference value) and you don’t need any advanced software for doing that, but you need to define clearly what your objective is.

There are easy ways to manipulate your recordings using Brainstorm, but you would have to get familiar with this environment before. I recommend you start by reading and following the 12+3 introduction tutorials: http://neuroimage.usc.edu/brainstorm/Tutorials

Cheers,
Francois

[QUOTE=Francois;6128]Hi Faisal,

You want to re-reference your recordings to what reference exactly? If I understand, your recordings were recorded using one reference E1.
A re-referencing operation is simply a subtraction (electrode value - reference value) and you don’t need any advanced software for doing that, but you need to define clearly what your objective is.

There are easy ways to manipulate your recordings using Brainstorm, but you would have to get familiar with this environment before. I recommend you start by reading and following the 12+3 introduction tutorials: http://neuroimage.usc.edu/brainstorm/Tutorials

Cheers,
Francois[/QUOTE]
Thanks afor the reply

[B]You want to re-reference your recordings to what reference exactly?

[B] Wanna re-reference to E2.[/B]

Then you just need to subtract the values of E2 from your signals.

Example of electrode F1:
What is currently saved in the file is currently (F1-E1), because E1 was your initial reference.
If you calculate (F1-E2), it would be in implicitly (F1-E1-E2) = (F1-(E1+E2))
This is your joint reference E1+E2

Francois

[QUOTE=Francois;6134]Then you just need to subtract the values of E2 from your signals.

Example of electrode F1:
What is currently saved in the file is currently (F1-E1), because E1 was your initial reference.
If you calculate (F1-E2), it would be in implicitly (F1-E1-E2) = (F1-(E1+E2))
This is your joint reference E1+E2

Francois[/QUOTE]

[B]Should i dont use (F1-(E1+E2)/2) …I mean average of E1 and E2 ? [/B]

You can’t, as you don’t have anymore the values of E1.

[QUOTE=Francois;6136]You can’t, as you don’t have anymore the values of E1.[/QUOTE]

I mean in my case (active electrodes) , I have recorded my data using reference electrode at E1, while at the same time E2 (active electrode) was recorded with reference to E1.

[B]Then in which case we could do average referencing ? [/B]

I found this statement from the [B]erp.info[/B]

"If the data were recorded with A1 as the reference, and A2 was recorded with A1 as the reference , you could re-reference the first few channels to the [B]average of A1 and A2 by subtracting half of A2 from the other channels[/B]:

[B]Ch1 = ch1 – ch15/2 label F3

Ch2 = ch2 – ch15/2 label F4[/B]

[B]Is this the same as you suggest me above ? i am asking you because this makes me confuse [/B], :frowning:

Yes, it sounds coherent, and it is better than what I suggested.

If A1 is the original reference, E1 any electrode and A2 your other reference (recorded with A1 as the reference):
E1 - 0.5A2
= (E1 - A1) - 0.5
(A2 - A1)
= E1 - A1 + 0.5A1 - 0.5A2
= E1 - (A2 + A1)/2
= E1 referenced to the averaged of A1 and A2

Please not that this is a forum to ask questions about the Brainstorm software. I would be happy to help you using this environment.
I’m not an EEG expert, so for pure EEG related questions I suggest you ask questions to a more EEG-oriented community.

Cheers,
Francois

[QUOTE=Francois;6138]Yes, it sounds coherent, and it is better than what I suggested.

If A1 is the original reference, E1 any electrode and A2 your other reference (recorded with A1 as the reference):
E1 - 0.5A2
= (E1 - A1) - 0.5
(A2 - A1)
= E1 - A1 + 0.5A1 - 0.5A2
= E1 - (A2 + A1)/2
= E1 referenced to the averaged of A1 and A2

Please not that this is a forum to ask questions about the Brainstorm software. I would be happy to help you using this environment.
I’m not an EEG expert, so for pure EEG related questions I suggest you ask questions to a more EEG-oriented community.

Cheers,
Francois[/QUOTE]

Thanks alot for your help . :slight_smile:

Hello François,

I’m helping with an SSEP project and I have a few questions:

  1. Is it possible to separate channels or divide them (from one recording) in order to get separate recordings in the goal of applying different processes ? In our situation we have external electrodes recording body activity and EEG electrodes so the re-referencing cant be the same for each group, and all other processes in fact.
  2. I would like to re-reference in binary so for example, EX2 to EX1 and EX3 to EX4 on the same recording… How could I do that ?
  3. for the electrodes placed on the body I would like to clean cardiac artifact, is it okay if I first identify cardiac artifacts through : events>detect cardiac events and once they’re correctly identified process an SSP for heartbeats ?

Thank you so much !

Hi Beatrice,

  1. Splitting the files to obtain one file with a subset of the electrodes is not doable with the interface, you’d have to modify the files structures by yourself. However, most pre-processing functions have an option “Sensor types or names” to process only a specific subset of the channels. You can either decide to enter manually the list of the channels to process, or change the type of some of the channels (eg. edit the channel file and set the type of the EX* channels to “EX”)

  2. You can create a custom montage to apply for instance a common reference to the EEG channels AND a bipolar montage for the EX channels. You’ll be able to display all your channels in the same “time series” windows, whether the EX* channels are set as “EEG” or as another type.
    https://neuroimage.usc.edu/brainstorm/Tutorials/MontageEditor

  3. SSP and ICA are techniques that work only with large arrays of signals (EEG or MEG caps), their goal is to identify the specific spatial patterns of a specific artifact on a sensor array. There techniques are not applicable to isolated electrodes. But on the other hand, if your isolated electrodes are bipolar recordings, you should not have a lot of cardiac artifact visible in there, unless they are on the chest. Do you?

Francois

  1. Thank you i'll try that, it's exactly what I need!

  2. Great !

  3. Lots of cardiac artifacts are visible on the external (on the body electrodes) L1 (active)- either (L3 or iliac crest or supraombilical region; they are testing). They might add as reference C5, testing that one as well.

  1. What I do is edit the channel file naming the reference "EEG-ref" and the others EEG
    The problem is with the external montage (body) for which I have 2 different pairs of electrodes that each need to be re-referenced to the passive ones. For example, EXG-3 reference to EXG4 with label EMG. Unfortunately there s not enough naming option possible with references for me to do so and pair them (as the only other option is MEG and I cant compute my analysis after). Can I just create new specific labels ?

How do I create a bipolar montage on brainstorm from a monopolar one ? Just with the tutorial you suggested ?

What I do is edit the channel file naming the reference "EEG-ref" and the others EEG

Why do you need to rename channels?
Are you changing the NAME or the TYPE of the channels?

The problem is with the external montage (body) for which I have 2 different pairs of electrodes that each need to be re-referenced to the passive ones. For example, EXG-3 reference to EXG4 with label EMG. Unfortunately there s not enough naming option possible with references for me to do so and pair them (as the only other option is MEG and I cant compute my analysis after). Can I just create new specific labels ?

I don't really get what the problem is.
I guess what you call a "label" here is the "type" of the channels?
Why do you need to change the types of the channels? Leave all the EEG (including the references) with the type "EEG" and all the EMG (all the pairs) with the type "EMG".

How do I create a bipolar montage on brainstorm from a monopolar one ? Just with the tutorial you suggested ?

What you want is to create a display where you can see both the EEG (common reference or "monopolar") and the EMG (pairs of bipolar channels)?
Start by creating a re-referencing montage to reference correctly the EEG to its reference (https://neuroimage.usc.edu/brainstorm/Tutorials/MontageEditor#Re-referencing_montage) then add some lines at the end for your bipolar channels. For example:

EMG1 : EXG1, -EXG2
EMG2 : EXG3, -EXG4

Sorry I explained it wrong I did exactly as you told and changed the type. So yes that is exactly what I did , I put EEG and EMG as the types. I want to make sure for the EMG that I re-reference EXG1 to EXG2 and EXG 3 to EXG4 for example as pairs of bipolar channels yes.

Perfect i'll try what you suggested for the montage !

Just to make sure for another detail, If I want EXG5 (EMG) as a reference to A1 (EEG-ref) which is the reference to all the EEG electrodes should I just first create a process in the re-reference EEG option as EXG5 reference channel to sensor types or names A1. Then as a second step A1 as reference channel and sensor types or names EEG (all) ?

Thank you so much

Keep the type of the EXG* channels as "EMG".
For display purposes, do not use the process "Re-reference EEG". Instead, create a re-referencing montage that you can edit freely and include, as I suggested previously:
https://neuroimage.usc.edu/brainstorm/Tutorials/MontageEditor

If you want the re-referencing to be used for further analysis steps that are not linear (ie. other than averaging, filtering, source estimation), use the process "Re-reference EEG" but only for the EEG.

For saving permanently the re-referenced values (ie. if you want to export the recordings outside of Brainstorm) or if you need to process the EMG signals, you could use the process "Standardize > Apply montage" with the montage you created previously for display.

Dear François,

I have a question about re-referencing in Brainstorm. In tutorial, it is written that we can do it simply by 'Standardize -> Re-reference EEG' and then we can use some EEG reference channel(s). If, for example, I put 'M1, M2' would it be the averaged M1 and M2? And if no, how can I use the average value of two mastoids (M1 and M2) as a reference?

Thank you!

The process "Re-reference EEG" with input "M1,M2" should define the same montage as when using the montage editor menu "New re-referencing montage (linked ref)", but as a linear operator really applied to the signals (while the montage editor re-references the data for display only).

Both define a montage that subtracts (1*M1 + 1*M2)/(1+1) = (M1+M2)/2 from all the signals.

Thank you very much!