Zero padding for interpolation of the input sample in frequency space
Closed this issue · 1 comments
Maybe I missed it in the code but you should initialise the sample array to the full length and fill it with zeros. I think your code just appends to the sample so it gradually grows. Filling with zeroes creates interpolation of the signal in the frequency space making the resolution of your initial estimate higher. A longer FFT result has more frequency bins that are more closely spaced in frequency thus creating a better estimate of pulse from a small sample.
Good catch, it does make more sense than the current implementation. It's actually a change to the BufferFFT
component that I've made on a local branch but haven't pushed to master
yet. I'll be updating with that along with some other changes shortly. I need to do some more testing, because there is more involved than just zero padding the data samples - the sample timestamps lists needs to be extended as well.