Concept Flow - Inverse FFT (ifft)
Input: Frequency Domain Data
Apply Inverse FFT
Compute Time Domain Signal
Output: Reconstructed Signal
The inverse FFT takes frequency data and converts it back to the original time signal.
import numpy as np from scipy.fft import ifft freq_data = np.array([0+0j, 2+0j, 0+0j, 2+0j]) time_signal = ifft(freq_data) print(time_signal.real)
| Step | Action | Input | Output | Notes |
|---|---|---|---|---|
| 1 | Receive frequency data | [0+0j, 2+0j, 0+0j, 2+0j] | Same array | Input is frequency domain array |
| 2 | Apply inverse FFT | Frequency data | Complex time domain array | Computes inverse FFT using scipy.ifft |
| 3 | Extract real part | Complex time domain array | [1.0, 0.0, -1.0, 0.0] | Imaginary parts are near zero due to numerical precision |
| 4 | Output time domain signal | [1.0, 0.0, -1.0, 0.0] | Final reconstructed signal | Signal matches original time domain data |
| 5 | End | - | - | Process complete |
| Variable | Start | After Step 2 | After Step 3 | Final |
|---|---|---|---|---|
| freq_data | [0+0j, 2+0j, 0+0j, 2+0j] | [0+0j, 2+0j, 0+0j, 2+0j] | [0+0j, 2+0j, 0+0j, 2+0j] | [0+0j, 2+0j, 0+0j, 2+0j] |
| time_signal | N/A | [ 1.+0.j 0.+0.j -1.+0.j 0.+0.j] | [ 1.+0.j 0.+0.j -1.+0.j 0.+0.j] | [1.0, 0.0, -1.0, 0.0] |
Inverse FFT (ifft) converts frequency domain data back to time domain. Input: frequency array (complex). Output: time domain signal (complex, often real). Use scipy.fft.ifft for computation. Imaginary parts near zero can be ignored for real signals.