proc: Waveform processing

proc module contains classes for a little more advanced waveform processing. At the moment that includes Kaiser Window Finite Impulse Response filter design, Infinite Impulse response filters and the Digital Downconversion.

class proc.Ddc(ns, fs, fc, phi=0.0)

Digital down-conversion class

fc local oscillator (LO) frequency

phi local oscillator starting phase

convert(wf)

Proceed with the downconversion

class proc.Filter

Base filter class

class proc.FirFilter(ns, fs, fc1, fc2, bwt, ripple, type='lowpass')

Finite Impulse Response Filter designed using Kaiser window

ns - number of samples in the signal to be processed

fs - sampling frequency

fc1 - the first cutoff frequency

fc2 - the second cutoff frequency (for bandpass and bandstop filters)

bwt - transition region width

ripple - maximum ripple in both the pass and stop bands in dB

type - filter type (lowpass,highpass,bandpass,bandstop)

Good info on the matter can be found at: http://www.mikroe.com/eng/chapters/viiew/72/chapter-2-fir-filters/

filter(wfin)

Filter the waveform

plotCoeff()

Plot the filter coefficients

plotResponse()

Plot the filter response

class proc.IirFilter(N, fs, fc1, fc2, bwt, ripple=20, att=20, type='lowpass', arch='butter')

Infinite Impulse Response Filter wrapper class

N - filter order

fs - sampling frequency

fc1 - the first cutoff frequency

fc2 - the second cutoff frequency (for bandpass and bandstop filters)

bwt - transition region width

ripple - maximum passband ripple in dB (for Chebyshev and Elliptic)

att - minimum stopband attenuation in dB (for Chebyshev and Elliptic)

type - filter type (lowpass,highpass,bandpass,bandstop)

arch - filter architecture (ellip,cheby1,cheby2,butter,bessel)

filter(wfin)

Filter the waveform

plotResponse()

Plot the filter response

plotStepResponse()

Plot the filter response to a step function

Previous topic

wf: Basic waveform operations

This Page