Aah. You're right, I tried with 2 and 3, gives me the same result. After multiplying with this `gauss_mask`, I normalise the result so yes probably it doesn't matter much after all. I wonder why they would choose a value like 6.4. Although, I'm not in favour of making `sigma` a parameter. 

My understanding is that, there needs to be correlation between `window` and `sigma`. Sigma essentially controls the width of the bell curve. And my `valid_mask` is for providing the relative weight to the pixels in the `template`, i.e. max to the central pixel and decreasing as we go away. 

If suppose, I chose the `window` to be 25 (just an example), and a relatively small sigma of say 0.2, then only the very centre portion of my `template` will come into the picture, not the rest of the array. So, let's keep `sigma = window / 3`. I'm sure there, is some similar logic behind `6.4` as well, just not sure what exactly. I hope this makes sense.