SpectralBench

Spectral Preprocessing

Baseline correction, smoothing, normalization, and derivatives — all in your browser

Features

  • Baseline correction — SNIP, polynomial, and rubberband algorithms
  • Smoothing — Savitzky-Golay filter with adjustable window and polynomial order
  • Normalization — min-max, vector, and area normalization
  • Derivatives — 1st and 2nd derivative with Savitzky-Golay
  • Processing presets — one-click workflows for common tasks
  • Batch processing — apply the same pipeline to multiple spectra
  • Full undo history — revert any step
  • Auto-parameter suggestions based on spectral characteristics

Supported Formats

JCAMP-DXSPCBruker OPUSCSVTXT

Raw spectral data rarely comes off an instrument ready for analysis. Baseline drift, fluorescence backgrounds, noise, and varying sample thickness all distort the spectrum and can lead to incorrect peak assignments or quantitative errors. Correcting these artifacts is not optional — it is the first step in any rigorous spectroscopic workflow.

SpectralBench provides a full spectral preprocessing toolkit that runs entirely in your browser. Build a processing pipeline step by step — baseline correction, smoothing, normalization, derivatives — with real-time preview on the chart and full undo history so no step is irreversible. Once your spectrum is cleaned up, continue directly to the Spectral File Viewer for inspection or the Compare Spectra tool to evaluate differences across samples. All processing runs client-side — your data never leaves your machine.

How It Works

Load a spectrum in any supported format — JCAMP-DX, SPC, Bruker OPUS, CSV, or TXT — and it renders immediately as an interactive chart. From there, add processing steps to build your pipeline. Every step previews in real time on the chart so you can see exactly how each operation changes your spectrum before committing.

Baseline correction removes drift and fluorescence backgrounds. Smoothing reduces noise while preserving peak shape. Normalization standardizes intensity scales across samples. Derivatives resolve overlapping bands and sharpen peak positions. Each step can be reordered, adjusted, or removed at any point — nothing is permanent until you export.

For common workflows, use built-in presets. The "FTIR standard" preset, for example, applies SNIP baseline correction followed by Savitzky-Golay smoothing and min-max normalization in a single click. When your pipeline is ready, export the processed spectrum to CSV or JCAMP-DX, or send it directly to the Peak Identifier for functional group assignment.

Baseline Correction Methods

SpectralBench offers three baseline correction algorithms, each suited to different spectral characteristics.

SNIP (Statistics-sensitive Non-linear Iterative Peak-clipping) iteratively estimates the baseline by clipping peaks from the spectrum over multiple passes. It makes no assumptions about the functional form of the baseline, which makes it especially effective for asymmetric peaks, broad fluorescence backgrounds, and Raman spectra where emission interference is strong. The primary parameter is the number of iterations — more iterations produce a smoother, lower baseline.

Polynomial baseline correction fits a polynomial of user-specified degree to a set of baseline anchor points. It works best for smooth, broad baselines in FTIR transmission spectra where the background curvature is predictable. The polynomial degree should match the baseline curvature — typically degree 2 to 5 — and anchor points can be placed manually or detected automatically at spectral minima.

Rubberband correction stretches a virtual rubberband beneath the spectrum, with the band touching the lowest-intensity points across the spectral range. It is conceptually simple and works well for spectra with clear, well-separated peaks and well-defined minima between them. No parameters need tuning — the algorithm adapts automatically to the spectral shape. All three methods include a real-time preview so you can compare results before applying.

Smoothing and Derivatives

SpectralBench uses Savitzky-Golay filtering for both smoothing and differentiation. Unlike a simple moving average, which convolves the spectrum with a rectangular window and broadens peaks while reducing their height, Savitzky-Golay fits a low-degree polynomial to each window of data points. This preserves peak shape, position, and relative height — all of which matter for quantitative work.

The window size controls the degree of smoothing: a larger window averages over more points and removes more noise, but at the cost of spectral resolution. The polynomial order controls how faithfully sharp features are preserved: a higher order retains more detail within each window. SpectralBench suggests starting parameters based on the spectral point density and noise level, which you can then fine-tune with the real-time preview.

First-derivative spectra remove constant baseline offsets and enhance inflection points, making them useful for peak position determination and background subtraction. Second-derivative spectra remove linear baseline drift entirely and resolve overlapping bands — a Gaussian peak in the original spectrum appears as a sharp negative peak in the second derivative, flanked by two positive lobes. The trade-off is that higher-order derivatives amplify noise, so smoothing before differentiation (or using Savitzky-Golay differentiation, which combines both steps) is strongly recommended.

Frequently Asked Questions

How do I baseline correct an FTIR spectrum?

Load your FTIR spectrum into SpectralBench, then select baseline correction from the preprocessing menu. Choose from three algorithms: SNIP (best for asymmetric peaks and fluorescence backgrounds), polynomial (best for smooth, broad baselines), or rubberband (best for spectra with clear minima). Adjust parameters using the preview, then apply. The original spectrum is preserved in the undo history.

What is Savitzky-Golay smoothing?

Savitzky-Golay is a polynomial-based smoothing filter that reduces noise while preserving peak shape, position, and height. Unlike simple moving averages, it fits a low-degree polynomial to each window of data points, which prevents the peak broadening and height reduction that simpler filters cause. You can adjust the window size (larger = more smoothing) and polynomial order (higher = better peak preservation).

When should I use the second derivative?

Second-derivative spectra are useful for resolving overlapping peaks, identifying shoulder bands hidden in broad absorptions, and removing linear baseline drift. The second derivative of a Gaussian peak produces a sharp negative peak at the original peak center, flanked by two smaller positive lobes. This makes it easier to determine exact peak positions in congested spectral regions. The trade-off is amplified noise, so smoothing before or during differentiation is recommended.

What normalization method should I use?

Min-max normalization scales the spectrum to a 0-1 range, making it easy to compare peak heights across samples. Vector normalization divides by the Euclidean norm, which is better for comparing peak shapes regardless of overall intensity. Area normalization divides by the total integrated area, which is useful for quantitative comparisons where the total amount of material varies between samples.

Can I apply the same processing to multiple spectra?

Yes. SpectralBench's batch processing feature lets you build a preprocessing pipeline (e.g., baseline correction → smoothing → normalization) and apply it to all loaded spectra at once. This ensures consistent processing across your entire dataset — essential for multivariate analysis, chemometrics, and large sample sets.

Related Tools

100% client-side
No account required
No data uploaded