spectral_connectivity.wrapper.multitaper_connectivity#

multitaper_connectivity(time_series, sampling_frequency, time_window_duration=None, method=None, signal_names=None, squeeze=False, connectivity_kwargs=None, **kwargs)[source]#

Transform time series to multitaper and calculate connectivity using method. Returns an xarray.DataSet with dimensions of [‘Time’, ‘Frequency’, ‘Source’, ‘Target’] or [‘Time’, ‘Frequency’] if squeeze=True. Its Data variables are measures

Parameters:
  • signal_names (iterable of strings) – Sames of time series used to name the ‘Source’ and ‘Target’ axes of xarray.

  • squeeze (bool) – Whether to only take the first and last source and target time series. Only makes sense for one pair of signals and symmetrical measures.

time_series#

(n_time_samples, n_signals)

Type:

array, shape (n_time_samples, n_trials, n_signals) or

sampling_frequency#

Number of samples per time unit the signal(s) are recorded at.

Type:

float

method#

Method used for connectivity calculation. If None, all available measures are calculated

Type:

iterable of strings, optional

time_window_duration#

Duration of sliding window in which to compute the fft. Defaults to the entire time if not set.

Type:

float, optional

signal_names#

Sames of time series used to name the ‘Source’ and ‘Target’ axes of xarray.

Type:

iterable of strings

squeeze#

Whether to only take the first and last source and target time series. Only makes sense for one pair of signals and symmetrical measures.

Type:

bool

connectivity_kwargs#

Arguments to pass to connectivity calculation

Type:

dict

Returns:

connectivities

Return type:

Xarray.Dataset with connectivity measure(s) as data variables