Page 1 of 1

Delayed output stimulations with Python box

Posted: Thu Jan 05, 2023 8:51 am
by npavailler
Hi,

I am currently developping a Pyhton box to send a stimulation when the input signal exceeds a certain threshold (also calculated in the box).
When testing with a file already acquired, stimulations are sent with a delay that increases over time. To explore this issue, we ran some tests with a simpler Python box that simply returns a new stimulation when it receives one. In this case, the delay is still present and increasing with time, and we noticed that it was depending on chunk size. However, this delay is not observed when we use in input sinus oscillator and clock stimulator boxes instead of the file reader.
Does anyone know what could cause this delay?

Thank you!

Re: Delayed output stimulations with Python box

Posted: Wed Jan 11, 2023 3:23 pm
by Thomas
Hi npavailler,

The python box is a great tool to prototype and perform some signal processing and specific logic, but it does not perform as well as the C++ implemented boxes.
If your python box takes some time to read and analyse the data, it could be a possible reason why it is introducing some delay.
Could you share your simple python script to see how you implemented the stimulation forwarding ?

Last question (sorry I ask more than I answer), how do you measure the delay that you see ?

Thank you,
Thomas