aboutsummaryrefslogtreecommitdiffstats
path: root/tests/correlator/epy_block_0.py
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-12-03 00:29:03 +0100
committerNao Pross <np@0hm.ch>2021-12-03 00:29:03 +0100
commit5d2f01fe71b736f2f5bb8a57bb2f4cd383290e9f (patch)
treeac6ca336a63022e012895ea1de03c39a3cfb289a /tests/correlator/epy_block_0.py
parentRefractor frequency correction (diff)
downloadFading-5d2f01fe71b736f2f5bb8a57bb2f4cd383290e9f.tar.gz
Fading-5d2f01fe71b736f2f5bb8a57bb2f4cd383290e9f.zip
Fix bug when tag is aligned with inp block
Diffstat (limited to '')
-rw-r--r--tests/correlator/epy_block_0.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/correlator/epy_block_0.py b/tests/correlator/epy_block_0.py
index 9cb25bb..abf4486 100644
--- a/tests/correlator/epy_block_0.py
+++ b/tests/correlator/epy_block_0.py
@@ -41,7 +41,7 @@ class blk(gr.sync_block):
def work(self, input_items, output_items):
# FIXME: replace class counter with local variable
- # self.counter = self.nitems_written(0)
+ self.counter = self.nitems_written(0)
# nicer aliases
inp = input_items[0]
@@ -65,7 +65,7 @@ class blk(gr.sync_block):
nfront = tags[0].offset - self.counter
print(f"Processing {nfront} samples at the front of the buffer")
start = self.block_phase(self.last, tags[0])[-nfront:] \
- if self.last else np.zeros(nfront)
+ if self.last and nfront else np.zeros(nfront)
# compute values at the end
nback = len(inp) - (tags[-1].offset - self.counter)