summaryrefslogtreecommitdiff
path: root/numpy/fft/fftpack.py
diff options
context:
space:
mode:
authorendolith <endolith@gmail.com>2012-11-24 19:22:59 -0500
committerendolith <endolith@gmail.com>2012-11-24 19:22:59 -0500
commita3dbac20451f686acfb8597e1da9604a8ab7185d (patch)
tree7e25094316dd872e092aa1f0433ab77bc19729c3 /numpy/fft/fftpack.py
parent9bd89e470c3f3128f6a61fe9fa133a99b7887bbd (diff)
downloadnumpy-a3dbac20451f686acfb8597e1da9604a8ab7185d.tar.gz
DOC: Clarify the frequencies of the rfft using fs, borrowing text from numpy.fft docstring
Diffstat (limited to 'numpy/fft/fftpack.py')
-rw-r--r--numpy/fft/fftpack.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/numpy/fft/fftpack.py b/numpy/fft/fftpack.py
index c70e336ea..472d3e06c 100644
--- a/numpy/fft/fftpack.py
+++ b/numpy/fft/fftpack.py
@@ -296,12 +296,14 @@ def rfft(a, n=None, axis=-1):
compute the negative frequency terms, and the length of the transformed
axis of the output is therefore ``n//2+1``.
- When ``A = rfft(a)``, ``A[0]`` contains the zero-frequency term, which
- must be purely real due to the Hermite symmetry.
-
- If `n` is even, ``A[-1]`` contains the term for frequencies ``n/2`` and
- ``-n/2``, and must also be purely real. If `n` is odd, ``A[-1]``
- contains the term for frequency ``A[(n-1)/2]``, and is complex in the
+ When ``A = rfft(a)`` and fs is the sampling frequency, ``A[0]`` contains
+ the zero-frequency term 0*fs, which must be purely real due to the Hermite
+ symmetry.
+
+ If `n` is even, ``A[-1]`` contains the term representing both positive
+ and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
+ real. If `n` is odd, there is no term at fs/2; ``A[-1]`` contains
+ the largest positive frequency (fs/2*(n-1)/n), and is complex in the
general case.
If the input `a` contains an imaginary part, it is silently discarded.