Skip to content

Generate sensor connectivity

Christian Brodbeck edited this page Mar 31, 2020 · 1 revision

When using EEG data for which there is no pre-specified connectivity.

Assuming raw is an mne-python Raw object, initialize a sensor dimension:

>>> sensor = load.fiff.sensor_dim(raw.info)

Generate a connectivity based on distance and plot it; change the distance parameter until it is approximately right:

>>> sensor.set_connectivity(connect_dist=1.75)
>>> plot.SensorMap(sensor, connectivity=True)

Then print the connectivity so it can stored, and edit to fine-tune:

>>> sensor.get_connectivity()