blockave#

blockave(data, frames, epochs=None, weights=None)#

Return an epoch average from channel-major concatenated data.

Parameters:
  • data (Any) – Array shaped (channels, frames * epochs). A one-dimensional input is treated as one channel.

  • frames (int) – Number of samples in each epoch.

  • epochs (Any) – Optional EEGLAB-facing 1-based epoch indices. Empty or zero selects every epoch.

  • weights (Any) – Optional weight for every epoch. The selected weights are normalized to sum to one.

Returns:

The average shaped (channels, frames).

Return type:

ndarray