let nyquist bin not empty for odd vector
This commit is contained in:
parent
a0dc0bb608
commit
ad44b4ff4c
|
|
@ -181,7 +181,7 @@ com_fft(wordlist *wl)
|
||||||
scale = (double) fpts - 1.0;
|
scale = (double) fpts - 1.0;
|
||||||
fdvec[i][0].cx_real = out[0][0]/scale/2.0;
|
fdvec[i][0].cx_real = out[0][0]/scale/2.0;
|
||||||
fdvec[i][0].cx_imag = 0.0;
|
fdvec[i][0].cx_imag = 0.0;
|
||||||
for (j = 1; j < fpts-1; j++) {
|
for (j = 1; j < fpts; j++) {
|
||||||
fdvec[i][j].cx_real = out[j][0]/scale;
|
fdvec[i][j].cx_real = out[j][0]/scale;
|
||||||
fdvec[i][j].cx_imag = out[j][1]/scale;
|
fdvec[i][j].cx_imag = out[j][1]/scale;
|
||||||
}
|
}
|
||||||
|
|
@ -419,7 +419,7 @@ com_psd(wordlist *wl)
|
||||||
fdvec[i][0].cx_real = out[0][0]*out[0][0]/intres;
|
fdvec[i][0].cx_real = out[0][0]*out[0][0]/intres;
|
||||||
fdvec[i][0].cx_imag = 0;
|
fdvec[i][0].cx_imag = 0;
|
||||||
noipower = fdvec[i][0].cx_real;
|
noipower = fdvec[i][0].cx_real;
|
||||||
for (j = 1; j < fpts-1; j++) {
|
for (j = 1; j < fpts; j++) {
|
||||||
fdvec[i][j].cx_real = 2.* (out[j][0]*out[j][0] + out[j][1]*out[j][1])/intres;
|
fdvec[i][j].cx_real = 2.* (out[j][0]*out[j][0] + out[j][1]*out[j][1])/intres;
|
||||||
fdvec[i][j].cx_imag = 0;
|
fdvec[i][j].cx_imag = 0;
|
||||||
noipower += fdvec[i][j].cx_real;
|
noipower += fdvec[i][j].cx_real;
|
||||||
|
|
|
||||||
|
|
@ -777,7 +777,7 @@ cx_fft(void *data, short int type, int length, int *newlength, short int *newtyp
|
||||||
scale = (double) fpts - 1.0;
|
scale = (double) fpts - 1.0;
|
||||||
outdata[0].cx_real = out[0][0]/scale/2.0;
|
outdata[0].cx_real = out[0][0]/scale/2.0;
|
||||||
outdata[0].cx_imag = 0.0;
|
outdata[0].cx_imag = 0.0;
|
||||||
for (i = 1; i < fpts-1; i++) {
|
for (i = 1; i < fpts; i++) {
|
||||||
outdata[i].cx_real = out[i][0]/scale;
|
outdata[i].cx_real = out[i][0]/scale;
|
||||||
outdata[i].cx_imag = out[i][1]/scale;
|
outdata[i].cx_imag = out[i][1]/scale;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue