eelbrain.neighbor_correlation

eelbrain.neighbor_correlation(x, dim='sensor', obs='time', func=<function mean>, flat=0, name=None)

Calculate Neighbor correlation

Parameters
  • x (NDVar) – The data.

  • dim (str) – Dimension over which to correlate neighbors (default ‘sensor’).

  • obs (str) – Dimension which provides observations over which to compute the correlation (default ‘time’).

  • func (Callable) – Numpy function to summarize the neighbors. Default numpy.mean(); for example, use numpy.max() to test whether any neighbor is correlated.

  • flat (float) – Value to substitute for flat channels (default 0).

  • name (Optional[str]) – Name for the new NDVar.

Returns

NDVar that contains for each element in dim the with average correlation coefficient with its neighbors.

Return type

correlation