Exemplo n.º 1
0
xi = rdsBand[::2] * c57
xq = rdsBand[1::2] * (-c57)


# low-pass filter

filtLP = signal.remez(400, [0, 2400, 3000, sampleRate / 4], [1, 0], Hz=sampleRate / 2)

xfi = signal.convolve(xi, filtLP)
xfq = signal.convolve(xq, filtLP)


# shape filter

shapeFilt = shaping_filter.rrcosfilter(300, 1, 1 / (2 * 1187.5), sampleRate / 2)[1]

xsfi = signal.convolve(xfi, shapeFilt)
xsfq = signal.convolve(xfq, shapeFilt)


if len(xsfi) % 2 == 1:
    xsfi = xsfi[:-1]
    xsfq = xsfq[:-1]

# downsample

xdi = (xsfi[::2] + xsfi[1::2]) / 2
xdq = xsfq[::2]

Exemplo n.º 2
0
c57 = numpy.tile([1., -1.], len(rdsBand) / 4)

xi = rdsBand[::2] * c57
xq = rdsBand[1::2] * (-c57)

# low-pass filter

filtLP = signal.remez(400, [0, 2400, 3000, sampleRate / 4], [1, 0],
                      Hz=sampleRate / 2)

xfi = signal.convolve(xi, filtLP)
xfq = signal.convolve(xq, filtLP)

# shape filter

shapeFilt = shaping_filter.rrcosfilter(300, 1, 1 / (2 * 1187.5),
                                       sampleRate / 2)[1]

xsfi = signal.convolve(xfi, shapeFilt)
xsfq = signal.convolve(xfq, shapeFilt)

if len(xsfi) % 2 == 1:
    xsfi = xsfi[:-1]
    xsfq = xsfq[:-1]

# downsample

xdi = (xsfi[::2] + xsfi[1::2]) / 2
xdq = xsfq[::2]

# remove phase drift using a moving average
Exemplo n.º 3
0
def pulse_shaping_filter(length, sample_rate):
    return shaping.rrcosfilter(length, 1, 1 / (2 * 1187.5), sample_rate + 1)[1]
Exemplo n.º 4
0
def pulse_shaping_filter(length, sample_rate):
    return shaping.rrcosfilter(length, 1, 1/(2*1187.5), sample_rate+1) [1]