pyntbci.stimulus.is_de_bruijn_sequence
- pyntbci.stimulus.is_de_bruijn_sequence(stimulus: NDArray, k: int = 2, n: int = 6) bool[source]
Check whether a stimulus is a de Bruijn sequence. A de Bruijn sequence should contain all possible substrings of the alphabet.
- Parameters:
stimulus (NDArray) – A matrix 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
De Bruijn, N. G. (1946). A combinatorial problem. Proceedings of the Section of Sciences of the Koninklijke Nederlandse Akademie van Wetenschappen te Amsterdam, 49(7), 758-764.