This guide will help you get started with the DSP-in-Python repository.
- Python 3.8 or higher
- pip (Python package manager)
- Git (for cloning the repository)
git clone https://github.com/n7jti/DSP-in-Python.git
cd DSP-in-Python# Create virtual environment
python -m venv dsp_env
# Activate it
# On Linux/Mac:
source dsp_env/bin/activate
# On Windows:
dsp_env\Scripts\activate
# Install dependencies
pip install -r requirements.txtconda create -n dsp python=3.10
conda activate dsp
pip install -r requirements.txtpip install -r requirements.txt# Test that imports work
python -c "import numpy; import scipy; import matplotlib; print('All imports successful!')"
# Run a simple example
cd lessons/lesson_01/examples
python signal_types.pyIf you see plots and no errors, you're all set!
-
Start with Lesson 1: Discrete-time Signals
- Understand basic signal types
- Learn Python syntax for DSP
- Get comfortable with NumPy and Matplotlib
-
Progress through Lesson 2: Python for DSP
- Master the essential libraries
- Learn MATLAB to Python conversions
- Set up your workflow
-
Follow the sequence: Lessons 3-28
- Each lesson builds on previous concepts
- Watch the video lecture first
- Run the example code
- Try the exercises
For those new to Python:
- Start with Lesson 2 (Python for DSP)
- Review Python basics tutorials
- Then proceed to Lesson 1
For experienced DSP practitioners:
- Skip directly to topics of interest
- Use the LESSONS.md index to navigate
- Each lesson is relatively self-contained
For specific topics:
- Filtering: Lessons 17-19
- FFT: Lessons 12-13
- Adaptive filters: Lessons 20-22
- Wavelets: Lessons 25-27
# Navigate to lesson examples
cd lessons/lesson_01/examples
# Run a script
python signal_types.py
# The script will:
# 1. Generate plots
# 2. Save figures to ../data/
# 3. Print information to consoleFor interactive work, use IPython or Jupyter:
# Install Jupyter (if not already installed)
pip install jupyter
# Start Jupyter
cd lessons
jupyter notebook
# Or use IPython
ipythonThen you can run code interactively:
import numpy as np
import matplotlib.pyplot as plt
# Create and plot a signal
n = np.arange(0, 20)
x = np.cos(2 * np.pi * n / 8)
plt.stem(n, x)
plt.show()Solution: Install the required packages
pip install numpy scipy matplotlibSolution:
- Make sure you have a display available
- For headless systems, save plots instead of showing them
- Use
plt.savefig()beforeplt.show()
Solution: Upgrade Python
# Check your version
python --version
# Use Python 3.8 or higher
# Install from python.org or use condaSolution: Check you're using the right Python
# See which python is being used
which python # Linux/Mac
where python # Windows
# Make sure it's the one in your virtual environmentDSP-in-Python/
├── README.md # Main project overview
├── LESSONS.md # Detailed lesson index
├── GETTING_STARTED.md # This file
├── CONTRIBUTING.md # Contribution guidelines
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
│
├── lessons/ # All course lessons
│ ├── lesson_01/
│ │ ├── README.md # Lesson overview
│ │ ├── examples/ # Python examples
│ │ ├── exercises/ # Practice problems
│ │ └── data/ # Generated data/figures
│ ├── lesson_02/
│ └── ...
│
└── utils/ # Shared utility functions
└── common_functions.py
- Watch the Videos: Professor Radke's lectures are excellent
- Run the Code: Don't just read, execute and experiment
- Modify Examples: Change parameters and see what happens
- Do the Exercises: Practice reinforces learning
- Use the Community: Open issues for questions
- Compare with MATLAB: If you know MATLAB, use the conversion tables
- Keep a Notebook: Document your learning journey
- Build Projects: Apply concepts to real signals
After completing the setup:
- ✅ Review the main README.md
- ✅ Browse LESSONS.md for the full lesson list
- ✅ Start with Lesson 1
- ✅ Join the learning community
Happy learning! 🎓🔊📊