I'm pretty uneducated when it comes to filtering, more of a stats guy, but I have to bandpass some signals and after a bunch of reading today I understand that the scipy.signal.sosfiltfilt function seems to be a gold standard. One thing I notice is that it doesn't provide the option to use the Gustafsson method for reducing transients as does regular ol' scipy.signal.filtfilt does. Which led me to wonder, is there much to argue for using the Gustafsson method over simple padding?

  • $\begingroup$ I would simply extrapolate the signal by $P$ samples in the front and back by fitting a polynomial function, and then remove the extrapolated part after filtering. Zero-padding should also work, but it also introduced abrupt shifts. $\endgroup$ – Maxtron Aug 21 '19 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.