Fit

Interactive curve fitting for Linux, Windows and macOS

An interactive curve-fitting application. You load a data set, place curves on it, and the app fits them — one peak or a hundred, by hand or fully automatically.

Written in Free Pascal with Lazarus. It runs on Linux, Windows and macOS.

Download

Prebuilt binaries, produced by CI from the sources in this repository. There is no Intel macOS build: Free Pascal 3.2.2 cannot produce one on the runners available, and the source builds on an Intel Mac as it always did.

PlatformDownload
Linux (x86-64)Fit-linux.tar.gz — portable archive
Debian, Ubuntu (x86-64)Fit-linux.debsudo apt install ./Fit-linux.deb
Fedora, RHEL, openSUSE (x86-64)Fit-linux.rpmsudo dnf install ./Fit-linux.rpm
Windows (x86-64)Fit-windows.zip
macOS (Apple Silicon)Fit-macos-arm.tar.gz

Each link above serves the latest release · all releases

Each archive holds the desktop client, the compute server and sample data. Start the compute server first — the client has no fitting engine of its own and talks to the server over HTTP.

The Linux packages install the same two programs plus a launcher that starts both: run fit, or pick Fit out of the application menu.

Prefer to build it yourself? See building from source — one script, or a Lazarus IDE walkthrough with exact versions.

Look how fully automated fitting works

A fitted profile, with the curve list and parameters beside it

Where it stands

Capability State Detail
Curve typesImplemented13 registered, including user-defined formulas
Data loadersPartial2 formats read (Diffraction profile, Price data, OHLC). 1 loader class declared but not registered — a stub that raises ENotImplemented.
Data exportPlannedNo export at all yet
Compute backendsImplementedDownhill Simplex (native), Levenberg-Marquardt (Python/lmfit). A remote fit_server is a transport choice of the native engine, not a separate engine.
ObjectivesImplemented4, with curve-type compatibility derived from capabilities
REST APIPartial14 verbs. Not specified as OpenAPI yet, and deliberately not documented as a stable contract.
Module registrationImplemented10 seams; the framework ships no module
Argument axesImplementedDisplay-only: an axis never alters stored data or the fit
Charting componentPlannedBlocks per-point labels and point dragging
Scripting and batch runsPlannedNo way to drive a fit without the window
Parallel and GPU computePlannedFit intervals are not run in parallel yet
Native installers and signingPartialArchives and .deb/.rpm are built; signing is off by default

The full nine-stage plan, and what is settled and not up for reopening, is in the roadmap.

Using it

Extending it

Fit is a framework as much as an application. A new curve type, data loader, optimiser, objective, REST verb or whole analysis vertical is added by registration — a directory plus one entry on a project's unit search path. No framework file changes.

These pages are generated from the registries this build actually contains, every time the site is published:

The prose that goes with them lives in the repository: writing a module · a complete working module in six files · AGENTS.md, the invariants, for AI agents working on the code.

Command line

OptionEffect
/INFILE=file_nameopens a data file at start-up
/LOG_LEVEL=levelfatal, warning, notification, debug or trace — only ever turns the log down
/WRITE_PARAMS_LOGlogs every variable parameter during a fit

The client and the server keep separate logs — fit_client.log and fit_server_log.txt — in $HOME/Fit/ on Linux and macOS, or C:\Users\<user>\AppData\Roaming\Fit\ on Windows. Each rotates at 32 MB, keeping one previous generation as <name>.1.

Test data

A sample data set ships inside every download, under Data/. Separately: test_data.zip.

Contributing

This repository is published as a snapshot: each publication replaces main with a single commit, so a pull request cannot be merged directly. Open an issue or attach a patch — see CONTRIBUTING.md.

GPLv3-or-later. Documentation CC BY 4.0.