diff options
author | Nao Pross <np@0hm.ch> | 2021-12-05 23:36:10 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-05 23:36:10 +0100 |
commit | f3841a7720eb395b8f6408780e7b540a4d8c4127 (patch) | |
tree | 27f0131a1e0e04a1f3bf5b0f9781a3b23e5dbd94 /tests/correlator/epy_block_0.py | |
parent | Merge branch 'master' of github.com:NaoPross/Fading (diff) | |
download | Fading-f3841a7720eb395b8f6408780e7b540a4d8c4127.tar.gz Fading-f3841a7720eb395b8f6408780e7b540a4d8c4127.zip |
Nicer notation in block_phase
Diffstat (limited to '')
-rw-r--r-- | tests/correlator/epy_block_0.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/correlator/epy_block_0.py b/tests/correlator/epy_block_0.py index dbdadd1..aa3065a 100644 --- a/tests/correlator/epy_block_0.py +++ b/tests/correlator/epy_block_0.py @@ -46,14 +46,7 @@ class blk(gr.sync_block): ephase = pmt.to_python(end.value) # compute frequency offset between start and end - phasediff = ephase - sphase - - if phasediff > np.pi: - phasediff -= 2*np.pi - - elif phasediff < -np.pi: - phasediff += 2*np.pi - + phasediff = (ephase - sphase) % (2 * np.pi) freq = phasediff / nsamples # save this one for the last block (see variable `end' in self.work) |