Skip to content

Loading BESA .elp montage files skips first channel #10908

@wmvanvliet

Description

@wmvanvliet

Describe the bug

The loader for BESA style .elp montage files is broken. The current code assumed that these type of text files start with the number of channels on the first line. Looking at an example .elp file generated with the BESA simulation software, looking at the official MATLAB reader provided by BESA, this is not the case. Instead, the first line of the .elp montage file contains the information of the first channel. Currently, our loader skips this line and hence misses the information of this channel.

Steps to reproduce

First, download this example file. Then:

import mne
mne.channels.read_custom_montage('simulation.elp')

Expected results

The simulation.elp file contains 33 channels and their positions. The DigMontage object should have all of this informaiton.

Actual results

A DigMontage with 32 channels is returned. The Fp1 channel is missing.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions