Fix bug in Python code for reading raw samples.
This commit is contained in:
parent
d4e12c75ce
commit
32dcfdd57f
4
pyfm.py
4
pyfm.py
|
@ -15,7 +15,7 @@ def readRawSamples(fname):
|
|||
d = d.astype(numpy.float64)
|
||||
d = (d - 128) / 128.0
|
||||
|
||||
return d[::2] - 1j * d[1::2]
|
||||
return d[::2] + 1j * d[1::2]
|
||||
|
||||
|
||||
def lazyRawSamples(fname, blocklen):
|
||||
|
@ -29,7 +29,7 @@ def lazyRawSamples(fname, blocklen):
|
|||
d = numpy.fromstring(d, dtype=numpy.uint8)
|
||||
d = d.astype(numpy.float64)
|
||||
d = (d - 128) / 128.0
|
||||
yield d[::2] - 1j * d[1::2]
|
||||
yield d[::2] + 1j * d[1::2]
|
||||
|
||||
|
||||
def freqShiftIQ(d, freqshift):
|
||||
|
|
Loading…
Reference in New Issue