import Numeric

MINF0 = 30.0

def f0_wt(x, name):
	f0 = x.column('F0')
	v = x.column('prob_voice')
	wt = (f0>MINF0)*(v>0.5)
	wtc = wt * Numeric.convolve(wt, [0.2, 0.2, 0.2, 0.2, 0.2], 1)**3
	return (f0, wtc)

