dirconn.ImCoh#

class dirconn.ImCoh(segment_length: float | None = None, time_halfbandwidth: float = 4.0, fmin: float = 0.0, fmax: float | None = None)#

Imaginary part of coherency (Nolte et al. 2004), per frequency.

values[i, j, f] = Im(C_ij(f)), between -1 and 1. It is antisymmetric (values[j, i] = -values[i, j]), and positive when j lags i at that frequency (phase between 0 and pi). The sign is a phase, not a direction of influence: it flips every half cycle of delay, so the measure is undirected (info.directed is False); score its magnitude. The diagonal is undefined (NaN).

Parameters:
  • segment_length (float, optional) – Segment length in seconds; required for continuous data, optional for epoched data (every trial is then cut on its own, otherwise every trial is one segment). It sets the frequency resolution, 1 / segment_length Hz, so it has no default.

  • time_halfbandwidth (float) – Time-half-bandwidth product NW of the tapers (at least 1).

  • fmin (float) – Frequency range in Hz, inclusive; fmax defaults to the Nyquist frequency. The frequencies are the native bins of the segment length, so there is no n_freqs.

  • fmax (float) – Frequency range in Hz, inclusive; fmax defaults to the Nyquist frequency. The frequencies are the native bins of the segment length, so there is no n_freqs.

__init__(segment_length: float | None = None, time_halfbandwidth: float = 4.0, fmin: float = 0.0, fmax: float | None = None) → None#

Methods

__init__([segment_length, ...])

fit(data)

Estimate directed connectivity.

get_params()

Return the constructor parameters as a dictionary.

Attributes

fmax

fmin

info

segment_length

time_halfbandwidth