func TestFFTEachFreq(t *testing.T) { plan := NewFFT2048Plan() for i := 0; i < 2048; i++ { aSin := cmplxv.CosSin(2048, i, 63) in := ToM128Buf(*aSin) out := NewCmplx32Vec(2048) plan.Do(in, out) inx, max, avg := out.FindMax() if inx != i { t.Error(i, inx, max, avg) t.Fail() } } }
func NewFreqCorrectPlan() *FreqCorrectPlan { t := cmplxv.CosSin(2048, 1, 32767) r := &FreqCorrectPlan{ToM128Buf(*t)} return r }