Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polyphase

Introduction

Polyphase channelizer implement using Python.

Install Instructions

This package can be installed via pip. Simply run:

pip install polyphase

How to Use

Import the necessary packages.

import numpy
import scipy
import matplotlib.pyplot as plt

from polyphase import Channelizer

channel_num = 8

Create a Chirp Signal

# Sampling rate set to 1KHz
fs = 1000

f0 = 80
f1 = 100
t1 = 1

t = numpy.arange(0, int(t1*fs)) / fs

s = scipy.signal.chirp(t, f0, t1, f1)

Design Filter.

# 
cutoff = fs / channel_num / 2    # Desired cutoff frequency, Hz
trans_width = cutoff / 10  # Width of transition from pass band to stop band, Hz
numtaps = 128      # Size of the FIR filter.
taps = scipy.signal.remez(numtaps, [0, cutoff - trans_width, cutoff + trans_width, 0.5*fs],
                    [1, 0], Hz=fs)

Create a channelizer, and process signal.

channelizer = Channelizer(taps, channel_num)

ss = channelizer.dispatch(s)

plt.subplot(311)
plt.plot(numpy.real(s))
plt.subplot(312)
plt.plot(numpy.real(ss[0:4].T))
plt.subplot(313)
plt.plot(numpy.imag(ss[0:4].T))
plt.show()

You can also run test_1.py and test_2.py for test.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages