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 should have an auto-correlation function that is 1 at time-shift 0 and -1/n elsewhere.

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

Golomb, S. W. (1967). Shift register sequences. Holden-Day. Inc., San Fransisco. Meel, J. (1999). Spread spectrum (SS)