WavesFit Go · An open source spectroscopy workbench
Live fitting. One executable.
No Python setup.
Turn your acquisition computer into a live spectroscopy fitting station. Download the executable for your operating system, run it, and open the local browser dashboard. Connect a growing data file and watch peak positions, widths, and areas evolve as you measure.
No Python installation or virtual environment. No Go installation needed for the prebuilt executable. The dashboard and fitting run locally, with no account or internet connection needed after installation.
MIT licensed · macOS, Linux & Windows · Go v0.1.0 · How live acquisition works ↓ · Launch guide ↓
Try it here before installing
A new peak—or a changing background?
A shoulder appears while you measure a treated surface. Before calling it a new component, test a simpler explanation. Follow one experiment from a clean peak to a live scan, then apply the same workflow to your own spectrum.
Illustrative XPS-style measurement · Synthetic data, not a measured specimen · Energy is relative to a reference.
A repeatable sequence: inspect → choose the simplest plausible model → examine what it misses → add a justified constraint or component → export the analysis.
A fitted component is a model contribution. It is not, on its own, a chemical identification or a concentration measurement.
One experiment. Four decisions.
Start simple. Add only what the data need.
Step 01 · Locate the original line
Where is the peak, and how much signal is in it?
The reference surface has one isolated line on a nearly flat baseline. Start with one Voigt peak and one constant offset.
In this teaching case, a reference measurement supplies the Lorentzian FWHM of 0.30 eV. It stays fixed; centres, areas, Gaussian widths, and one offset are fitted. This is an example constraint, not a universal setting for your data.
One peak recovers the reference centre and area; residuals fluctuate around the synthetic noise level. Keep this as the reference before interpreting the changed surface.
Website demo: “Watch it arrive” simulates a growing scan. A CSV chosen on this page is a snapshot. See how the installed Go application reads real acquisition files ↓
The case is controlled so you can check the answer: the main peak is at −0.65 eV with area 3; the added peak is at +0.80 eV with area 1. All stages use the same Gaussian-noise realization. Adding a parameter can improve a fit without proving a physical explanation.
A framework you can reuse
Three questions before you report a number
1. What does the instrument observe?
Keep the energy scale and units explicit. A Voigt peak combines Gaussian and Lorentzian broadening; its area and height are different quantities. Use a reference to justify a fixed width.
Widths and area conventions ↗2. What is the model missing?
Correct a plausible baseline before adding peaks. Look for structured residuals. A second contribution should have a reason to exist and remain stable under reasonable changes of the fit interval and constraints.
Background choices ↗3. Are the parameters determined?
A low residual does not guarantee unique widths or areas. Read convergence, rank, uncertainties, and active bounds. A growing scan is provisional; a pause does not finish the measurement.
What uncertainty does—and does not—mean ↗Use it on a measurement
Bring your own spectrum
Choose a complete spectrum, map the columns, and start with one or two Voigt peaks. Your file stays in this browser; it is not uploaded to the website. This small workbench accepts 16–2,048 points. Use the native Go application for larger files, other models, or continuous instrument acquisition.
Or paste a text table
No data selected. Files must contain one spectrum with a strictly increasing or decreasing energy axis. Numbers use a decimal point. Optional uncertainties must be positive 1σ standard deviations in the intensity unit.
Select data to begin.
| Parameter | Estimate | Standard error |
|---|
wavesfit-go fit wavesfit-input.csv --config wavesfit-config.json --output result.jsonExports belong to the last successful fit shown above. A failed attempt retains that result and identifies it as a previous fit. A missing standard error means a fixed/bound parameter or an estimate that does not qualify for a covariance error.
From the instrument to the screen
Who reads the file? Go does. The browser shows the fit.
The acquisition software saves measurements on your computer. The installed WavesFit Go executable reads new data, performs the fitting, and serves a dashboard to your browser. You keep the same dashboard open while measurements arrive.
On your acquisition computer
- 01 · WriteInstrument softwareAppends measurements as complete rows.
- 02 · SaveLocal CSV or text fileNew rows become available as the file grows.
- 03 · FitWavesFit GoReads new rows and updates the accumulated fit.
- 04 · DisplayLocal browser dashboardReceives data, fitted curves, and parameter trends.
Open the local address printed by Go, for example http://127.0.0.1:8765. This address points to your own computer. The executable includes the dashboard and plotting assets, so the installed application works offline.
Example: one new energy point every second
- The instrument software appends and flushes a complete row to
measurement.csv. - Go remembers its reading position and reads the new rows. An unfinished trailing line waits until its newline arrives.
- Once enough of the configured peaks has been observed, Go refits the accumulated spectrum at the chosen cadence, starting from the last successful parameters.
- The browser receives local updates approximately every half-second. Fitting time depends on the data and model; backlog is visible if acquisition runs ahead.
A growing file: updates within a scan
The instrument appends points to one file. Go can show provisional fits as the spectrum fills in. A configured point count or explicit scan boundary marks completion. A pause alone does not finish a scan.
A directory: updates between scans
The instrument saves one complete spectrum per file. Publish each file by atomic rename, or create a done marker after closing it. Go processes finalized spectra in order while undispatched files remain on disk.
| What you open | Data source | What updates |
|---|---|---|
| This website: “Watch it arrive” | Synthetic teaching spectrum | Simulated acquisition in your browser |
| This website: “Bring your own spectrum” | A CSV you choose or a table you paste | A snapshot fitted locally in your browser; subsequent file changes are not monitored |
Installed Go: demo | Locally generated synthetic spectra | Simulated acquisition in the native application |
| Installed Go: real file source | A growing file or finalized-file directory | Real measurements, read and fitted by Go on the acquisition computer |
Check your instrument’s output first. Fitting during a scan requires acquisition software that writes and flushes data while it runs. If it only exports at the end of each scan, WavesFit updates between completed scans. A direct instrument connection requires a custom acquisition adapter; the generic file modes read the files your acquisition software produces.
Launch Go and connect an acquisition source ↓ · File formats and scan-completion rules ↗
From a browser experiment to your instrument
One executable on the acquisition computer.
Download and extract the release for macOS, Linux, or Windows. Run the command below from that folder, then open the local URL printed in the terminal. The demo starts simulated acquisition immediately. On Windows, use wavesfit-go.exe demo.
./wavesfit-go demoFor a shared lab or beamline, the same executable gives operators the same fitting tool without maintaining a scientific Python environment. Its plotting assets are included, so the installed dashboard works offline.
Connect real acquisition by configuring a growing file or finalized-file directory in the dashboard. Set a point count, explicit scan boundary, or finalized-file rule. Save a reusable preset, then launch it for the next measurement:
./wavesfit-go serve --config acquisition.jsonWatch fits, residuals, and parameter trends while data arrive. A bounded queue shows backlog when fitting falls behind; JSONL/CSV exports keep the session available for replay and analysis.
Keep the same model when moving from this page to the instrument. Download an example CSV and its Go preset, or export data and a preset from your own successful fit. The executable uses the same published Go fitting library as this page:
./wavesfit-go fit wavesfit-input.csv --config wavesfit-config.json --output result.jsonThe fit command above uses the filenames exported by “Bring your own spectrum”. For a guided case, substitute its downloaded CSV filename. Use wavesfit-go.exe in place of ./wavesfit-go on Windows.
Get the Go executable ↗ Acquisition and library guide ↗
For developers: install from source with Go 1.24 or later
go install github.com/AlessandroLodi/wavesfit-go/cmd/wavesfit-go@v0.1.0Go deeper when the measurement calls for it
The method reference explains Voigt and Doniach–Šunjić shapes, doublet constraints, Shirley and Tougaard backgrounds, bounded least squares, and uncertainty. Those are tools to choose for a measurement, not a checklist every spectrum must pass through.
Example files, demo source & reproducibility · Validation and limits · Contribute on GitHub ↗
The browser case is a controlled simulation, not a hardware acceptance test. The package currently supports generic text acquisition files; specialized legacy instrument readers remain follow-up work. Fits condition on your selected model and background. No automatic model selection or chemical assignment is performed.