conpy.
restrict_forward_to_vertices
(fwd, vertno_or_idx, check_vertno=True, copy=True, verbose=None)¶Restrict the forward model to the given vertices.
Note
The order of the vertices in vertno_or_idx
does not matter.
Forward objects will always have the vertices ordered by vertex
number. This also means this function cannot be used to re-order
the rows of the leadfield matrix.
The forward operator to restrict the vertices of.
Either, for each hemisphere, the vertex numbers to keep. Or a single list of vertex indices to keep. All other vertices are discarded.
Whether to check that all requested vertices are present in the forward solution and raise an IndexError if this is not the case. Defaults to True. If all vertices are guaranteed to be present, you can disable this check for avoid unnecessary computation.
Whether to operate in place (False
) to on a copy (True
, the
default).
If not None, override default verbose level (see mne.verbose()
and Logging documentation for more).
The restricted forward operator.
See also
select_vertices_sens_distance
Find the vertices within the given sensor distance.