From deeab3233ee5c9249601c5e678bd84ecb64255f5 Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 23 Nov 2023 18:06:00 +0100 Subject: [PATCH] Clarify fftshift for N is even and odd. --- .../lofar2/model/pfb_os/dsp_study_erko.txt | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/applications/lofar2/model/pfb_os/dsp_study_erko.txt b/applications/lofar2/model/pfb_os/dsp_study_erko.txt index 382ab3c98e..8964b652a7 100644 --- a/applications/lofar2/model/pfb_os/dsp_study_erko.txt +++ b/applications/lofar2/model/pfb_os/dsp_study_erko.txt @@ -212,20 +212,24 @@ -0.5, 0, 0.5 [fs] . N even, e.g. N = 4: - <---- N = 4 -----> - 0 fs/2 fs - | | | - n = 0 1 2 3 - 0/4 1/4 2/4 3/4 4/4 - DC positive negative + <------ N = 4 -------> + 0 fs/2 ( fs ) + | | ( | ) + n = 0 1 2 3 ( | ) + 0/4 1/4 2/4 3/4 ( 4/4 ) + DC positive | negative + | + \--> fftshift([0, 1, 2, 3]) = [2, 3, 0, 1] . N odd, e.g. N = 5: <------- N = 5 --------> - 0 fs/2 fs - | | | - n = 0 1 2 | 3 4 | - 0/5 1/5 2/5 | 3/5 4/5 5/5 + 0 fs/2 ( fs ) + | | ( | ) + n = 0 1 2 | 3 4 ( | ) + 0/5 1/5 2/5 | 3/5 4/5 ( 5/5 ) DC positive | negative + | + \-->fftshift([0, 1, 2, 3, 5]) = [3, 4, 0, 1, 2] . With K = N // 2: . N even : DC, K - 1 positive, fs/2, K - 1 negative frequencies -- GitLab