pyntbci.stimulus.is_de_bruijn_sequence
- pyntbci.stimulus.is_de_bruijn_sequence(stimulus: ndarray[Any, dtype[_ScalarType_co]], k: int = 2, n: int = 6) bool [source]
Check whether a stimulus is a de Bruijn sequence. A de Bruijn sequence [1] should contain all possible substrings of the alphabet.
- Parameters:
stimulus (NDArray) – A vector with the de Bruijn sequence of shape (1, n_bits).
k (int (default: 2)) – The size of the alphabet.
n (int (default: 6)) – The order of the sequence.
- Returns:
out – True if the stimulus is a de Bruijn sequence, otherwise False.
- Return type:
bool
References