Skip to content

Commit 4367b63

Browse files
committed
updated
1 parent 71db085 commit 4367b63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_hackrf/pyhackrf_tools/pyhackrf_sweep.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ cpdef int sweep_callback(c_pyhackrf.PyHackrfDevice device, cnp.ndarray[cnp.int8_
161161

162162
index += (pyhackrf.PY_BYTES_PER_BLOCK - data_length)
163163

164-
raw_iq = (buffer[index:index + data_length:2] / 128 + 1j * buffer[index + 1:index + data_length:2] / 128) * window
165-
raw_iq -= raw_iq.mean()
164+
raw_iq = buffer[index:index + data_length:2] / 128 + 1j * buffer[index + 1:index + data_length:2] / 128
165+
raw_iq = (raw_iq - raw_iq.mean()) * window
166166
fftOut = fft(raw_iq)
167167
pwr = np.log10(np.abs(fftOut * norm_factor) ** 2) * 10.0
168168

0 commit comments

Comments
 (0)