1
0
Fork 0

Fix bug in Python code for reading raw samples.

This commit is contained in:
Joris van Rantwijk 2014-01-05 16:43:38 +01:00
parent d4e12c75ce
commit 32dcfdd57f
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ def readRawSamples(fname):
d = d.astype(numpy.float64) d = d.astype(numpy.float64)
d = (d - 128) / 128.0 d = (d - 128) / 128.0
return d[::2] - 1j * d[1::2] return d[::2] + 1j * d[1::2]
def lazyRawSamples(fname, blocklen): def lazyRawSamples(fname, blocklen):
@ -29,7 +29,7 @@ def lazyRawSamples(fname, blocklen):
d = numpy.fromstring(d, dtype=numpy.uint8) d = numpy.fromstring(d, dtype=numpy.uint8)
d = d.astype(numpy.float64) d = d.astype(numpy.float64)
d = (d - 128) / 128.0 d = (d - 128) / 128.0
yield d[::2] - 1j * d[1::2] yield d[::2] + 1j * d[1::2]
def freqShiftIQ(d, freqshift): def freqShiftIQ(d, freqshift):