spectral_connectivity.wrapper.connectivity_to_xarray#
- connectivity_to_xarray(m, method='coherence_magnitude', signal_names=None, squeeze=False, **kwargs)[source]#
Calculate connectivity using method. Returns an xarray with dimensions of [‘time’, ‘frequency’, ‘source’, ‘target’] or [‘time’, ‘frequency’] if squeeze=True
- 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