horfilteranalysis: reimplement filtering using kernel and function templates