I believe that digital signal processing and fundamentals of communications systems dont need to be taught on purely theoretic and mathematical level. There are so many things that can be easily visualized instead of being derived from tedious calculations.
This site is dedicated to illustrate fundamental aspects of signal processing and analysis with easy to follow code examples and graphical illustrations. This mixture of basic mathematical theory and direct illustration with source code allows to
- better understand the treatment,
- ensure correctness by numerical verification,
- learn, how equations can be modeled in computer programs.
Througout the page, some source code can be run interactively. Look out for the link below:
I suggest installing a ready-made Python distribution, such as Anaconda Python. It contains all the packages that are necessary and is the simplest way to install Python. Just download the 64-Bit Python 3.5 version and follow the instructions. Also, check this introduction for the Python installation Beginner's Guide
Anaconda already installs the Jupyter Notebook including a shortcut for starting it. When you only want to download the source code and manually load it into Jupyter, simply start the Jupyter Notebook, download the source code and save it to the folder where Jupyter is running. Try it with downloading the current script, by clicking
Download Jupyter Notebook! on the right hand side.
But, it is much more convenient to let
DSPIllustrations.com directly add the source code to your personal running Jupyter notebook: Open the windows command line and navigate to the folder where you want to store the source code (e.g.
Pro tip: Navigate to this folder in the windows explorer, click in the address bar and type "cmd". It will immediately open the command window in the correct folder.
In the command window, execute the following command:
jupyter notebook --NotebookApp.allow_origin_pat="http://(www.)?dspillustrations.com" --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True
Upon successful execution, you should see the following output:
Check, if the server is running at port 8888 (marked in red). If it's not (e.g running on port 8889), close all other running Jupyter instances and run the Jupyter notebook command from above again.
Once your server is running, check the connectivity by clicking
Recheck Connection on the right side. The message should switch to
Connection to server available. If it's showing an error, check if there are messages in the console window, which is running the Jupyter notebook. Then, click on
Add Code to Jupyter Notebook to add the introductory notebook to your running Jupyter instance. Click the appearing link to switch to the notebook and start running the codes.
Pro Tip: Create a batch file containing the required commandline including changing the directory to where you want to store your Jupyter notebooks. For example, the batch file can contain the following commands:REM Change the working directory to C:/users/yourname/Documents/DSPIllustrations cd C:/users/yourname/Documents/DSPIllustrations.com REM Start the Jupyter Notebook server in this directory jupyter notebook --NotebookApp.allow_origin_pat="http://(www.)?dspillustrations.com" --NotebookApp.token=''
This notebook is an example of how the Jupyter notebook works. You can download this notebook from the right-hand side, clicking
Download Jupyter Notebook!, or you can directly add it to your running Jupyter notebook instance, by clicking
Add Code to Jupyter Notebook.
Below are some version tests and some simple plotting functions.
Import some commonly needed packages.
import numpy as np import scipy import matplotlib.pyplot as plt import matplotlib %matplotlib inline from matplotlib import animation from IPython.display import HTML from ipywidgets import interact # workaround function for strange interact implementation def showInInteract(): import inspect for i in range(5): if 'interaction.py' in inspect.stack()[i]: plt.show()
Check the versions of the different packages
print ("Numpy version: ", np.version.full_version) print ("Scipy version: ", scipy.version.full_version) print ("Matplotlib version: ", matplotlib.__version__)
Numpy version: 1.11.3 Scipy version: 0.18.1 Matplotlib version: 1.5.3
Check the plotting functionality of Matplotlib. Here we show a simple static plot.
t = np.arange(-5, 5, 1/100) plt.plot(t, np.sin(t*t)/(t*t)) plt.grid() plt.xlabel('$t$') plt.ylabel(r'$\sin(t^2)$');
Define some function showing some chirps and inverse chirps. Then, animate it to show different parameters.
def showSin(f): t = np.arange(-1, 1, 1/1000) plt.plot(t, np.sin(2*np.pi*f*t*t)) plt.plot(t, np.cos(2*np.pi*f/(t**2+1))) plt.text(0, 0.5, 'f=%.1f' % f, bbox=dict(facecolor='white'))