Skip to content

Settings

Settings & Preferences

Access the Settings menu via the gear icon in the main toolbar (or press Ctrl + Shift + S). You can also click About SPECTROview in the top menu bar to jump directly to the About section.

Settings Panel


The Settings Panel features a modern two-panel interface with real-time search filtering:

  • Left Sidebar:
  • Search Bar: Type any keyword (e.g. working folder, theme, language, tolerance, loss, mcp, python, citation) to instantly filter the navigation list and highlight matching options directly on the page with automatic scroll-to-view.
  • Navigation Tabs:
    1. General — SPECTROview Working Folder, Interface Theme, Interface Language, portable configuration backup/restore, and update preferences.
    2. Fit Settings — Optimizer convergence parameters, robust loss function, peak polarity, and global peak limits (with dedicated curve-fitting icon).
    3. AI Settings — LLM provider credentials, connection testing, and local MCP server.
    4. About — Application version, build number, Python environment, runtime dependency versions, documentation, and citation.
  • Right Content Area: Displays all options for the selected tab. All informational text, environment details, and citations are selectable with the mouse for easy copying.
  • Footer: Shows application version with standard Save and Cancel buttons.

Theme Synchronization: The Interface Theme can be selected either within the General tab (Modern Dark, Modern Gray, Modern Light, Classic Dark, or Classic Light) or directly via the Theme button in the top menu bar. Both selectors are fully synchronized in real time.


1. SPECTROview Working Folder & Preferences (General tab)

Specify a single universal root folder for all of SPECTROview's templates, recipes, styles, AI chat history, and configuration backup. When you set it, five subfolders and a portable configuration file are created automatically inside it:

Subfolder / File Contents
fit_model/ Custom fit models (JSON). The Fit Model Builder scans this folder and lists every model here for one-click reuse.
plot_recipe/ Plot Recipes — saved sets of full plot configurations (data bindings + style) for the Graphs workspace.
plot_style/ Style Templates — saved appearance-only styles that can be applied to any existing graph.
ai_chat_history/ AI chat conversation logs (JSON). Conversations are automatically saved here.
template/ General plot templates and workspace templates.
config.json Portable configuration backup. Non-secret application settings are mirrored to this JSON file.
  • Click Browse to select a folder, or type the path directly.
  • Click Open to open the configured folder directly in Windows Explorer or macOS Finder with one click.

Credential Security: AI provider API keys entered in Settings are stored in your per-user private OS application configuration (QSettings under an internal obfuscated namespace) across Windows, macOS, and Linux, and are strictly excluded from config.json backups. This avoids intrusive OS Keychain / KWallet prompts while preventing sensitive credentials from being leaked if you share or commit your working directory.

Backup & PC Migration: If you move to a new PC or want to make a backup, simply copy this single Working Folder to the new PC. In SPECTROview's Settings panel on the new machine, point the SPECTROview Working Folder to that folder: all fit models, plot recipes, style templates, AI chat history, and configuration (config.json) will be restored automatically!

You can also use the Export Config... and Restore Config... buttons at any time to export or restore settings to/from a standalone JSON file.

Interface Theme

  • Theme: Select between Modern Dark, Modern Gray (default), Modern Light, Classic Dark, or Classic Light. Selection updates the active theme immediately and keeps the top menu bar theme button in perfect synchronization. The plot canvas theme is independent of the interface theme, defaulting to Light Mode; you can switch it to Dark Mode at any time via the Plot theme selector in the View Options toolbar under the spectrum canvas (your selection persists across sessions).

Interface Language

  • Language: Select between English (default), Français, 简体中文 (Simplified Chinese), Deutsch (German), and Русский (Russian). Changes apply live across the entire application — menus, workspaces, viewers, dialogs, scientific plot labels, and the AI Chat panel — without restarting. Clicking Cancel rolls back any live previewed language change to the previously saved setting. The selected language persists across sessions via QSettings and config.json, and clicking Open User Manual opens the matching documentation version (/user_manual/ for English, /fr/user_manual/ for French, /de/user_manual/ for German, /ru/user_manual/ for Russian, and /zh/user_manual/ for Simplified Chinese).

Application Updates

  • Check for updates automatically on application startup: When checked (default), SPECTROview checks GitHub Releases periodically in the background upon launch (with HTTP ETag caching) and respects your installation format (pip, Windows Installer, Portable ZIP, macOS DMG, Linux AppImage, or .deb).
  • Include pre-release / release candidate builds: When checked, update checks also consider pre-release tags (such as -rc.1 or -beta). Disabled by default so most users receive stable releases only.

2. Fit Convergence Parameters (Fit Settings tab)

These parameters control the behavior of the Vectorized Batch Fit (VBF) engine — the mathematical optimizer that performs curve fitting on your spectra. Adjusting these values directly affects fitting speed, precision, and convergence.

  • Reset to Default: Click the Reset all fit settings to default button at the top of the tab to instantly restore all convergence parameters and global peak limits back to their factory defaults.
Parameter Setting Default Range Description & Behavior
Maximum Iterations max_ite 200 10 – 10,000 The maximum number of Levenberg-Marquardt iterations per spectrum.
• Lower (50–100): Faster fitting for previews.
• Higher (200+): Better convergence for complex spectra.
x-tolerance xtol 1×10⁻⁴ 1×10⁻¹⁰ – 1.0 Relative tolerance for the parameter step size. Convergence requires:
mean(
f-tolerance ftol 1×10⁻⁴ 1×10⁻¹⁰ – 1.0 Relative tolerance for the cost function. Convergence requires:
Noise Threshold Coefficient coef_noise 0.0 0.0 – 10.0 Multiplier for the auto-estimated noise level (coef_noise × estimated noise amplitude). Masks noisy data and suppresses ghost peaks.
• 0.0: Disabled (Default)
• 0.5–1.0: Conservative
• 1.0–2.0: Moderate
• 3.0+: Aggressive

Note: You can refer to the noise level displayed in the toolbar or activate the "Show noise level" checkbox within the View Options of the SpectraViewer to see the noise level directly on the spectra plot.
Loss Function loss linear linear, soft_l1, huber Robust loss function for outlier resistance (e.g. cosmic ray spikes, sharp artifacts).
• linear: Standard least squares (default).
• soft_l1: Smooth L1 approximation \(\rho(z) = 2(\sqrt{1+z}-1)\), robust to large spikes without manual masking.
• huber: Huber loss, quadratic for inliers and linear for residuals exceeding f_scale.
Loss Scale f_scale 1.0 0.01 – 100.0 Margin scale between inliers and outliers for robust loss functions. Residuals are scaled as \((r / f\_scale)\) before evaluating \(\rho'(z)\).
Fit Negative Values fit_negative Unchecked - When checked, negative intensity values (absorption or inverted peaks) are included in the fit. When unchecked, they are assigned zero weight.

Note: A spectrum is considered converged only when both xtol and ftol criteria are simultaneously satisfied.

Weighting Composition Order: Hard exclusions (fit_negative and coef_noise noise-floor masking) are evaluated first to assign zero weight to excluded points. For active points, robust loss weighting (soft_l1 or huber) is applied second, smoothly down-weighting outlier residuals via Iteratively Reweighted Least Squares (IRLS).


3. Global Peak Limits (Fit Settings tab)

These parameters define absolute boundary conditions that are applied globally to all peaks across the application. When you add a new peak to a fit model, these limits are used to set the initial parameter bounds automatically.

Note: You can check the "Limits" checkbox under the PeakTable to display the actual bounds of each peak.

Limit Default Range Description & Constraint
Max Peak Shift 20 0 – 100 Maximum allowed displacement of a peak center (x0) from its initial value.
x0 - maxshift ≤ x0fitted ≤ x0 + maxshift
Min Peak FWHM 0.1 0.01 – 500 Minimum allowed Full Width at Half Maximum (FWHM). Prevents peaks from collapsing into delta-function artifacts.
Max Peak FWHM 200 1 – 1,000 Maximum allowed FWHM. Prevents peaks from broadening into flat baselines.

4. AI Settings (AI Settings tab)

The AI Settings tab configures the AI Chat Agent. Nothing here is required to use the rest of SPECTROview.

API Keys

The fields for a Custom (OpenAI-compatible) endpoint are shown by default:

Field Description
Custom API Key The API key for your custom / internal endpoint.
Base URL The endpoint's OpenAI-compatible root URL (e.g. https://host/v1).
Model Name A comma-separated list of model names (e.g. model-a, model-b). These populate the model dropdown in the chat panel — handy for endpoints that don't expose a model-listing API.
Display Label Label shown in the AI chat composer for this custom endpoint.

Keys for the built-in cloud providers are tucked under the collapsible ▸ Other cloud providers section (click to expand): OpenAI, Anthropic, Gemini, DeepSeek, and Mistral. All keys are stored masked and remembered between sessions.

  • Test Connection: Select any provider from the dropdown and click Test Connection to verify API endpoint availability, credentials, and network connectivity without saving.

Where your keys are stored: API keys go into your operating system's per-user settings store (obfuscated under _credentials/) — the registry (HKEY_CURRENT_USER\Software\CEA-Leti\SPECTROview) on Windows, ~/Library/Preferences on macOS, or ~/.config/CEA-Leti/SPECTROview.conf on Linux. They are never written to a file inside the SPECTROview project folder, are not included in an exported workspace or settings backup, and cannot be committed to a Git repository by accident.

Local MCP Server

Enable this only when a trusted MCP client on the same computer needs access to the currently running SPECTROview session. The default endpoint is http://127.0.0.1:8765/mcp and starts as soon as you select Save.

Field Default Description
Enable local MCP endpoint Off Starts/stops the embedded MCP server.
Port 8765 Local Streamable HTTP port (1024–65535). Choose another if the port is busy.

The bind address is fixed to localhost (127.0.0.1); it is not exposed to the LAN or internet. Keep SPECTROview running while the client is connected.


5. About & Environment (About tab)

The About tab provides comprehensive runtime and reference information:

  • Application Details: Official SPECTROview logo, title, version number (Version {VERSION}), and build number (Build: {BUILD_NUMBER}).
  • Environment & Dependencies: Automatically detects execution and packaging mode (Python Package (.whl / local), Windows Installer (Velopack), Windows Portable, macOS Application (.app), Linux AppImage, or Linux Debian Package (.deb)) and displays dependency versions:

  • Standalone Builds: Serve the frozen dependency snapshot recorded at packaging time, along with bundled Python and host/build OS details.

  • Installed Package (.whl / pip / Dev): Dynamically inspect live package versions active in the local Python environment.
  • Lists PySide6 (with Qt runtime version), TLS & security stack (certifi, truststore), scientific stack (numpy, scipy, matplotlib, pandas, pybaselines), export engines (openpyxl, pyarrow), UI extensions (superqt), and AI chat SDKs.
  • Check for Updates: Direct action to check GitHub releases for new versions.
  • Paper Citation: The canonical SoftwareX peer-reviewed citation with DOI, along with a Copy button to quickly copy the citation into your clipboard.