From 3c7d6596e6af1ff48f6d133329390204f299d081 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 14 Nov 2024 16:06:45 +0100
Subject: [PATCH] Correct tRange for odd Ncoefs.

---
 applications/lofar2/model/rtdsp/multirate.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/applications/lofar2/model/rtdsp/multirate.py b/applications/lofar2/model/rtdsp/multirate.py
index 9fdb962103..ea530c68f3 100644
--- a/applications/lofar2/model/rtdsp/multirate.py
+++ b/applications/lofar2/model/rtdsp/multirate.py
@@ -940,7 +940,6 @@ def non_maximal_upsample_bpf(xBase, Nup, k, Ndft, coefs, verbosity=1):
     # PFS with Ndft polyphases
     pfs = PolyPhaseFirFilterStructure(Ndft, coefs, cmplx=True)
     kPhasors = unit_circle_loops_phasor_arr(k, Ndft, 1)  # [HARRIS Eq 7.8]
-    print(kPhasors)
 
     # Oversampling time shift compensation via frequency dependent phase shift
     tPhasors = time_shift_phasor_arr(k, Nup, Ndft, Nblocks, -1)  # [HARRIS Eq 9.3]
@@ -1119,7 +1118,7 @@ def synthesis_dft_filterbank(Xbase, Nup, Ndft, coefs, commutator, verbosity=1):
         zData = pfs.map_to_delay_line(zPoly)
 
         # Overlap add weigthed input to the output
-        tRange = np.arange(pfs.Ncoefs) + b * Nup
+        tRange = np.arange(len(zData)) + b * Nup
         y[tRange] += zData
 
     if verbosity:
-- 
GitLab