Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero pad to compensate for nonzero FFT length #219

Closed
jacobagilbert opened this issue Nov 21, 2022 · 2 comments
Closed

Zero pad to compensate for nonzero FFT length #219

jacobagilbert opened this issue Nov 21, 2022 · 2 comments

Comments

@jacobagilbert
Copy link

Instantaneous energy and the spectrogram tiles do not line up correctly in Inspectrum. This is most obvious when using larger FFT lengths and the amplitude plot, but also very noticeable with SigMF Annotations, for example, in the screenshot below shows the spectrogram tile showing energy well before the annotation and actual time domain energy begins:

image

At larger FFT sizes this misalignment becomes more obvious as the temporal ambiguity (same number of samples as FFT length) increases.

To resolve this, the data should be zero padded with length NFFT/2 in which case the spectrogram will be nicely aligned (with expected temporal smearing still of course):

image

@daniestevez
Copy link
Contributor

Just seen this issue. I've also realized this problem, and sent a PR that solves the problem in a slightly different way (#227).

@miek
Copy link
Owner

miek commented Oct 22, 2023

Fixed in #227

@miek miek closed this as completed Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants