detrend and taper before filtering to avoid filtering artifacts at the edges