0
$\begingroup$

For numpy's rfft function, the length of the output is about half of N, the length of the input sequence. What is the reason behind this? What are the frequency bins?

$\endgroup$
0
$\begingroup$

Check out the numpy docs ( https://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html )

To sum up, real DFT normally takes a real input of N samples and returns a complex output of N/2+1 values.

What you end up with are the positive frequencies (up to the Nyquist frequency) and the negative frequencies, which are just complex conjugates of their positive counterparts, are discarded or are not even computed.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.