Additional SciPy functionality includes several waveforms that can be used when you're designing a signal processing algorithm or testing it. These include sawtooth(), square(), gausspulse(), and chirp():

from pylab import * from scipy import signal cycles = 10

for i, waveform in enumerate(waveforms): subplot(2, 2, i+l)


axis([0, 2*pi*cycles, -1.1, l.l]) Figure 8-11 shows the resulting waveforms.

0 10 20 30 40 50 60 Figure 8-11. Some waveforms

The difference between waveforms and the triangular window used earlier is that they're repetitive, whereas triang() generates a single window.

The functions gausspulse() and chirp() are a bit more specialized; refer to the interactive help for information on using them.

Was this article helpful?

0 0


  • adelbert
    Can you create waveforms using python graphics?
    3 years ago

Post a comment