-
Notifications
You must be signed in to change notification settings - Fork 0
Home
PyRamanGraphene is a Python package designed for analyzing Raman spectra data, specifically tailored for graphene materials. This repository provides tools to read, normalize, fit peaks, and visualize Raman spectra, focusing on the D, G, and 2D peaks typical in graphene characterization.
- Data Handling: Efficiently read and parse Raman spectra data.
- Normalization: Normalize spectra based on the G-peak intensity.
- Peak Fitting: Fit 2D peaks using Pseudo-Voigt and Lorentzian models.
- Visualization: Plot average raw spectra alongside fitted spectra for comparison.
- Baseline Correction: Implements baseline correction methods inspired by techniques from Data Science for Raman Spectroscopy - A Practical Example.
- Protocol: Follows fitting protocols as described in International interlaboratory comparison of Raman spectroscopic analysis of CVD-grown graphene for consistent and reproducible analysis.
To install PyRamanGraphene, clone the repository from GitHub:
git clone https://github.com/EmrahDURSUN/PyRamanGraphene.gitEnsure necessary libraries are imported:
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from lmfit.models import LorentzianModel, PseudoVoigtModelDefine peak ranges for D, G, and 2D peaks:
GRAPHENEPEAKS = [
{"prefix": "D", "range": {"min": 1290.0, "max": 1420.0}},
{"prefix": "G", "range": {"min": 1480.0, "max": 1700.0}},
{"prefix": "twoD", "range": {"min": 2580.0, "max": 2790.0}},
]Load Raman spectra data from file and prepare it for analysis:
file_path = "./Data/RawData/SampleMapSpectrum.txt"
- Read Raman shift values and spectra into a DataFrame
- Correct the Baseline and Normalize the spectra based on G peak intensity
- Fit the peaks using specified models
Fit the peaks using Pseudo-Voigt and Lorentzian models, then visualize results:
- Fit each spectrum individually using defined models
- Calculate average spectra (raw and fitted)
- Plot average raw and fitted spectra for Pseudo-Voigt and Lorentzian fits
Contributions to PyRamanGraphene are welcome! If you have suggestions, bug reports, or would like to add features, please fork the repository and submit a pull request.
GNU General Public License v3.0