visbrain.utils.bipolarization

visbrain.utils.bipolarization(data, chans, to_ignore=None)[source][source]

Bipolarize data.

Channel labels are cleaned and for each channel a “name” and “number” are extracted using the following steps:

1- Remove spaces and remove everything after “-” or “.” in channel name 2- Set as channel “number” the last series of digits in the label 3- Set as channel “name” everything in the cleaned label preceding the

channel number

For example the name and number of channel “EEG1,2-A1” are “EEG1,” and “2”. Bipolarization is done by substracting channels with the same name for successive numbers.

Parameters
dataarray_like

The array of data of shape (nchan, npts).

chanslist

List of channel names of length nchan.

to_ignorelist | None

List of channels to ignore in the bipolarization.

Returns
datararray_like

The re-referenced data.

channelsrlist

List of re-referenced channel names.

considerlist

List of boolean values of channels that have to be considered during the ploting processus.