Delay in Savitzky-Golay filtering
You are asking about lag/latency of a digital filter: the only possible answer for a real-time filter is that the latency is determined entirely by the window size of the filter.
Non-realtime filters (e.g, where the full set of samples is provided to the filter, as for e.g. the scipy Savitsky-Golay filter) can pretend/simulate filtering at the ‘time’ of the current sample, but only by looking ahead at the full window.
Some might protest that this is demonstrably how e.g. the scipy Savitzky-Goay filter works, and that’s entirely correct, but nevertheless if you are asking about latency of a filter, which can only mean the delay that a real-time real-world filter will apply to real-time samples, the only possible answer is: this is only and undeniably/incontrovertibly determined by the window size.
I am applying a Savitzky-Golay filter to a signal, using the scipy function.
I need to calculate the lag of the filtered signal, and how much is it behind the original signal.
Could someone shed some light on this matter? How could I calculate it with scipy? How should I interpret the result correctly?
I would be very grateful!