SpectraSherpa User Manual
Overview
SpectraSherpa is an integrated platform for spectroscopic data analysis, synthesis, and workflow automation. This manual covers how to load different data sources and synthesize spectral data.
Table of Contents
- Loading SpectroChemPy Data (Experiments)
- Loading NIST Reference Spectra
- Loading 96-Well Essential Oil Data
- Loading DOE Calibration Data (Project 1)
- Synthesizing Data with the Builder
- Workflow Builder
- Status Indicators
1. Loading SpectroChemPy Data (Experiments)
The Experiments module manages experimental spectra with versioning and metadata tracking.
Creating a New Experiment
- Navigate to Experiments in the sidebar
- Click the Create tab
- Fill in the experiment details:
- Name: Descriptive name for your experiment
- Description: Purpose and notes
- Hardware: Spectrometer used (optional)
- DOE Setup: Link to Design of Experiments configuration (optional)
- Click Create Experiment
Uploading Spectra Files
- Select an experiment from the Overview tab
- Switch to the Files tab
- Choose the file stage:
- Raw: Original unprocessed spectra
- Preprocessed: Cleaned/corrected spectra
- Synthetic: Generated/blended spectra
- Drag and drop files or click to browse
- Supported formats:
- CSV (wavenumber, absorbance columns)
- JCAMP-DX (.jdx, .dx)
- SPC files
- SpectroChemPy native formats
Version Management
- Go to the Versions tab
- Click Create Version to snapshot current state
- Enter version name and description
- To restore: click the restore icon on any version
Loading Experiment Data in Builder
Once files are uploaded, they become available in the Synthesis module: 1. Go to Synthesis > Preprocess tab 2. Select your experiment from the dropdown 3. Choose files to preprocess
2. Loading NIST Reference Spectra
The Library module provides access to NIST WebBook reference spectra.
Searching NIST Database
- Navigate to Library in the sidebar
- Use the Search tab
- Type a compound name (e.g., "ethanol", "limonene")
- Results show:
- Compound name
- CAS number
- NIST identifier
Downloading Spectra
- From search results, click Download for standard resolution
- Or click High-Res for higher resolution data
- Download progress appears in the right panel
- Downloads are queued and processed in background
Viewing Library Entries
- Switch to the Library tab
- Browse all downloaded spectra
- Click any entry to view:
- Interactive spectrum plot
- Wavenumber range
- Resolution details
- Download date
Using Library Spectra in Synthesis
- In the Library tab, select spectra for blending
- Click Add to Builder
- Navigate to Synthesis to use them
3. Loading 96-Well Essential Oil Data
The DOE (Design of Experiments) tab in Experiments manages 96-well plate configurations for essential oil analysis.
Setting Up the Sample Database
- Navigate to Experiments > select your experiment
- Go to the DOE tab
- In the Sample Database section:
- Click Import CSV to bulk import samples
- Or manually add samples with:
- Sample ID
- Name (e.g., "Lavender EO", "Peppermint EO")
- Type (essential_oil, carrier, standard)
- Brand/Source
- CAS Number (if applicable)
Creating Mixtures
- In the Mixtures section, click New Mixture
- Select component samples from the database
- Specify composition:
- Weight %: Mass-based percentages
- Mole %: Molar percentages
- Volume %: Volume-based percentages
- Name the mixture (e.g., "Blend A - 50% Lavender, 50% Peppermint")
Assigning Wells on the 96-Well Plate
- In the 96-Well Plate Map section:
- Visual grid shows all 96 wells (A1-H12)
- Select a mixture from the dropdown
- Click wells to assign that mixture
- Color coding shows different mixtures
- Plate Statistics show:
- Assigned wells count
- Empty wells count
- Mixture distribution
Matching Acquisition Files to Wells
- Upload your spectra files in the Files tab
- Return to DOE > Acquisition Matching section
- Click Auto-Match to automatically match files to wells
- Matching uses filename patterns to identify:
- Well position (e.g., "A1", "B12")
- Sequence number
- Replicate information
- Review and manually correct any mismatches
Loading 96-Well Data in Builder
- Go to Synthesis > Preprocess tab
- Select your 96-well experiment
- Files are organized by well position
- Select wells/files to preprocess together
4. Loading DOE Calibration Data (Project 1)
DOE Configurations store structured experimental designs for calibration studies.
Creating a DOE Configuration
- Navigate to Experiments > DOE tab
- Or access DOE Configs directly
Defining Experimental Factors
- In the Experimental Factors section:
- Add Sample Factors:
- Concentration levels
- Component ratios
- Sample types
- Add Method Factors:
- Temperature
- Integration time
- Number of scans
- For each factor, specify:
- Name
- Type (categorical or continuous)
- Levels (e.g., [0, 25, 50, 75, 100] for concentration %)
Setting Up Run Sequences
- In the Run Sequence section:
- Define the order of experimental runs
- Each run includes:
- Sequence order
- Factor level values
- Folder path for data files
- Batch identifier
Loading Calibration Data
- Upload calibration spectra files to the experiment
- Match files to run sequences in Acquisition Matching
- The system links:
- Spectra files
- Well positions (if applicable)
- Factor values (concentrations, conditions)
Using Calibration Data in Builder
- Go to Synthesis > Preprocess tab
- Select the calibration experiment
- Files are available with their associated metadata
- Use for:
- Building calibration curves
- Creating synthetic mixtures
- Validating models
5. Synthesizing Data with the Builder
The Synthesis module creates synthetic spectra by blending reference species.
Preprocess Tab
Purpose: Clean and prepare spectra before blending.
Loading Spectra
- From Experiments: Select experiment and files
- From Library: Add NIST reference spectra
- Both sources can be combined
Preprocessing Settings
| Setting | Description | Default |
|---|---|---|
| Alignment Method | Wavenumber interpolation (pchip, linear, sinc) | pchip |
| Apply Range Limit | Clip to wavenumber range | Off |
| Min/Max Wavenumber | Range bounds (cm^-1) | 400-4000 |
| Cosmic Ray Removal | Remove spike artifacts | On |
| Savitzky-Golay Smoothing | Noise reduction filter | On |
| Clip Floor | Set minimum absorbance value | Off |
Running Preprocessing
- Configure settings
- Click Run Preprocessing
- View results in the plot panel
- Each spectrum shows as a separate trace
Blend Tab
Purpose: Combine species spectra with concentration profiles.
Selecting Species
- Preprocessed spectra appear as available species
- Check species to include in blend
- Each species represents a pure component
Defining Concentration Profiles
Create time-series concentrations for each species:
Species A: [100, 80, 60, 40, 20, 0] (decreasing)
Species B: [0, 20, 40, 60, 80, 100] (increasing)
Species C: [50, 50, 50, 50, 50, 50] (constant)
Concentration Curve Editor: 1. Select a species 2. Draw curve points on the canvas 3. Or enter values numerically 4. Curves are interpolated between points
Blending Options
| Option | Description |
|---|---|
| Pathlength (m) | Optical pathlength for Beer's Law |
| Absorption Coefficient | Molar absorptivity |
| Time Steps | Number of blend time points |
Running the Blend
- Configure concentrations for all species
- Click Blend Spectra
- Result shows:
- Time-series of blended spectra
- 3D surface plot (wavenumber x time x absorbance)
- Individual time slices
Export Tab
Purpose: Save synthetic data for external use.
Export Formats
| Format | Use Case |
|---|---|
| CSV | Spreadsheet analysis, simple import |
| JSON | Web applications, metadata preservation |
| NetCDF | Scientific computing, large datasets |
| Python Script | Reproducibility, automation |
Export Options
- Select output format
- Choose data to include:
- Preprocessed spectra
- Blended results
- Concentration profiles
- Full metadata
- Click Export
- File downloads to your system
6. Workflow Builder
The Workflow Builder creates visual analysis pipelines.
Adding Nodes
From the left toolbar, click to add nodes:
| Category | Nodes |
|---|---|
| Data | Load Data |
| Preprocess | Normalize, Scale, Baseline, Smooth |
| Analysis | PCA, PLS, MCR-ALS |
| Stats | Statistics |
| Visualize | Scatter Plot |
| Export | Export |
Connecting Nodes
- Click Connect on a source node
- Click Connect Here on the target node
- Arrow shows data flow direction
Configuring Nodes
- Click a node to select it
- Inspector panel shows parameters
- Adjust settings as needed:
- Normalization method
- Number of components
- Output format
Executing Workflows
- Click Execute Workflow
- Nodes process in topological order
- Status shows:
- Pending (gray circle)
- Processing (yellow, animated)
- Complete (green checkmark)
- Results display in inspector panel
Exporting Python Code
- Click Export Python
- Downloads executable Python script
- Uses SpectroChemPy for full compatibility
7. Status Indicators
The top bar shows four status lights:
| Position | Indicator | Colors |
|---|---|---|
| 1st | Data | Green: Sources available / Gray: No experiments |
| 2nd | Workflow | Green: Ready / Yellow: Unsaved changes / Gray: Empty |
| 3rd | LLM | Green: Connected / Yellow: Connecting / Red: Disconnected |
| 4th | Compute | Blue: Local |
Hover over any indicator for detailed status.
Quick Start Workflow
Example: Essential Oil Blend Analysis
- Create Experiment
-
Experiments > Create > "Essential Oil Study"
-
Set Up 96-Well Plate
- DOE tab > Import samples
- Create mixtures
-
Assign wells
-
Upload Spectra
- Files tab > Upload raw spectra
-
Match to wells in DOE > Acquisition Matching
-
Add Reference Spectra
- Library > Search "limonene", "linalool"
-
Download reference spectra
-
Preprocess
- Synthesis > Preprocess tab
- Select experiment files + library references
- Apply smoothing, baseline correction
-
Run Preprocessing
-
Blend
- Blend tab > Select species
- Define concentration profiles
-
Run Blend
-
Analyze
- Workflow Builder > Add PCA node
- Connect to data
-
Execute and view results
-
Export
- Export tab > Download CSV/Python script
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+S |
Save current work |
Ctrl+Z |
Undo |
Ctrl+Shift+Z |
Redo |
Delete |
Remove selected node |
Escape |
Cancel current operation |
Troubleshooting
Common Issues
"No experiments loaded" - Create an experiment first - Check that files are uploaded
"LLM Disconnected" - Check backend server is running - Verify WebSocket connection
"Workflow execution failed" - Check node connections - Verify data node has valid source - Review error message in toast
"NIST download stuck" - Check internet connection - NIST may rate-limit requests - Try again after a few minutes
Support
For issues and feature requests, visit: https://github.com/Spectra-Scientific-LLC/Spectra-Sherpa/issues