First, I am aware that an ideal optimal window task is really signal/task-specific, i.e. nature of signal/sampling rate/characteristics of interest etc.
What I am interested in: "Is there an optimal guideline and way to determine window size for the use of the Savitsky-Golay filter (Savgol_filter)?
For example. If I want to determine the cut-off frequency of a Butterworth filter, I first do a residual analysis of the signal to determine the residuals and noise and therefore cut-off frequency as described in Winter DA (2009) Biomechanics and motor control of human movement. 4 ed. Hoboken, EUA: Wiley.
Is there a similar way to determine the optimal or minimal window size when using the SG filter? What I do is to start with a window size of 3 and go higher until I find it smooth enough to identify what I want (e.g. extremum) without over smoothing etc. Is there a more scientific way?
The signal I am working with is gross motor/movement signals in humans.
Thank you in advance for your help.