fixed one tiny major typo! In normalization it's sqr(cabs(k)), not csqr(k)