Put Gaussian filter generation into a "core" function