Documentation › Getting started
Getting started
ROOT-A-TRON 3000 fits a mathematical model to measured data and reports the fitted parameters with their uncertainties. The fitting is done by CERN ROOT, the analysis toolkit used in particle physics, running on a server; the browser handles data entry, plotting and the propagation of uncertainties through later calculations.
What a fit is
A model is a function f(x; p) of the independent variable x with a vector of parameters p. A fit chooses the parameters for which the model is closest to the N measured points (xi, yi ± σi). "Closest" is defined by the chi-square,
χ²(p) = Σi [ (yi − f(xi; p)) / σi ]²
the sum of squared residuals, each measured in units of that point's uncertainty. A point with a small uncertainty therefore pulls harder than one with a large uncertainty. ROOT minimises χ² numerically with Minuit: starting from the values you supply, it steps through parameter space until it reaches a minimum. For a model that is linear in its parameters (a straight line, a polynomial) the minimum is unique and any starting point reaches it. For a nonlinear model (an exponential, a peak, an oscillation) χ² can have several local minima, and the minimiser finds the one nearest to where it started. That is why starting values matter.
At the minimum, the curvature of χ² in each parameter direction sets that parameter's uncertainty: a parameter the data constrain tightly sits in a steep valley and gets a small uncertainty. The full curvature matrix, inverted, is the covariance matrix, from which the reported uncertainties and correlations come. How to read all of this is on The fit report.
The two pages
Make a Plot is the fitting worksheet, in three steps shown as tabs: Set up analysis (the data), Fit model (the function and its starting values) and Results (the plot and report). A worksheet can hold several datasets, each with its own data, model and result; switch between them with the tabs above the data table.
Analyze Data takes the same datasets and their fit results and lets you calculate further quantities from them, with uncertainties propagated and units checked: a half-life from a fitted lifetime, g from a pendulum slope, a wavelength from a fringe spacing. It also tabulates and exports everything.
The two pages share one session. A fit run in Make a Plot appears in Analyze Data at once; a dataset pasted into Analyze Data is available for fitting. Editing a dataset's values or model after it has been fitted marks that fit stale, and calculations that depend on it are blocked until it is refitted, so a number can never quietly come from data that has since changed.
A first analysis
- On Set up analysis, choose the data type, then paste your columns into the table or type them. Set the uncertainty mode for each column. See Data and analysis types.
- On Fit model, choose a model from the library or write one. See Fit functions.
- Give each parameter a starting value by adjusting the curve on the plot, by typing values, or by asking an AI with the prompt the page builds. See Starting values.
- Press Fit (or Ctrl/Cmd+Enter). Read the status, the parameters and χ²/NDF, and look at the residuals. See The fit report.
- Derive what you actually wanted to measure in Analyze Data, then export.
The or load an example menu above the data table adds a worked dataset (a straight line, an exponential decay, a Gaussian peak, a double-slit pattern, a count histogram, a beam profile) alongside your own, with a model and starting values already chosen.
Sessions, saving and autosave
Everything you enter is saved continuously in the browser's local storage, so a reload or a closed tab loses nothing; the same storage is shared by both pages. It is specific to one browser on one computer and can be cleared by the browser, so for anything you want to keep, press Save. That downloads a .json session file holding every dataset, its uncertainties and exclusions, its model and starting values, the last fit result including the drawn canvas, and all calculations. Open… (or dropping a session file onto Analyze Data) restores it exactly, in any browser; the stored canvas redraws without contacting the backend. Session files are plain JSON and can be inspected or version-controlled.
The backend
Fitting requests go to a small Flask service with PyROOT. The public copy runs on a free tier that sleeps after a period of inactivity; the first fit after a pause can take up to a minute while it wakes, and the status line says so. The footer of Make a Plot shows whether the backend is reachable. Only the selected dataset and model are sent; nothing is stored on the server, and no AI service is ever contacted by the tool itself. The backend can also be run locally with the start script in the repository, in which case fits never leave your machine.
Keyboard
- Ctrl/Cmd+Enter runs the fit from anywhere on the Fit model step. Plain Enter in a text field also fits, except inside the adjust-on-the-plot controls, where it commits the value.
- Ctrl/Cmd+E opens the full data table editor.
- In the data table, Tab and Shift+Tab move across cells, Enter and the arrow keys move between rows, and pasting a block from a spreadsheet fills as many cells as it contains. The six-dot grip on each column header drags it; with the grip focused, the arrow keys move it.
- Escape closes dialogs and help panels.