Sampling Theory Studio is a Python application that allows users to reconstruct signals and observe how the sampling rate affects the reconstruction. The application provides various reconstruction methods and a composer to generate custom signals.
- Signal Reconstruction: Reconstruct signals using different methods.
- Sampling Rate Adjustment: Observe how changing the sampling rate affects the reconstruction.
- Signal Composer: Generate custom signals with desired frequency, amplitude, and phase.
- Noise Addition: Add noise to the signal and adjust the Signal-to-Noise Ratio (SNR).
- Visualization: Visualize the original signal, reconstructed signal, and the difference between them.
- Save and Load Scenarios: Save the whole setup of the app and load it with all its components where you left off
sampling_theory_app.mp4
-
Clone the repository:
git clone https://github.com/MohamedHisham20/sampling-theory-studio.git cd sampling-theory-studio -
Install the required dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Use the GUI to interact with the application.
-
Load or Compose a Signal:
- Use the "Browse CSV" button to load a signal from a CSV file.
- Or use the composer to generate a custom signal by adjusting the frequency, amplitude, and phase sliders.
-
Adjust Sampling Rate:
- Use the "Reconstruction Sampling Frequency" spin box to set the desired sampling rate.
-
Select Reconstruction Method:
- Choose a reconstruction method from the dropdown menu:
- Zero Order Hold
- Linear
- Sinc Interpolation
- Cubic Spline
- Fourier
- Nearest Neighbor
- Choose a reconstruction method from the dropdown menu:
-
Add Noise (Optional):
- Check the "Show Noise" checkbox to add noise to the signal.
- Adjust the SNR using the SNR slider.
-
Visualize the Results:
- The application will display the original signal, reconstructed signal, and the difference between them.
- The DFT Magnitude Plot will show the frequency components of the signal.
- Undersampling: If the sampling rate is too low, the reconstructed signal will not accurately represent the original signal, leading to aliasing.
- Nyquist Rate: Sampling at twice the highest frequency of the signal (Nyquist rate) ensures accurate reconstruction.
- Oversampling: Increasing the sampling rate beyond the Nyquist rate can improve the reconstruction but may also introduce unnecessary data points.
-
Compose a Signal:
- Set frequency to 5 Hz, amplitude to 1, and phase to 0.
- Click "Add Component" to add the signal component.
-
Set Sampling Rate:
- Set the sampling rate to 15 Hz.
-
Select Reconstruction Method:
- Choose "Sinc Interpolation" from the dropdown menu.
-
Visualize:
- Observe the original and reconstructed signals in the plots.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to everyone who has contributed to this project!
| GitHub Profile | |
|---|---|
| Abdelrahman Alaa | |
| Ibrahim Fateen | |
| Mohamed Hisham | |
| Salah Mohamed |
Dr. Tamer Basha & Eng. Omar Aldaw




