The complete manual for loading, preprocessing, fitting, mapping and machine-learning analysis of Raman spectra — every tool, every parameter, and the mathematics behind them.
Section 01
Nitida is a local-first desktop application: every spectrum, fit and model stays on your machine. Nothing is uploaded, no telemetry is collected.
| Platform | Installer | Notes |
|---|---|---|
| macOS | Nitida_x.y.z_aarch64.dmg |
Open the DMG and drag Nitida to Applications. On first launch macOS may say the app is from an unidentified developer: right-click the app → Open → Open. This is needed only once. |
| Windows | Nitida_x.y.z_x64-setup.exe |
Run the installer. If SmartScreen appears, choose More info → Run anyway. |
| Linux | Nitida_x.y.z_amd64.deb |
Install with sudo apt install ./Nitida_x.y.z_amd64.deb (Debian/Ubuntu/Mint). |
On first start Nitida asks for your license key (received by email after purchase). Paste it in the License key field and press Activate. The key is validated online once, then cached: the app works fully offline and only re-validates every 7 days (with a 3-day grace window if you happen to be offline when a re-check is due). You can manage billing, seats and keys at any time from the customer portal linked on the activation screen and in Settings → License.
Each time Nitida starts, its scientific engine (a local Python backend) boots in the background. The progress bar on the splash screen tracks the real state of the engine, and Enter workspace unlocks the moment it is ready — typically a few seconds.
Nitida is organized as a guided pipeline, visible in the left sidebar. Steps 01–05 follow the natural order of a Raman analysis; the two tools at the bottom are available at any time. A check mark appears next to each completed step.
| Step | Page | Purpose |
|---|---|---|
| 01 | Data | Load a spectrum, a collection or a 2D map (Section 02). |
| 02 | Background | Remove baseline & cosmic rays (Section 03). |
| 03 | Crop | Restrict the Raman-shift window (Section 03). |
| 04 | Peak Fit | Deconvolve the spectrum into peaks (Section 04). |
| 05 | Map Analysis | Fit every map point, build heatmaps (Section 05). Enabled only for maps. |
| 06 | Multivariate | PCA, clustering, classification (Section 06). |
| · | AI Assistant | Local literature & interpretation agent (Section 07). |
| · | Settings | Presets, JSON workflows, license (Section 08). |
When a new version is available, a coral banner appears at the bottom of the sidebar. Updating is a deliberate two-step process — the app never restarts by itself:
Section 02
Drop one file — Nitida detects the format, the layout and whether it is a single spectrum, a collection or a spatial map. No format pickers, no import wizards.
| Family | Extensions | What is read |
|---|---|---|
| Renishaw WiRE 4+ | .wdf |
Single spectra, depth/line series and StreamLine maps, with laser metadata. Wavelength axes are converted to cm⁻¹ automatically when the laser line is recorded in the file. |
| Renishaw WiRE 2/3 | .wxd |
Single spectra, series and full maps from the classic WiRE format — read natively (Nitida ships the only reader in existence for this format, validated point-by-point against WiRE’s own exports). |
| Bruker OPUS | .0 .1 .2 … |
Raman and single-channel blocks (numbered OPUS extensions are recognized automatically). |
| Thermo | .spc · .spa |
GRAMS .spc (incl. multifile sub-spectra) and Nicolet/OMNIC .spa. |
| Horiba | .ngs |
LabSpec NGS binary spectra. (For native .l6s/.l6m, export .txt or .ngs from LabSpec.) |
| Princeton Instruments | .spe |
WinSpec/LightField frames; wavelength calibration converted to cm⁻¹ when the laser line is present. |
| JCAMP-DX | .jdx · .dx |
Single and multi-block files. |
| MATLAB | .mat |
WITec Suite/Project exports (single spectra and image scans) and generic axis + matrix layouts, v5–v7.3. |
| NumPy / HDF5 | .npy .npz · .h5 .hdf5 .nxs |
Arrays with recognizable axis/data keys; NeXus NXdata groups; 3D cubes load as maps. |
| Text | .txt .csv .dat .tsv .prn |
2-column (shift, intensity), multi-block collections, 3-column indexed collections, 4-column maps (x, y, shift, intensity) and Frame/Position map layouts. Tab, comma or whitespace separated. |
.wip → export
.mat; Horiba .l6m → export .txt).Alternatively, switch to path mode and paste the absolute path of a file already on disk — fastest for multi-gigabyte maps, since nothing is copied.
| Mode | When | What it unlocks |
|---|---|---|
| Single | One spectrum | Background → Crop → Peak Fit. |
| Collection | Several spectra without spatial coordinates (multi-block files, series, depth scans) | Everything except Map Analysis; Multivariate works on the collection. |
| Map | Spectra on a 2D (x, y) grid | The full pipeline, including Map Analysis heatmaps and spatially-resolved multivariate views. |
Under Advanced options on the load card:
Section 03
Two light steps that decide the quality of everything downstream: remove what is not signal, keep the window you care about.
Every spectrum used anywhere in Nitida goes through the same deterministic pipeline:
raw → cosmic-ray removal → background subtraction → crop
The checkbox Remove cosmic rays (Background page, on by default) despikes every spectrum before any other processing. Detection uses a modified Z-score on the discrete Laplacian of the signal:
Points with z > 6 spanning at most 7 samples are treated as spikes and replaced by linear interpolation from clean neighbours (two passes). Real Raman peaks are wider and survive untouched.
Pick a method on the left, tune its parameters, and watch the Live preview update in real time on the current sample spectrum (Original, Background and Corrected traces). When it looks right, press Apply subtraction — the settings are stored and applied to every spectrum from then on.
| Method | Best for | Parameters | How it works |
|---|---|---|---|
| Polynomial | Smooth, gently curving baselines | Degree 1–10 (default 3) | Least-squares polynomial fit on the normalized axis; excluded regions are masked out of the fit. |
| arPLS | Fluorescence backgrounds | λ (smoothness) 10–10 000 (default 1000) · asymmetry ratio (default 0.001) · iterations (default 10) | Iteratively reweighted penalized least squares: solves (W + λDᵀD)z = Wy, where D is the second-difference operator. Higher λ → stiffer baseline. Combine with exclusion regions over strong peaks for best results. |
| Rolling Ball | Broad curved backgrounds | Window 5–200 pts (default 50) · iterations 1–10 (default 3) | Repeated 1-D minimum filter — the baseline hugs local minima. Excluded regions are bridged linearly first so peaks cannot pull the filter. |
| Rubberband | Convex baselines | — | Convex hull under the spectrum; a cubic spline through the hull anchor points becomes the baseline. |
| SNIP | Multi-component backgrounds | Iterations 10–500 (default 100) · smoothing window (odd, default 5) | Iterative peak clipping with a growing window: bj ← min(bj, (bj−w+bj+w)/2), optional moving-average smoothing. |
Strong peaks can drag any baseline upward. Add excluded regions over them — the baseline algorithms then ignore those windows. Two ways: type Start/End in cm⁻¹ and click Add region, or click Draw exclusion in the header and tap two points directly on the chart. Regions appear as red bands on the preview and can be deleted individually.
Clamps the corrected spectrum at zero: I′ = max(I − b, 0). Useful before non-negative decompositions (NMF/MCR, Section 06).
The Crop page restricts every later analysis to a Raman-shift window (fingerprint region, a single band family, …). Set Min/Max (cm⁻¹) numerically, or click Select on chart and tap two points on the spectrum — the kept range is highlighted in green. Press Apply crop; Reset restores the full range at any time.
Section 04
Decompose a spectrum into physical peaks — positions, amplitudes and widths — with a fitting engine built for stubborn Raman data.
The Peak Fit page fits the current sample spectrum (with your background, crop and cosmic-ray settings already applied). You choose an engine, a peak shape and where the initial peak guesses come from, then press Run fit.
All three models are normalized to peak height (the amplitude a is the height at the centre, for any mixing), so amplitudes are directly comparable across shapes.
b = centre, γ = half-width at half-maximum. The natural line shape of most Raman bands.
L and G share one FWHM; the mixing fraction η is fitted (η = 1 pure Lorentzian, η = 0 pure Gaussian). This is a linear pseudo-Voigt, not a true convolution Voigt.
| Source | How |
|---|---|
| Auto-detect | A noise-adaptive, multi-scale detector finds candidate peaks. Tune Detection sensitivity (prominence, default 0.05) and Min peak width (default 5 cm⁻¹), press Detect peaks, then tick the ones to keep. The threshold adapts to the local noise: prominence = max(setting, 3·noise), with noise estimated as 1.4826 × MAD of the first difference. |
| Manual | Set the number of peaks, then click on the spectrum to place each one (click = position + height; width defaults to 5 cm⁻¹), or type the amplitude / position / width of each peak directly. |
| Literature | Appears only after the AI assistant has supplied published peak positions for your material (Section 07). Seeds the fit from the literature values. |
Enhanced (lmfit) — the default. Builds a composite model and tries up to five solvers
in turn (Levenberg–Marquardt, trust-region least-squares, Powell, Nelder–Mead, differential
evolution), scoring each result and keeping the best. It is robust against poor starting points.
Standard (curve_fit) — SciPy's curve_fit with a three-tier adaptive
multi-start; faster, no extra dependency. If a first pass fits poorly it automatically retries
with perturbed starts and relaxed bounds.
Tick Rigid constraints (Manual mode) to impose hard [min, max] bounds per peak on amplitude, position and width. These are never loosened by the solver — useful to lock a known band. Widths are entered as FWHM and converted internally to the shape's native width.
After a successful fit the right column shows the goodness of fit and a per-peak table.
| Metric | Meaning |
|---|---|
| R² | Coefficient of determination, R² = 1 − SSres/SStot. Closer to 1 is better. |
| χ² (reduced) | Reduced chi-square = χ²/(Ndata − Nparams) (lmfit only). Near 1 indicates a fit consistent with the noise. |
| Per peak | Position (cm⁻¹), Amplitude (height) and FWHM (cm⁻¹). |
Every fit produces a customizable figure: edit the title and axis labels (LaTeX-style tokens
like $I_D/I_G$ are supported), font sizes, data and fit colours, per-peak colours
and fill opacity, and rename each peak with its assignment (e.g. “D band”, “G band”). Export as
PNG (2400×1600, publication-ready), SVG (vector) or interactive HTML.
Section 05
Fit every spectrum of a 2D map and turn any fitted quantity into a spatial image. Available for datasets with (x, y) coordinates.
Configure and run one single-spectrum fit first (Section 04) so Nitida knows the peak model to propagate. Then, on the Map Analysis page, click Apply fit to entire map. Every point is fitted with the same background, crop, shape and peak count. A progress panel and a floating widget track the job; you can navigate away and it keeps running.
For each fitted peak i the map stores, at every pixel:
| Parameter | Meaning |
|---|---|
| peaki_pos | Band position (cm⁻¹) |
| peaki_amp | Peak height |
| peaki_fwhm | Full width at half maximum (cm⁻¹) |
| peaki_eta | Lorentzian fraction η (pseudo-Voigt) |
| r_squared | Per-pixel fit quality |
| ratio_pj_pk | Amplitude ratio between any two peaks (auto-generated) |
Select any parameter and it is rendered as a heatmap over the stage grid. You control the colorscale (Viridis, Plasma, Inferno, Turbo, RdYlGn, Spectral, Blues, Reds, Jet), clamp the colour range with Min/Max value, and choose Interpolation: None, Smooth (Bicubic) (3× cubic upsampling) or Smooth (Gaussian) (σ = 1 blur). Labels accept LaTeX, and Free zoom unlocks the 1:1 aspect ratio. Click any pixel to open the spectrum-and-refit dialog for that point.
Add custom parameter evaluates a math expression over the parameter maps and stores
the result as a new named map — usable everywhere. Type parameter names directly and combine
them with + − * / ^ and functions sqrt, log, exp, sin, … and constants
pi, e. One-click Quick formulas insert common templates. For example, the
analytic peak areas are:
The classic graphitic-carbon ratio ID/IG is
simply peak1_amp / peak2_amp (or an area ratio using the formulas above).
The 3D Surface tab renders the same parameter as a height field, with colorscale, opacity, projected contour lines, camera presets (Publication, Top, Side, Front, Isometric or a free camera), colour-range and axis overrides, and automatic downsampling for very large maps.
The Profile cut tab extracts a 1D line — a vertical/horizontal cut at a fixed coordinate (bilinear interpolation) or a row/column mean, optionally restricted to a rectangular region of interest and a value window. Clicking any heatmap pixel opens Spectrum at (x, y), where you can view the Original / Processed / Fitted spectrum and refit that single point with adjusted guesses and bounds; the change updates every heatmap instantly, and Revert restores the original values for that pixel.
The Export tab downloads the fitted data — CSV (one parameter grid) or XLSX (every parameter, one sheet each) — and the heatmap as a high-resolution PNG (1920×1440) or interactive HTML.
Section 06
Treat a whole map or collection as a dataset: reduce it, cluster it, correlate it, classify it. This is the deepest part of Nitida — this section spells out the mathematics of each method.
Every method operates on a matrix X (rows = spectra, columns = features). Three ways to turn each spectrum into a feature vector:
| Mode | Feature = | Options |
|---|---|---|
| Full spectra | Every point on a common Raman-shift grid | Auto grid (intersection of all spectra) or an explicit min/max and number of points. |
| Bands / bins | An aggregate inside each wavenumber window | Uniform bins, custom drawn bins, or ±5 cm⁻¹ keypoints; aggregator = mean, median, sum, trapezoidal integral or max. |
| Peak parameters | Fitted peak quantities from the map fit | Select any peak position/amplitude/FWHM, plus derived expressions
(e.g. ID_over_IG = peak1_amp / peak2_amp). |
Transforms applied to X right before every run. The most important, per spectrum i or per column j:
Column scaling: None · Mean-center · Autoscale (z-score) · Pareto · SNV (row) · MSC (row) · Vector norm (row). Row normalization: total area (L1), max, or L2. NaN policy: drop rows, impute mean/median, or zero-fill. Force non-negativity shifts X so it is ≥ 0 — required for NMF/VCA/MCR (Nitida enables it automatically when needed).
Finds orthogonal directions of maximum variance via the SVD X = U S VT: the loadings are the rows of VT, the scores are T = X·V, and the variance explained by component a is λa = sa²/(n−1). Nitida also reports two diagnostics per spectrum,
T² measures leverage inside the model; Q (residual) measures how much of a spectrum the model fails to explain. Two rank heuristics — Kaiser (λ > 1) and broken-stick — suggest how many components to keep. Views: 2D/3D scores (colored by map Y), scree plot, and loadings.
All three factor X into non-negative components — abundance maps and endmember spectra — ideal for unmixing overlapping chemical phases.
NMF minimizes the Frobenius (or Kullback–Leibler) reconstruction error.
VCA (Vertex Component Analysis) extracts pure endmembers as vertices of the data simplex,
then unmixes by pseudoinverse. MCR-ALS alternates non-negative least squares on C and Sᵀ;
lack-of-fit LOF% = 100·‖X − CSᵀ‖F/‖X‖F. (VCA needs umap-learn-free;
MCR needs the optional pymcr package.)
Project high-dimensional spectra to 2–3D for visualization (PCA-preconditioned to 50 components by default). UMAP minimizes the fuzzy-set cross-entropy between the high- and low-dimensional neighbour graphs; t-SNE matches Gaussian affinities in high-D with Student-t affinities in low-D by minimizing
UMAP keeps n_neighbors (local vs global structure) and min_dist
(cluster tightness); t-SNE keeps perplexity. UMAP is intentionally non-deterministic for
speed; t-SNE is reproducible. UMAP requires the optional umap-learn package.
Group spectra by similarity, on either the feature matrix or any reduction/embedding. Every run reports the silhouette, Davies–Bouldin and Calinski–Harabasz scores, and renders a spatial cluster map, a colored reduced-space scatter and per-cluster centroid spectra.
| Algorithm | Objective / rule | Key parameters |
|---|---|---|
| K-means | min Σi ‖xi − μc(i)‖² | k |
| Gaussian Mixture | EM on p(x)=Σ πk 𝒩(x; μk, Σk); reports BIC/AIC | k, covariance type |
| Agglomerative | Bottom-up merging (Ward / average / complete / single linkage) | k, linkage |
| HDBSCAN | Density hierarchy on mutual-reachability distance; noise = −1 | min cluster size |
| Spectral | Graph-Laplacian embedding + k-means | k |
The three validation metrics:
Tick Sweep k to scan a range of k and plot the silhouette (plus inertia for k-means or BIC for GMM) so you can pick the number of clusters. HDBSCAN needs no k.
Correlate each feature (or reduction score) against one or more targets (fitted parameters or derived expressions). Choose Pearson (linear), Spearman (rank) or Kendall τ, and optionally apply Benjamini–Hochberg FDR correction to obtain q-values. With no target selected, the full feature×feature matrix is computed. Results: an r ∈ [−1, 1] heatmap (red positive, blue negative) and a table of the strongest correlations with p (and q).
Label rows into classes (split evenly, threshold a fitted parameter, or manual row ranges), then train one of six classifiers with cross-validation:
The VIP score, which tells you which bands drive the classification:
where p is the number of features, w̃a the normalized X-weights, and SSa the Y-variance explained by component a. VIP > 1 conventionally marks an important variable. Every run reports training and cross-validated accuracy, both confusion matrices, and an optional permutation test giving a p-value for the CV accuracy. Cross-validation is (repeated) stratified k-fold.
Section 07
A fully local research agent: it searches the literature, compares your fitted peaks with published values and interprets your maps and multivariate models — all on your machine, with no API keys and no data leaving the computer.
The assistant is powered by a local large language model served by Ollama (a free, open companion app). The first time you open the AI Assistant page, a four-step setup wizard walks you through it:
The assistant is agentic: it decides which of its tools to call to answer you, showing each step in-line. Its tools include:
| Capability | What it does |
|---|---|
| Literature search | Searches Google Scholar for references and pulls open abstracts from OpenAlex. Metadata only — no PDFs are ever downloaded. Sources appear as citable cards with DOIs. |
| Read your peaks | Retrieves your fitted positions, amplitudes, widths and fit quality. |
| Analysis summary | Reports the whole session state: data, background, crop, fit quality, map grid. |
| Render spectra & maps | Generates the fitted-spectrum image, and — after you choose which parameters — spatial heatmaps, then interprets them. |
| Read multivariate models | Summarizes your PCA/NMF/clustering/PLS-DA results and renders the figures you select, then interprets them. |
Section 08
Save and share reproducible workflows, manage your license, and keep the app current.
The Settings page shows your current configuration — background method, exclusions, cosmic-ray flag, crop, peak shape, peak count, engine and constraints — and lets you save it as a JSON file (Export / Save preset) or load one (Import). Share the JSON with a colleague and they reproduce your exact preprocessing and fitting setup. Imports are previewed and only take effect when you press Apply import.
Nitida is licensed per user through Polar. The License panel shows your status, the masked key, customer, and validity, and lets you re-validate, open the customer portal (manage billing and seats), or remove the key from this device (which frees a seat so you can activate elsewhere).
| State | Meaning |
|---|---|
| Active | Valid and verified. Full access. |
| Offline | Working from cache; the app opens normally and shows a small banner reminding you to reconnect before the next re-check. |
| Reconnect required | The offline grace window has elapsed — go online once to re-validate. |
| Expired / Revoked | Renew or contact support from the customer portal. |
Nitida validates online once, then works fully offline, re-checking roughly every 7 days with a 3-day offline grace window. All timing uses the server clock, so changing your computer's date does not extend a license.
See Getting started (Section 01): updates are a deliberate two-step Download → Install and restart. The app never restarts on its own, so a running analysis is never lost.
Quit Nitida (Settings → About) shuts the scientific engine down cleanly and closes the window.
Appendix
A few native instrument formats have no open reader anywhere. For these, export from the vendor software once — Nitida reads the exported file natively:
| Native format | Export to | Then load in Nitida |
|---|---|---|
WITec .wip / .wid |
MATLAB .mat (Project/Suite) or ASCII .txt |
Loads directly — .mat WITec exports are recognized. |
Horiba .l6s / .l6m |
.txt, .ngs or LabSpec 6.3+ HDF5 |
Loads directly. |
Renishaw .wxd (WiRE 2/3) |
— usually not needed — | Read natively. If a very old file fails, use WiRE's Batch File Converter to
.wdf or export .txt. |
Nitida identifies files by content, so a correct file loads even if renamed. If a vendor file genuinely can't be parsed, the error names the export path to use (see table A). For plain text, make sure columns are numeric and separated by tab, comma or spaces.
Use Downsample (Data → Advanced) for a fast first look, and remember the map fit only needs peaks you actually care about — keeping the peak count low speeds it up dramatically. The fit runs across all CPU cores.
It requires a collection or map (≥ 3 spectra) with background and crop applied. Complete those two steps and it unlocks.
Check the sample point actually has signal (corners of a map are often off-sample). Subtract the background first, add exclusion regions over strong peaks, and if needed switch to Manual mode to place peaks by hand or add rigid constraints. The Compare lmfit vs curve_fit button helps pick the better engine.
Downsampled maps do not fill every pixel. Load the full map for a dense heatmap, or use the Smooth interpolation option on the 2D Heatmap tab.
| Action | How |
|---|---|
| Place a peak (Fit, Manual) | Click on the spectrum |
| Draw a region (background exclusion, crop, ROI) | Click two points on the chart; Esc cancels (background) |
| Inspect / refit a map pixel | Click the pixel on the heatmap |
| Inspect a spectrum (Multivariate) | Click a scatter marker or map pixel |
| Send a chat message | Enter · Shift+Enter for a newline |
| Change the active map sample | Quick Viewer (sidebar) → X/Y or “Use as sample” |
Nitida — Raman Analysis Suite · Local-first, no telemetry · © 2026 Michele Zanotti. All rights reserved. · Support: [email protected]