What is so special about this filter coef = [1,2,1]? Can anyone tell what kind of filter is this? I can see it's smoothing/averaging the input signal, but why specifically with [1,2,1] instead of something else? What is so special about this coef=[1,2,1]? Thanks

# Python code
length = 1000
signal = np.random.rand(length)
output = np.zeros(length-2)
coef= np.array([1,2,1])
for i in range(length - 2):
   output[i] = np.sum(signal[i:i+3] * coef / 4)
It is a symmetric odd-sized FIR smoothing kernel, belonging to the class of Pascal or binomial filters that somehow sample a Gaussian kernel. Plus, its coefficients are simple dyadic integers, that can be implemented as bit-shifts 1/4 1/2 1/4. The coefficients sum to one, hence it is unit gain at DC.

In simpler word: (one of) the simplest real smoother preserving symmetric feature location. It's efficiency is however limited