Skip to content

AdarshRaj2602/DFT_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔢 DFT Visualizer — Signal Processing Lab

An interactive desktop tool for computing and visualizing the Discrete Fourier Transform step-by-step, built with Python + Tkinter.

Python Tkinter NumPy Matplotlib Status


✨ Features

  • 🧮 Bracket-style W matrix — textbook layout with magnitude & phase heatmaps
  • 📐 Step-by-step DFT expansion — every X[k] derived symbolically on screen
  • 📊 4-panel spectrum plots — Magnitude, Phase, Real, Imaginary
  • 📂 Flexible input — CSV / TXT / Excel import + PNG / PDF export
  • Live DFT preview — bar chart updates as you type on the Home page
  • 🔢 Zero-padding support — for N > signal length

🚀 Quick Start

# 1. Clone the repository
git clone https://github.com/AdarshRaj2602/DFT_tool.git
cd DFT_tool

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run the app
python main.py

🗂️ Project Structure

DFT_tool/
├── assets/
│   ├── icons/                  # App icons
│   └── themes/
│       └── theme.py            # Colours, fonts, design tokens
├── core/
│   ├── __init__.py
│   ├── dft.py                  # Pure DFT engine — build_w_matrix, compute_dft
│   └── fft.py                  # NumPy FFT wrapper
├── ui/
│   ├── __init__.py
│   ├── app.py                  # Main window, sidebar, navigation router
│   ├── home_page.py            # Animated home + live DFT preview
│   ├── input_panel.py          # Signal entry + controls
│   ├── matrix_panel.py         # W-matrix bracket display + heatmaps
│   ├── output_panel.py         # Step-by-step equations + results table
│   ├── plot_panel.py           # Spectrum plots
│   └── about_page.py           # Technical overview
├── utils/
│   ├── __init__.py
│   └── validators.py           # Signal parsing, file loading
├── main.py                     # Entry point
├── requirements.txt            # Python dependencies
└── README.md                   # You are here!

🧮 The DFT Formula

$$X[k] = \sum_{n=0}^{N-1} x[n] \cdot W_N^{nk} \qquad W_N = e^{-j2\pi/N}$$

Term Description
x[n] Input signal samples
N DFT size
W_N Twiddle factor
X[k] Frequency domain output

📦 Dependencies

numpy
pandas
matplotlib
openpyxl

Install all at once:

pip install -r requirements.txt

🛠️ How It Works

Step Action
1️⃣ Enter signal x[n] manually or import from file
2️⃣ Set DFT size N (or click Auto)
3️⃣ W matrix is built and displayed in bracket notation
4️⃣ Each X[k] expansion shown symbolically with twiddle values
5️⃣ Magnitude, Phase, Real & Imaginary spectra plotted

👨‍💻 Developer

Adarsh Raj Verma M.Tech — Machine Intelligence & Automation NIT Jalandhar

LinkedIn GitHub


If you found this useful, give it a star!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages