In reply to dave_59:
For the matching algorithm it all depends on the situation, but in general our do_compare are performing a difference between the predicted and monitored data and whenever they are below a certain threshold then we mark it as valid.
This works with stimuli that are monotonic otherwise there will be more than one predicted value to match the monitored one, in that case we do not have yet found a robust matching algorithm. Probably we should be look up more “signal processing” techniques to match the two time series and maybe with some upsampling and interpolation as well.
The queue proposal is quite interesting, if we start from the hypothesis that predicted values are always at a higher rate than monitored ones, we can have the predicted write to fill the queue and the monitored write to trigger the matching algorithm.