# Extract electrode location from Brainproducts / Brainvision

**URL:** <https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262>\
**Category:** Support & Discussions\
**Created:** [January 13, 2022, 3:51pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262 "2022-01-13T15:51:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrancescoChiossi](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/francescochiossi/32/426_2.png) [@FrancescoChiossi](https://mne.discourse.group/u/FrancescoChiossi)\
**Post date:** [January 13, 2022, 3:51pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/1 "2022-01-13T15:51:50Z")

</div>

Hello all, I am using MNE-Python version 0.23 on a Windows operating system.  
I am acquiring data via the LSL Labrecorder ([GitHub - labstreaminglayer/App-LabRecorder: An application for streaming one or more LSL streams to disk in XDF file format.](https://github.com/labstreaminglayer/App-LabRecorder)) and obtaining therefore the data in an .XDF file format.

I need to access montage files from a Brainproduct device (32 electrodes, LiveAmp amplifier). And by now I might access their montage files only by mne.channels.read\_montage ([mne.channels.read\_montage — MNE 0.15.dev0 documentation](http://predictablynoisy.com/mne-python/generated/mne.channels.read_montage.html)).

Our data format is .xdf for EEG data and .rwksp or .bvef for electrode locations.

Unfortunately this is available only in the last version which is not stable.

Which are possible alternative solutions to acess the montage files from such device? Thank everyone in advance!

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [January 13, 2022, 4:07pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/2 "2022-01-13T16:07:13Z")

</div>

Hello and welcome,

Could you share the problematic file?  
What do you mean by `the last version which is not stable`? The current stable MNE version is v0.24.1.

Best,  
Mathieu

---

<div class="post-metadata">

**Author:** ![FrancescoChiossi](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/francescochiossi/32/426_2.png) [@FrancescoChiossi](https://mne.discourse.group/u/FrancescoChiossi)\
**Post date:** [January 13, 2022, 4:53pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/3 "2022-01-13T16:53:24Z")

</div>

Hi Mathieu,

thank you for your timely reply.

Here there are the two files:  
.bvef: [CLA-32.bvef - Google Drive](https://drive.google.com/file/d/1butsfNlUmjauO55Agu7lIcJ10ZKSCuh7/view?usp=sharing)

.rwksp : [CLA-32.bvef - Google Drive](https://drive.google.com/file/d/1butsfNlUmjauO55Agu7lIcJ10ZKSCuh7/view?usp=sharing)

And here is the error I get when try to use mne.ead\_montage

 ![error](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/d/d044a516c666dc7aa9242e2b4606a4e1283fcbfe.png)

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [January 13, 2022, 4:58pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/4 "2022-01-13T16:58:38Z")

</div>

`mne.channels.read_montage` has been deprecated in v0.19. I don’t exactly know what the alternative is, but you could try using: [mne.channels.read\_custom\_montage — MNE 0.24.1 documentation](https://mne.tools/stable/generated/mne.channels.read_custom_montage.html)

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [January 13, 2022, 5:19pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/5 "2022-01-13T17:19:41Z")

</div>

@mscheltienne is correct.

```python
mont = mne.channels.read_custom_montage('CLA-32.bvef')
mont.plot()

```

 ![Sensor_positions_(eeg)](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/5/56a80a44dc033c5a9daaba9349fe99141347c5c5.png)

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [January 15, 2022, 4:19pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/6 "2022-01-15T16:19:33Z")

</div>

@FrancescoChiossi, it seems to me like you used an “EasyCap” electrode cap (these are the standard caps that BrainProducts uses for their equipment) with standard 10-20 positions (i.e., you did not record your own electrode locations; let me know if I get this wrong).

I would thus recommend that you use this template: [mne-python/easycap-M1.txt at main · mne-tools/mne-python · GitHub](https://github.com/mne-tools/mne-python/blob/main/mne/channels/data/montages/easycap-M1.txt)

```python
import mne
montage = mne.channels.make_standard_montage(kind="easycap-M1")

# check how it looks
montage.plot()

# apply to your data "raw" and see how it looks
raw.set_montage(montage)
raw.plot_sensors()

```

---

<div class="post-metadata">

**Author:** ![yourmaverick](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yourmaverick/32/1228_2.png) [@yourmaverick](https://mne.discourse.group/u/yourmaverick)\
**Post date:** [January 11, 2023, 6:12pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/7 "2023-01-11T18:12:39Z")

</div>

Hi Stefan,  
Is it the only way to do source localization when we don’t record the location of electrodes?  
We do have the bvef file to find the location and the size of the CAP. We are missing nasion, lpa, rpa information.  
I am new to this.  
Thank you

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [January 11, 2023, 9:37pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/8 "2023-01-11T21:37:30Z")

</div>

I believe for source localization you do need the anatomical landmarks / fiducials (nasion, lpa, rpa), but I have never done that myself, so I hope that others can provide some input here.

---

<div class="post-metadata">

**Author:** ![yourmaverick](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yourmaverick/32/1228_2.png) [@yourmaverick](https://mne.discourse.group/u/yourmaverick)\
**Post date:** [January 17, 2023, 3:48pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/9 "2023-01-17T15:48:44Z")

</div>

Dear Stefan,  
Thank you so much for your reply. I was missing this reply. Sorry for the late response.  
I compared the default EASYCAP-M1 montage and the electrode location file I was using. I think the fiducials/landmarks for the similar type (same company, similar distribution) could be estimated by the size of the cap. I tried this on EASYCAP-M1.txt in the system. It worked. I am repeating this on my EASPCAP 64 channel.

I got a new problem.  
I generated the mne.channels.DigMontage with fiducial and loaded into the coreg GUI. The fiducial landmark could be fitted with MRI fiducials, but the location of the electrode is not showing, which is odd.  
Could you tell me if I did something wrong?

Thank you!!

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [January 18, 2023, 9:39am UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/10 "2023-01-18T09:39:14Z")

</div>

Hey @yourmaverick – please open a new thread for each distinct issue that you are facing. That will help to keep the forum clean: Users can more easily search for similar issues if they are in separate topics.

PS: I have never used the coreg GUI, so I won’t be able to help here, but I am sure somebody else will.

---

<div class="post-metadata">

**Author:** ![yourmaverick](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yourmaverick/32/1228_2.png) [@yourmaverick](https://mne.discourse.group/u/yourmaverick)\
**Post date:** [January 19, 2023, 4:42pm UTC](https://mne.discourse.group/t/extract-electrode-location-from-brainproducts-brainvision/4262/11 "2023-01-19T16:42:44Z")

</div>

Thank you so much!
