- Saved searches
- Use saved searches to filter your results more quickly
- AllenDowney/ThinkDSP
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Saved searches
- Use saved searches to filter your results more quickly
- License
- hukenovs/dsp-theory
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Think DSP: Digital Signal Processing in Python, by Allen B. Downey.
AllenDowney/ThinkDSP
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Think DSP is an introduction to Digital Signal Processing in Python.
The premise of this book (and the other books in the Think X series) is that if you know how to program, you can use that skill to learn other things. I am writing this book because I think the conventional approach to digital signal processing is backward: most books (and the classes that use them) present the material bottom-up, starting with mathematical abstractions like phasors.
With a programming-based approach, I can go top-down, which means I can present the most important ideas right away. By the end of the first chapter, you can decompose a sound into its harmonics, modify the harmonics, and generate new sounds.
Think DSP is a Free Book. It is available under the Creative Commons Attribution-NonCommercial 3.0 Unported License, which means that you are free to copy, distribute, and modify it, as long as you attribute the work and don’t use it for commercial purposes.
Here’s a notebook that previews what you will see in Chapter 1:
And if you want to see where were headed, here’s a preview of Chapter 10:
Most of the code for this book is in Jupyter notebooks. If you are not familiar with Jupyter, you can run a tutorial by clicking here. Then select «Try Classic Notebook». It will open a notebook with instructions for getting started.
To run the ThinkDSP code, you have several options:
Option 1: Run the notebooks on Google Colab.
Option 2: Run the notebooks on Binder.
Option 3: Use Conda to install the libraries you need and run the notebooks on your computer.
Option 4: Use poetry to install the libraries you need and run the notebooks on your computer.
The following sections explain these options in detail.
Note: I have heard from a few people who tried to run the code in Spyder. Apparently there were problems, so I don’t recommend it.
I have recently updated most of the notebooks in this repository so they run on Colab.
You can open any of them by clicking on the links below. If you want to modify and save any of them, you can use Colab to save a copy in a Google Drive or your own GitHub repo, or on your computer.
- chap01.ipynb
- chap01soln.ipynb
- chap02.ipynb
- chap02soln.ipynb
- chap03.ipynb
- chap03soln.ipynb
- chap04.ipynb
- chap04soln.ipynb
- chap05.ipynb
- chap05soln.ipynb
- chap06.ipynb
- chap06soln.ipynb
- chap07.ipynb
- chap07soln.ipynb
- chap08.ipynb
- chap08soln.ipynb
- chap09.ipynb
- chap09soln.ipynb
- chap10.ipynb
- chap10soln.ipynb
- chap11.ipynb
- chap11soln.ipynb
To run the code for this book on Binder, press this button:
It takes a minute or so to start up, but then you should see the Jupyter home page with a list of files. Click on code to open the folder with the notebooks, then click on one of the notebooks (with the .ipynb extension).
Option 3: Install Python+Jupyter
First, download the files from this repository. If you are a Git user, you can run
git clone --depth 1 https://github.com/AllenDowney/ThinkDSP.git
Otherwise you can download this Zip file and unzip it. Either way, you should end up with a directory called ThinkDSP .
Now, if you don’t already have Jupyter, I highly recommend installing Anaconda, which is a Python distribution that contains everything you need to run the ThinkDSP code. It is easy to install on Windows, Mac, and Linux, and because it does a user-level install, it will not interfere with other Python installations.
If you have the choice of Python 2 or 3, choose Python 3.
There are two ways to get the packages you need for ThinkDSP. You can install them by hand or create a Conda environment.
To install them by hand run
conda install jupyter numpy scipy pandas matplotlib seaborn
Or, to create a conda environment, run
cd ThinkDSP conda env create -f environment.yml conda activate ThinkDSP
Option 4: Use poetry to manage the project on your computer or notebook locally.
First, download the files from this repository. If you are a Git user, you can run
git clone --depth 1 https://github.com/AllenDowney/ThinkDSP.git
Then, assuming you have poetry installed on your machine, run
cd ThinkDSP poetry install
to install the libraries you need in a virtual environment. To activate the environment, run
Jupyter should launch your default browser or open a tab in an existing browser window. If not, the Jupyter server should print a URL you can use. For example, when I launch Jupyter, I get
~/ThinkComplexity2$ jupyter notebook [I 10:03:20.115 NotebookApp] Serving notebooks from local directory: /home/downey/ThinkDSP [I 10:03:20.115 NotebookApp] 0 active kernels [I 10:03:20.115 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/ [I 10:03:20.115 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
In this case, the URL is http://localhost:8888. When you start your server, you might get a different URL. Whatever it is, if you paste it into a browser, you should see a home page with a list of directories.
Click on code to open the folder with the notebooks, then click on one of the notebooks (with the .ipynb extension).
Select the cell with the import statements and press «Shift-Enter» to run the code in the cell. If it works and you get no error messages, you are all set.
If you get error messages about missing packages, you can install the packages you need using your package manager, or install Anaconda.
If you run into problems with these instructions, let me know and I will make corrections. Good luck!
Special thanks to Freesound (http://freesound.org), which is the source of many of the sound samples I use in this book, and to the Freesound users who uploaded those sounds. I include some of their wave files in the GitHub repository for this book, using the original file names, so it should be easy to find their sources.
Unfortunately, most Freesound users don’t make their real names available, so I can only thank them using their user names. Samples used in this book were contributed by Freesound users: iluppai, wcfl10, thirsk, docquesting, kleeb, landup, zippi1, themusicalnomad, bcjordan, rockwehrmann, marchascon7, jcveliz. Thank you all!
Here are links to the sources:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Theory of digital signal processing (DSP): signals, filtration (IIR, FIR, CIC, MAF), transforms (FFT, DFT, Hilbert, Z-transform) etc.
License
hukenovs/dsp-theory
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Digital signal processing
Перед вами лекции по цифровой обработке сигналов (ЦОС) в виде тетрадок Jupyter Notebook на языке Python. Можно воспринимать их как полноценный курс по цифровой обработке или использовать как заметки по теоретическим аспектам и практическому применению в решении различных задач.
Материалы представлены с использованием библиотек на языке Python (numpy , scipy, librosa, matplotlib, seaborn etc). Основная информация взята из моих лекций, которые я читал студентам Московского Энергетического Института («НИУ МЭИ») и которая была использована на обучающих семинарах в Центре Современной Электроники. Лекции содержат перевод различных статей, компиляцию материалов из достоверных источников и литературы по тематике цифровой обработки сигналов, а также официальную документацию по прикладным библиотекам языка Python. Некоторые лекции написаны с помощью моих хороших знакомых и коллег, за что им отдельная благодарность!
- Сигналы: аналоговые, дискретные, цифровые. Z-преобразование,
- Преобразование Фурье: амплитудный и фазовый спектр сигнала, ДПФ и БПФ,
- Свертка и корреляция. Линейная и циклическая свертка. Быстрая свёртка
- Случайные процессы. Белый шум. Функция плотности вероятностей
- Детерминированные сигналы. Модуляция: АМ, ЧМ, ФМ, ЛЧМ. Манипуляция
- Фильтрация сигналов: БИХ, КИХ фильтры
- Оконная фильтрация. Детектирование слабых сигналов с помощью наложения окна,
- Ресемплинг: децимация и интерполяция. CIC-фильтры, фильтры скользящего среднего
- Непараметрические методы спектрального анализа
- Полифазные схемы преобразования Фурье — усреднение по частоте и по времени
- Банки фильтров в задачах аудиокодирования
- Фильтры Фарроу
- Мел-спектрограммы
- Кепстр и MFCC
- Вейвлет-преобразование
- Алгоритм Герцеля
- Установите miniconda
- Создайте и активируйте виртуальную среду
- Установите необходимые библиотеки из requirements.txt
- Запустите jupyter notebooks через Jupyter server или JetBrains DataSpell
# Создайте среду и установите необходимые библиотеки conda create -n "dsp_venv" python=3.9 -y conda activate dsp_venv pip install -r requirements.txt # Запустите jupyter notebook server и перейдите по ссылке из консоли jupyter notebook
Для лекции 15 необходимо отдельно установить библиотку scaleogram
# Склонируйте репозиторий git clone http://github.com/alsauve/scaleogram cd scaleogram # Установите библиотеку python ./setup.py install --user
Для конвертации ноутбуков в html формат можно выполнить скрипт convert.sh . Могут потребоваться следующие библиотеки:
nbmerge nbformat nbconvert
Для конвертации в pdf может потребоваться pandoc
- Alexander Kapitanov, @hukenovs
- Vladimir Fadeev, @kirlf
- Karina Kvanchiani, @karinakvanchiani
- Elizaveta Petrova, @kleinsbotle
- Andrei Makhliarchuk, @anotherhelloworld