Skip to content

Commit 362f27b

Browse files
committed
fix: widthframer no longer accumulates autocorrelation data into NaNs
1 parent a023602 commit 362f27b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hobbits-plugins/analyzers/WidthFramer/widthframer.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,13 @@ QVector<QPointF> WidthFramer::autocorrelate(QSharedPointer<const BitArray> bits)
233233

234234
// prepare and run first FFT
235235
for (int i = 0; i < N; i++) {
236+
m_fft_in[i][0] = 0;
237+
m_fft_in[i][1] = 0;
236238
if (i < bits->sizeInBits()) {
237239
m_fft_in[i][0] = bits->at(i) ? 1 : -1;
238-
m_fft_in[i][1] = 0;
239240
}
241+
m_fft_out[i][0] = 0;
242+
m_fft_out[i][1] = 0;
240243
}
241244
fftw_execute(m_fft_plan1);
242245

0 commit comments

Comments
 (0)