CurveMole
QUICK START · A REPEATABLE RAMAN EXAMPLE

Fit a Raman spectrum,
step by step.

Load data, mask an artefact, subtract a curved background, fit three bands, assess uncertainty and export the analysis.

Stable-release screenshots · Actual CurveMole interface

Capture record ↗ · Get CurveMole ↗ · User manual ↗

The actual CurveMole workspace after fitting three Gaussian bands to the background-subtracted simulated Raman spectrum
The destination: data, individual bands, total fit and residuals in one workspace.
BEFORE YOU BEGIN

One isolated band. Two overlapping bands.

The input contains 801 samples from 200 to 1800 cm−1, three Gaussian bands, a quadratic background and independent Gaussian noise with known standard deviation σy = 2. A narrow positive artefact at 900 cm−1 lets you practise masking.

Unzip the practice pack into a working folder. Keep the original CSV files and use a separate folder for your exports. All data are simulated; Gaussian profiles are chosen for this exercise.

Click any screenshot to inspect the full-size image. The screenshot set and its version record are regenerated from the selected stable CurveMole build when the website is published.

01
DATA IMPORT

Load the spectrum and its Y errors.

  1. Open CurveMole and choose File → Import data… (Ctrl+I). Select raman-spectrum.csv.
  2. In the import mapping, choose raman_shift_cm-1 for X and intensity for Y.
  3. Map the third column, sigma_y, as a symmetric standard deviation: choose sigma_y under Uncertainty/weight and select the sigma_y column. It is a one-standard-deviation error, not a 95% interval.
  4. Check the preview, confirm the import and activate the curve in Series and curves.
Real CurveMole import dialog mapping Raman shift to X, intensity to Y and the known sigma_y column to Y uncertainty
IMPORT MAPPING X, Y and the absolute σy column are assigned before loading.
The imported simulated Raman spectrum in the actual CurveMole interface, including three bands, a curved background and a narrow spike at 900 inverse centimetres
CHECK THE INPUT The broad bands sit on a curved background; the very narrow feature near 900 cm−1 is the injected artefact.
02
DATA SELECTION

Exclude the artefact from the fit.

  1. Click the graphical Mask button.
  2. Right-drag over approximately 894–906 cm−1, covering the spike. The reference analysis excludes seven sampled points in this interval.
  3. Check the shaded interval and faded points. Click Mask again to return to normal graph navigation. Left-drag in mask mode removes a mask; Undo also reverses it.

Masking changes which observations enter the fit. It leaves their measured values intact. In this simulated example the artefact is known; a narrow feature in real data needs a scientific reason for exclusion.

The actual CurveMole graph with the 894 to 906 inverse centimetre interval masked around the simulated cosmic spike
MASKED, NOT DELETED The spike remains in the stored spectrum but is excluded from optimisation.
03
BACKGROUND ESTIMATION

Create a quadratic background from three points.

  1. Choose Polynomial in the function selector. Enable Initialize with points and Background, then press Add.
  2. Place three points in the peak-free regions listed below. Use the observed intensity near each coordinate; the green preview shows the polynomial being constructed.
  3. Use Move points, Delete points or Undo point if needed. Press Finish after the third point.
  4. Check Polynomial in Model and parameters: it has c0, c1 and c2, is marked as background and its point-initialised parameters are fixed.
Reference control points taken from the observed CSV
Raman shift / cm−1Observed intensity / a.u.
26082.924
85081.293
1720112.654

Three points means degree 2. Polynomial degree follows the number of distinct control points minus one. A fourth point creates a cubic polynomial; it does not add another observation to a quadratic fit. These points initialise the background function rather than fitting it to every measured point.

Real CurveMole manual-point placement with three background control points and a live polynomial preview
PLACE THE POINTS Three peak-free coordinates determine the quadratic estimate.
The committed polynomial background and fixed c0, c1 and c2 coefficients in CurveMole's model panel
CHECK THE FUNCTION The background is a model component with three fixed coefficients.
04
REVERSIBLE PROCESSING

Subtract the polynomial from the data.

  1. Choose Data → Subtract background….
  2. Keep the polynomial selected in the background list and confirm with OK.
  3. Inspect the corrected spectrum. CurveMole records the subtraction and disables the polynomial component so it will not be counted again in the next fit.

This operation changes the data supplied to subsequent fits while preserving the imported originals. The display-only command Remove fitted background in this view is a different operation and is not used here.

The actual Subtract background dialog with the polynomial background selected
SUBTRACT THE SELECTED BACKGROUND Confirm the function in the processing dialog.
Background-subtracted Raman data with the polynomial disabled in the model list and the artefact mask retained
VERIFY THE RESULT The bands remain; the subtracted polynomial is disabled.

Your clicked points may differ slightly from the reference coordinates. Small differences in the fitted parameters are therefore expected. The exact chosen polynomial is included in background-reference.csv.

05
MODEL BUILDING

Place three Gaussian bands.

  1. Choose Gaussian, clear Background and keep Initialize with points enabled.
  2. Press Add. Click a band centre and drag horizontally to a half-height edge to set its initial width. Place one isolated band and the two overlapping contributions, then press Finish.
  3. Use the approximate positions and widths below as starting estimates. The overlap makes individual heights difficult to read; the fit will refine the parameters.
  4. To match the reference labels, right-click each function and choose Rename function…: use Isolated band, Overlap A and Overlap B.
  5. Select each Gaussian in turn. In its parameter table set the Lower bound for area to 0, appropriate for these simulated positive bands. Leave the band parameters free; keep their Fixed boxes clear.
Guides for initial placement, not fixed fit parameters
FunctionCentre / cm−1Initial FWHM / cm−1Gaussian σ / cm−1
Isolated band500≈42≈18
Overlap A1190≈71≈30
Overlap B1260≈71≈30

Gaussian parameters are area, center and sigma; area is integrated intensity, not peak height. Keep the band parameters free and the polynomial disabled. Widths must remain positive.

Three graphically initialised Gaussian bands named Isolated band, Overlap A and Overlap B in the real CurveMole workspace
THE INITIAL MODEL The three band components are enabled; the previously subtracted background stays disabled.
06
WEIGHTED LEAST SQUARES

Run and inspect the first fit.

  1. Keep the tutorial spectrum active, with no other curves selected.
  2. Click Quick Fit. On first use it runs an independent local least-squares fit with the default linear loss and the imported σy values enabled as data errors.
  3. Wait for the spectrum to be marked Fitted, then inspect the total fit, each band and the residual panel.

The reference fit uses 794 unmasked observations and nine free Gaussian parameters. Supplied σy values are treated as absolute noise scales. Check convergence and residual structure before interpreting the parameter errors.

The successful three-Gaussian Quick Fit in CurveMole, with model components, fitted parameters and residuals
THE FIRST FIT A good description of the total curve can still leave individual bands correlated.
07
LOCAL PARAMETER UNCERTAINTY

Inspect the covariance intervals.

  1. Choose Fit → Uncertainty Analysis.
  2. Select Fit covariance and Active spectrum, then press Run explicit uncertainty analysis. This displays the local covariance estimate already available from the fit.
  3. Read the fitted value and lower/upper confidence limits for each free parameter. Keep the original ±1σ fit errors distinct from later explicit-analysis intervals.

These confidence intervals use a local covariance approximation around the fitted solution. The next step uses Monte Carlo samples to examine uncertainty and the coupling between overlapping-band areas.

Actual Fit covariance results showing fitted values and local confidence intervals in the CurveMole uncertainty panel
LOCAL INTERVALS An OK assessment means that these displayed checks flagged no issue; it does not establish model validity or rule out parameter coupling.

The polynomial background was estimated from three observed points, held fixed and subtracted. Its estimation uncertainty is not propagated into these band intervals. The reported errors are conditional on that chosen background.

08
EXPLICIT ERROR ANALYSIS AND CORRELATION

Resample and inspect the overlapping bands.

  1. In the same panel, select Parametric Monte Carlo and Active spectrum.
  2. For this short exercise choose Fixed count, 200 replicates and 95% confidence. Set CPU processes to 1 to match this reference run, and leave the per-replica timeout at its default.
  3. Press Run explicit uncertainty analysis. CurveMole generates data from the fitted model and the imported noise scale, then refits each replica.
  4. Inspect the completed/failed counts, interval bounds and assessment reasons. Select the displayed uncertainty method in the model panel if you want the Monte Carlo minus/plus errors shown beside each fitted value.
  5. With Parametric Monte Carlo still selected, find the area row for Overlap A. Click its Attention assessment to read the correlation with Overlap B area.
Real Monte Carlo settings with 200 fixed replicates and the software's interval-stability notice visible
QUICK EXERCISE The fixed-count notice is part of the real interface.
Actual completed Monte Carlo confidence intervals, replicate counts and parameter assessments
INSPECT THE RESULT Retain the replicate counts and any warnings with the intervals.

The reference Monte Carlo samples show a strong negative area correlation: r ≈ −0.97. One overlapping area can increase while the other decreases, with relatively little change in their sum. This is an empirical correlation across the refitted replicas; the local covariance of the original fit gives a separate estimate, r ≈ −0.97.

The real Monte Carlo Assessment details dialog identifying strong negative empirical correlation between the areas of Overlap A and Overlap B
READ THE CORRELATION REASON This assessment belongs to the selected Monte Carlo analysis and identifies which parameters compensate each other.

This is a correlation between parameter estimates in the chosen model. It does not by itself establish a physical relationship between the Raman bands.

200 fixed replicates illustrate the procedure; they do not establish interval stability. For intervals you intend to report, prefer Adaptive - stop when intervals stabilize and inspect its stopping reason and failed fits. In both covariance and Monte Carlo here, the estimated, subtracted background is held fixed: its uncertainty is not propagated into the band parameters.

09
NUMERICAL RESULTS FOR REPLOTTING

Export the observations and fitted traces.

  1. Choose File → Quick export: spectra and fit curves… (Ctrl+T), select this spectrum and choose an output folder.
  2. Include Individual fit functions/components, Total fit and Residuals (data - total fit).
  3. Leave Export spectrum with fitted background subtracted unchecked: the processing step already subtracted our polynomial.
  4. For the complete 801-row record, leave Export only non-masked points unchecked. For a separate table containing only the 794 fitted observations, export again with that option checked.
  5. Confirm. CurveMole writes one multi-column file named from the source spectrum, with descriptive headers for the observations and selected traces.
Actual numeric spectrum export dialog selecting observations, individual functions, total fit and residuals while leaving repeat background subtraction off
EXPORT NUMERICAL CURVES The mask controls fitting; you choose whether the excluded rows remain in the exported table.

If you include Combined fitted background, its column is zero in this model because the subtracted polynomial is disabled. It does not recover the original baseline; the reference exports leave this option unchecked. Keep the raw CSV and the supplied chosen-background table when reconstructing the whole processing sequence.

The reference downloads use the shorter names fit-curves.csv and fit-curves-unmasked.csv. To reproduce the plot outside CurveMole, keep replot.py, fit-curves.csv and background-reference.csv in one folder. With pandas and Matplotlib installed, run python replot.py there. It writes replotted-fit.png with the data, components, total fit and residuals; excluded points remain identified.

10
PARAMETER VALUES, ERRORS AND MATRICES

Export every function parameter.

  1. Choose File → Quick export: function parameters… and save the CSV in your results folder.
  2. Check Also export covariance matrices if you want the labelled fit covariance and, when available, a separate covariance from the selected Monte Carlo samples.
  3. Open the table in a spreadsheet or analysis program. The first two header rows identify the functions and their parameters; each spectrum occupies one data row.
Real function-parameter export dialog with Also export covariance matrices enabled
EXPORT PARAMETERS Values, fit errors and selected-analysis minus/plus errors remain distinguishable.

The table contains Gaussian area, center and sigma values and their errors, plus the polynomial coefficients retained in the project. Fixed background coefficients have no fitted uncertainty. The original fit-error columns and the selected explicit-analysis error columns describe different estimates.

11
SAVE AND ARCHIVE

Keep the project and the full analysis bundle.

  1. Choose File → Save project and save a .fitproj file. It retains original data, the mask, the subtraction, models and recorded analyses.
  2. Choose File → Export analysis bundle… (Ctrl+E). Select the numeric spectra, function parameters, uncertainty intervals/matrices, figures and a portable project copy.
  3. Export into a named results folder. Start with its README.txt to find the data tables, figures, reports and saved project.
The actual CurveMole analysis-bundle dialog grouping numerical data, parameters, uncertainty, figures and project export options
THE COMPLETE RECORD A project plus an analysis bundle keeps the processing and numerical outputs together.

Keep the software version, model, weighting and uncertainty method with the results. The practice pack includes the completed reference project so you can inspect the recorded state or compare it with your own.

12
OPTIONAL · A COMMUNITY EXTENSION

Load and use the cosmic-ray removal plugin.

Do this on a fresh copy of the raw spectrum after saving your fitted project. The optional exercise demonstrates an alternative treatment of the same injected artefact.

  1. Download the cosmic-ray removal plugin and extract it. Keep the manifest and Python module together in the cosmic_ray_removal folder.
  2. Choose File → New project and import raman-with-cosmic.csv, using the same X/Y/σy mapping as step 1. Leave this copy unmasked and without background subtraction.
  3. Open File → Plugin Manager, choose Choose plugin folder…, select the extracted folder and press Scan.
  4. Select the plugin and click Review and trust selected plugin…. Inspect its source and metadata; approve the Trust Python plugin dialog only after deciding to trust this code. Close the manager.
The actual Plugin Manager after discovering the official community cosmic-ray removal plugin from its extracted local folder
DISCOVER THE PLUGIN The manifest identifies the extension and its capabilities.
The real Trust Python plugin confirmation dialog for the cosmic-ray removal extension
REVIEW BEFORE LOADING Python plugins execute code with your account’s permissions.
  1. The plugin panel opens after loading. To reopen it, use View → Plugins: Panels → Cosmic-ray removal: review and clean (the entry also carries its plugin symbol).
  2. Keep Single spectrum — modified Z-score with the default threshold 10, median window 11 points, maximum spike width 5 points and candidate growth 1 point. Click Detect automatically.
  3. Inspect the candidate table and preview. In this example one candidate at approximately 898–902 cm−1 is marked Safe and selected for application. Detection and preview have not changed the stored data.
  4. Check that the selected event is the injected spike, then click Accept modifications. The selected three points are replaced by PCHIP interpolation; the original observations remain available and Undo reverses the correction.
Actual cosmic-ray removal panel showing a Safe detected candidate near 900 inverse centimetres, its checked Apply state and the correction preview
DETECT AND REVIEW The table and preview identify the points proposed for replacement.
The real CurveMole workspace after accepting the plugin's correction of the simulated cosmic spike
ACCEPT THE CORRECTION Only the reviewed candidate is replaced, as an undoable operation.

Masking and correction are different choices. The main tutorial keeps measured values and excludes an interval from fitting. The plugin exercise replaces selected values by an estimate. If you analyse the corrected copy, repeat background estimation, fitting and uncertainty analysis on that copy.

REPEAT, COMPARE, EXTEND

Now repeat the analysis with your own data.

You have imported uncertainties, excluded an artefact, constructed and subtracted a background, fitted overlapping bands, examined parameter correlation and saved both numerical results and a complete project.

About the simulation, uncertainty and screenshot versions

The generator uses NumPy seed 1729, area-normalised Gaussian bands and independent Gaussian noise with σy = 2. The polynomial is estimated from three noisy, peak-free observations and then held fixed. Its estimation uncertainty is not included in the subsequent band intervals. The masked artefact is an added one-sample spike; it is not experimental evidence.

The screenshots are captures of the actual CurveMole GUI, generated while executing this workflow. Their capture record identifies the stable software source and numerical results. The website build refreshes the images with the selected stable application version rather than reusing illustrations from an older release.

The capture manifest records the version used for this screenshot set.