conpy.restrict_forward_to_sensor_range#

conpy.restrict_forward_to_sensor_range(fwd, dist, picks=None, verbose=None)[source]#

Restrict forward operator to sources within given distance to a sensor.

For each vertex defined in the source space, finds the nearest sensor and discards the vertex if the distance to this sensor the given distance.

Parameters:
fwdinstance of Forward

The forward operator to restrict the vertices of.

distfloat

The minimum distance between a vertex and the nearest sensor (in meters). All vertices for which the distance to the nearest sensor exceeds this limit are discarded.

picksarray-like of int | None

Indices of sensors to include in the search for the nearest sensor. If None, the default, meg channels are used.

verbosebool | str | int | None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:
fwd_outinstance of Forward

A copy of the forward operator, restricted to the given sensor range

See also

restrict_fwd_to_stc

Restrict the forward operator to the vertices defined in a source estimate object.

restrict_fwd_to_label

Restrict the forward operator to specific labels.