Delayed output stimulations with Python box

Making & changing box plugins and external apps
Post Reply
npavailler
Posts: 4
Joined: Fri Apr 23, 2021 9:23 am

Delayed output stimulations with Python box

Post 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!

Thomas
Posts: 211
Joined: Wed Mar 04, 2020 3:38 pm

Re: Delayed output stimulations with Python box

Post 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

Post Reply