Implementation of a real-time closed-loop stimulation protocol to study activity codes with flexibility using the Real-Time eXperiment Interface (RTXI). This new and easier-to-use implementation is based on the TCDS protocol and the Victor-Purpura distance.
- input(0) - IV : Neural signal (V)
- output(0) - Now : Task startup time
- output(1) - output : Stimulus enable flag
- output(2) - bit detected : Bit detected within current time window
- Bin Time (ns) - Time window
- Threshold (V) - Minimum voltage to detect a spike
- Word length - Number of bits of the word
- q - Relative sensitivity of the metric to the precise timing of the spikes
- Limit - Victor Purpura distance threshold
- Word - Word to detect
If you use this code in your research, please cite:
Ayala, A., Lareo, A., Varona, P. et al. Neural temporal code-driven stimulation in real-time using the Victor–Purpura distance. Evolving Systems 16, 53 (2025). https://doi.org/10.1007/s12530-025-09670-4