var#

syncopy.var(spy_data, dim, keeptrials=True, parallel=None, select=None, **kwargs)[source]#

Calculates the variance along arbitrary dimensions of a Syncopy data object spy_data.

Additional trial averaging can be performed with keeptrials=False after the variance got calculated.

Parameters:
  • spy_data (Syncopy data object) – The object where a variance is to be computed.

  • dim (str) – Dimension label over which to calculate the statistic. Must be present in the spy_data object, e.g. ‘channel’ or ‘trials’.

  • keeptrials (bool) – Set to False to trigger additional trial averaging. Has no effect if dim='trials'.

  • parallel (None or bool) – If None (recommended), processing is automatically performed in parallel (i.e., concurrently across trials/channel-groups), provided a dask parallel processing client is running and available. Parallel processing can be manually disabled by setting parallel to False. If parallel is True but no parallel processing client is running, computing will be performed sequentially.

  • select (dict or StructDict or str) – In-place selection of subset of input data for processing. Please refer to syncopy.selectdata() for further usage details.

Returns:

res – New object with the desired dimension averaged out

Return type:

Syncopy data object