Skip to content

support drop_channels method in DigMontage #13386

@sappelhoff

Description

@sappelhoff

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?

@verbose
def remove_fiducials(self, verbose=None):
"""Remove the fiducial points from a montage.
Parameters
----------
%(verbose)s
Returns
-------
inst : instance of DigMontage
The instance, modified in-place.
Notes
-----
MNE will transform a montage to the internal "head" coordinate
frame if the fiducials are present. Under most circumstances, this
is ideal as it standardizes the coordinate frame for things like
plotting. However, in some circumstances, such as saving a ``raw``
with intracranial data to BIDS format, the coordinate frame
should not be changed by removing fiducials.
"""
for d in self.dig.copy():
if d["kind"] == FIFF.FIFFV_POINT_CARDINAL:
self.dig.remove(d)
return self

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions