mineral_spectra_analysis

Preprocess, match, and unmix Raman mineral mixture spectra with NNLS.

288|34|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/PKU-YuanGroup/OpenAI4S --skill mineral-spectra-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mineral_spectra_analysis
Source: https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/mineral_spectra_analysis
Command: npx skills add https://github.com/PKU-YuanGroup/OpenAI4S --skill mineral-spectra-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, pybaselines, matplotlib, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenge of analyzing mixed mineral Raman spectra, enabling users to preprocess noisy spectra, match residual peaks against a reference spectral library, unmix components with NNLS, diagnose reliability, write reports, and optionally generate/evaluate synthetic benchmark cases with hidden ground truth.

Core Features & Use Cases

  • Preprocessing: Despike, denoise, baseline correction, and normalization of noisy Raman spectra.
  • Spectral Library Matching: Iterative matching of residual peaks against a reference spectral library.
  • Component Unmixing: Unmixing of components using NNLS.
  • Reliability Diagnosis: Diagnosing the reliability of the analysis.
  • Reporting: Writing detailed reports of the analysis.
  • Synthetic Benchmarking: Optionally generating and evaluating synthetic benchmark cases with hidden ground truth.
  • Use Case: A geologist may use this Skill to analyze a complex Raman spectrum of a rock sample and determine the types and proportions of minerals present.

Quick Start

To run the analysis on a given spectrum, execute the following command:

python -m mineral_spectra_analysis kernel.analyze_spectrum_file --spectrum_csv_path "path/to/spectrum.csv" --library "path/to/library" --output_dir "path/to/outputs"

Frequently Asked Questions about mineral_spectra_analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I unmix mineral components from a Raman mixture spectrum?

To unmix mineral components from a Raman mixture spectrum, this Skill preprocesses the data, matches residual peaks against a spectral library, and applies NNLS unmixing to determine the types and proportions of minerals present.

What is the best way to preprocess noisy Raman spectra for mineral analysis?

Preprocessing noisy Raman spectra for mineral analysis involves applying despiking, denoise, baseline correction, and normalization steps using libraries like numpy, scipy, and pybaselines before matching peaks.

Can I use this pipeline to benchmark synthetic Raman spectra with hidden ground truth?

Yes, you can benchmark synthetic Raman spectra by optionally generating and evaluating test cases with hidden ground truth to assess the reliability of the unmixing and peak matching diagnostics.

Do I need a specific reference library to match mineral Raman peaks?

Yes, peak matching requires a reference library such as the RRUFF spectral library to iteratively identify residual peaks and diagnose the reliability of the mineral unmixing results.

Why does my mineral Raman spectral analysis report low reliability diagnostics?

Low reliability diagnostics in mineral Raman spectral analysis often indicate poor unmixing results, which may stem from insufficient preprocessing, missing reference spectra in the library, or highly noisy mixture data.

Does this Raman spectroscopy pipeline support Python scientific libraries?

This Raman spectroscopy pipeline supports Python scientific libraries including numpy, scipy, pybaselines for baseline correction, and matplotlib for visualizing the analyzed spectral data and diagnostics.