mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

support drop_channels method in DigMontage

Open sappelhoff opened this issue 4 months ago • 1 comments

I would like to add a remove_channels method to

https://mne.tools/dev/generated/mne.channels.DigMontage.html#mne.channels.DigMontage

Could this be as simple as adjusting the remove_fiducials method?

https://github.com/mne-tools/mne-python/blob/ace9381898b3ad9da9590a3d0b99abedaa74e033/mne/channels/montage.py#L677-L702

The reason I need this is that I am working w ith an experimental montage, which I obtain by "tuning" an existing montage (renaming, dropping).

sappelhoff avatar Aug 18 '25 12:08 sappelhoff

I think the public API should probably be remove_channels to match that of our other classes (e.g., Raw). But what you do under the hood could be refactoring remove_fiducials to be _remove_dig_points(...) and then make the public remove_fiducials and remove_channels both make use of _remove_dig_points for example

larsoner avatar Aug 20 '25 19:08 larsoner