How to make a 2D gaussian Blur terms?
It's real easy. Multi-dimensional Gaussian functions are separable, that is they can be calculated as the product of the Gaussian function along all axes. For the 2-d case it means: 

terms[x, y] = terms[x]*terms[y]


Note that separability also means that you obtain the same result as by using the 2-d filter, by first 1-d filtering along one axis and then 1-d filtering the output along the other axis.