Unit 30Generating a Synthetic Sine Wave

It’s time to impress our non-numpy friends and do something that data scientists normally don’t do: generate a synthetic sine wave, a periodic signal that we could have captured using a cheap, imperfect, and noisy instrument with a limited range. The actual provenance of the signal and the nature of the instrument are not really important. Perhaps it was a voltmeter that you hooked into an electrical outlet, an outdoor digital thermometer that you left on your lawn on Sunday night and collected only on Friday, or even a stock market price ticker. (By the way, you can use synthetic periodic signals not just to impress friends, but also to test new digital signal processing algorithms.)

The generating ...

Get Data Science Essentials in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.