pyntbci.stimulus.is_m_sequence

pyntbci.stimulus.is_m_sequence(stimulus: NDArray) bool[source]

Check whether a stimulus is an m-sequence. An m-sequence [5] should have an auto-correlation function that is 1 at time-shift 0 and -1/n elsewhere [6].

Parameters:

stimulus (NDArray) – A matrix with the m-sequence of shape (1, n_bits).

Returns:

out – True if the stimulus is an m-sequence, otherwise False.

Return type:

bool

References