An interactive desktop tool for computing and visualizing the Discrete Fourier Transform step-by-step, built with Python + Tkinter.
- 🧮 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
# 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.pyDFT_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!
| Term | Description |
|---|---|
x[n] |
Input signal samples |
N |
DFT size |
W_N |
Twiddle factor |
X[k] |
Frequency domain output |
numpy
pandas
matplotlib
openpyxlInstall all at once:
pip install -r requirements.txt| 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 |
Adarsh Raj Verma M.Tech — Machine Intelligence & Automation NIT Jalandhar
⭐ If you found this useful, give it a star!