- double sxx = vectorDot(data_end + ndata_lowpass, data_end + ndata_lowpass, ndata_highpass - ndata_lowpass);
- if(sxx == 0)
- errx(1, "ends with silence... use another end point");
-
-#if 0
- {
- sf_count_t i, j;
- double sum[ndata];
- double diffsum[ndata];
- fftw_complex save[ndata];
- for(i = guess; i < size - fftsize; ++i)
- {
- doFourier(sbuf + i * channels, channels, fftsize, data_cur);
- for(j = 0; j < ndata; ++j)
- {
- fftw_complex x = data_cur[j];
- if(i != 0)
- {
- fftw_complex y = save[j];
- sum[j] += cabs(x);
- diffsum[j] += cabs(y - x);
- }
- save[j] = x;
- }
- fprintf(stderr, "at position %d\n", (int) i);
- }
- for(j = 0; j < ndata; ++j)
- printf("%d %.9f %.9f\n", j, sum[j], diffsum[j]);
- return 0;
- }
-#endif
-