ENH: Automatically choose filter length