Extract electrode location from Brainproducts / Brainvision

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.) 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).

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!

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

Hi Mathieu,

thank you for your timely reply.

Here there are the two files:
.bvef: CLA-32.bvef - Google Drive

.rwksp : CLA-32.bvef - Google Drive

And here is the error I get when try to use mne.ead_montage

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

1 Like

@mscheltienne is correct.

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

1 Like

@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

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()
1 Like

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

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.

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!!

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.

Thank you so much!