A simple application that calculates peak intensity, area under the curve (AUC), and full width at half maximum (FWHM) from structural spectroscopy data (Raman, FTIR, UV-Vis, etc.). Using user-defined parameters, it processes multiple datasets in batch to eliminate manual analysis, extracting these spectral features into a clean, publication-ready Microsoft Excel spreadsheet where each processed spectrum is organized as a structured data row.
-
Multi-Format Ingestion: Load directories or custom selections of raw spectral files simultaneously.
-
Dual Visualization: Inspect spectra via an inline static dashboard plot or an interactive web-browser-based Plotly interface.
-
Spectral Info Summary: View a quick tabular overview of all loaded spectra details, including ranges, min/max intensities, and resolution steps.
-
Protocol Automation: Save or load parameter sets as reusable .json files to streamline workflows.
-
Structured Export: Generate clean data matrices matching calculated features against their source file signatures.
The application focuses on the specific spectral region you choose for each spectrum to calculate metrics based on your selected calculation type:
-
Area Under Curve ("Area") Evaluates the total integrated area of a specified spectral region using the composite trapezoidal rule via scipy.integrate.trapezoid.
-
Peak Intensity Extracts the highest measured value within your target window using numpy.max. If you select a single specific point on the X-axis (
$X_1 = X_2$ ), the app automatically finds and maps the closest available data point in the spectrum using an absolute distance matrix search. -
Full Width at Half Maximum ("FWHM Gaussian" / "Lorentzian" / "Gauss-Lorentzian") For peak width analysis, the app automatically finds the highest peak in your selected region using scipy.signal.find_peaks. It then fits this segment to a mathematical model (Gaussian, Lorentzian, or a mixed profile) using non-linear least squares optimization via scipy.optimize.curve_fit. Once the model fits the peak, the application calculates exactly how wide the peak is at half of its maximum height.
The backend parser handles raw instrumentation and data arrays automatically via file extensions:
- Bruker OPUS Data: Native files ending with numeric channel sequences (e.g.,
.0,.1). - Text/ASCII Columns: Spreadsheet exports containing standard format layouts (
.txt,.dat,.dpt). - JCAMP-DX & SPC Format: Standard laboratory instrumentation arrays (
.dx,.spc). - Renishaw & MATLAB Sets: Core analytical data arrays (
.wdf,.mat).
No Python installation required (Windows only).
- Download
Spectral_Calculation_Generator.zipfrom the Releases page. - Unzip the file.
- Double-click the
Spectral_Calculation_Generator.exefile to launch the Graphical User Interface.
If you are developing or modifying features, you can launch the script using a local environment setup:
- Clone or unpack the repository bundle.
- Install the necessary library framework dependencies using pip:
pip install -r requirements.txt python Spectral_Calculation_Generator.py
- Import Data: Click 📁 Open Directory or 📄 Open Files on the top toolbar to load your data.
- Define a Rule: In the right sidebar panel, input a descriptive label name (e.g., Amide_I), pick a calculation mode, define your X_axis range (X1→X2), and click ➕ Add.
- Run Processing Pipeline: Click the green 🧮 Calculate & Generate Excel button in the status bar at the bottom. Select a storage path on your computer, and the formatted report sheet will instantly generate.
-
File Format Requests: If an output file fails to load, open a GitHub issue and attach a sample file to request a parser update.
-
Bug Reports & Calculation Errors: Open a ticket on the GitHub Issues page including your .json parameter file and the error log.
-
Feature Requests: If you need more features or specific analytical metrics added to the pipeline, feel free to open an issue or start a discussion on the GitHub repository.
-
Direct Support: Send inquiries and sample datasets to: shibarjunmandal@gmail.com.
If this software helps automate your workflow and the generated results are utilized in a scientific publication, thesis, or conference report, please cite this repository to support the project:
Shibarjun Mandal, Spectral Calculation Generator (Version 1.0). GitHub Repository: Spectral-Calculation-Generator
If you find this utility useful and it saves you manual data-entry time, consider supporting further development! You can contribute and help keep the project active by clicking the Sponsor button at the top of the GitHub repository page.
This project is maintained under a standard open-source license. Authors retain intellectual property rights, but users are granted permission to freely use, modify, and distribute the code and executable, provided appropriate credit is given as outlined in the Citation section.
