This project is a Python-based data analysis tool designed to identify peaks in a noisy UV-Vis spectrum. It uses signal processing techniques to smooth the data, detect peaks, and visualize the results. The project is particularly useful for spectroscopy applications where identifying absorbance peaks is critical.
- Data Smoothing: Utilizes the Savitzky-Golay filter to clean noisy spectral data.
- Peak Detection: Identifies peaks in the smoothed spectrum using the
find_peaksfunction from thescipy.signallibrary. - Visualization: Generates a clear and informative plot of the noisy spectrum, smoothed spectrum, and identified peaks.
- Clone this repository to your local machine.
- Install the required dependencies listed in
requirment.txt:pip install -r requirment.txt
- Open the Jupyter Notebook
peak_Identifier.ipynb. - Run the cells sequentially to:
- Generate a noisy UV-Vis spectrum.
- Smooth the data.
- Identify and visualize the peaks.
- Python 3.x
- NumPy
- Matplotlib
- SciPy
- Generate Noisy Spectrum: A synthetic UV-Vis spectrum is created with added noise.
- Smooth the Data: The Savitzky-Golay filter is applied to reduce noise and enhance the signal.
- Detect Peaks: Peaks are identified based on a minimum height threshold and a minimum distance between peaks.
- Visualize Results: The noisy spectrum, smoothed spectrum, and identified peaks are plotted for easy interpretation.
The output includes a plot with:
- The noisy spectrum in light gray.
- The smoothed spectrum in green.
- Identified peaks marked with red 'x'.
- A blue dashed line indicating the threshold.
This project is open-source and available under the MIT License.
Khadija Goni
Feel free to contribute to this project by submitting issues or pull requests.