pyntbci.eeg.apply_mixing_matrix

pyntbci.eeg.apply_mixing_matrix(source: NDArray, mixing_matrix: NDArray) NDArray[source]

Project one or more source signals to channel space using a mixing matrix.

Parameters:
  • source (NDArray) – The source signal(s) of shape (n_trials, n_samples) for a single source, or (n_trials, n_sources, n_samples) for multiple sources.

  • mixing_matrix (NDArray) – The mixing matrix of shape (n_sources, n_channels), e.g. as generated by generate_mixing_matrix().

Returns:

X – The multi-channel signal of shape (n_trials, n_channels, n_samples).

Return type:

NDArray