Documentation › Starting values
Starting values
A starting value (initial guess) is the point in parameter space from which the minimiser begins. It is not an uncertainty and it does not fix the parameter: the fit is free to move every value. For a model that is linear in its parameters the starting values are irrelevant to the result. For a nonlinear model they decide which minimum of χ² is found, and whether one is found at all: a decay started with the wrong sign of the rate, or an oscillation started a factor of two off in frequency, converges to a wrong answer or not at all, and the reported uncertainties are then meaningless. The minimiser is local; it cannot see a better minimum on the other side of a ridge.
A good starting value is a rough estimate read off the plot by eye. "About 46 thousand" for a peak height, "about 0.75" for the spacing between fringes, is the right precision: the fit sharpens the numbers, the estimate only points it at the right valley. Values within a factor of two of the final result are almost always close enough; it is the order of magnitude, the sign, and the position of features along x that must be right.
Three ways to set them
Adjust on the plot shows the model drawn with the current values over your data, and a control for each parameter. Type a value, or step it with − / + by the editable Step; ×10 and ÷10 change the step by a decade, ± flips the sign, and values accept scientific notation such as 1e-12. Optional sliders cover a linear range or a logarithmic one. The curve redraws at once, so you can see each parameter's effect in isolation, which is also the quickest way to learn what each one does. The adjustment ranges do not constrain the fit. Opening the controls fills any blank value from the library's defaults or 1; existing values are kept.
Enter values manually opens the parameter table, where each row has its symbol, report name and value, with a comma-separated field underneath for pasting a whole set at once. A blank entry keeps the model's default or ROOT's own estimate where there is one; in a list, 1,,3 sets [0] and [2] and leaves [1] unspecified.
Ask AI for starting values builds a prompt containing the model's equation, the parameter names, your data and any notes, for you to paste into a language model of your choice. The tool itself sends nothing anywhere. Treat the reply as an estimate like any other: check that the curve it gives follows the data before fitting, since such models are confident and sometimes wrong. Go to manual entry takes you to the field where the numbers go.
The status line under the preview records how the current values were set (adjusted, edited, or from a loaded session) and warns when the data or model have changed since.
How to read values off the data
Identify, from the part of the data you intend to fit: the baseline the signal sits on or decays to; the scale of the signal above it; the positions of features along x (a peak, a centre, a zero crossing); and the widths or rates, the x-distance over which the signal changes appreciably. Most model parameters are one of these four things, or a simple function of one, and the library guide for each model below says which. Two general cautions: a parameter in a denominator (a width, a time constant) must not start at zero; and a sign must be right, since a decay started as a growth will not come back.
Check the preview before fitting. If the dashed curve sits in the same place as the data and bends the same way, the values are good enough; if it is off the scale of the plot, something is an order of magnitude or a sign away.
Guide to the library models
One entry per library model: the equation, what each parameter is, and how to read its starting value from the data. Parameters are listed in ROOT index order, which is the order of the comma-separated field. The same guidance applies to a model you wrote yourself if it has the same form.
Mechanics & motion
Straight line
Any linear relationship: Ohm's law (V–I), Hooke's law (F–x), a calibration line, or constant-velocity motion.
[0]*x+[1]Default starting guesses: 1, 0
- slope - rise over run between two well-separated points: (y₂ − y₁)/(x₂ − x₁)
- intercept - the y-value where the line reaches x = 0 (extend it back, or y₁ − slope·x₁)
Proportional (through origin)
A straight line forced through the origin - use when theory requires y = 0 at x = 0.
[0]*xDefault starting guesses: 1
- slope - the average of y/x over your points (it should be roughly constant)
Free fall / projectile
Constant acceleration: y = y0 + v0 t + ½ a t². Position vs time; the quadratic term gives ½·acceleration.
pol2ROOT estimates these automatically - you can leave the guesses blank.
- Leave the guesses blank - ROOT estimates the parabola automatically.
- If you set them: y0 = position at t = 0 · v0 = initial slope · half_g = ½ × acceleration (≈ −4.9 m/s² for gravity downward)
Pendulum period vs length
Simple pendulum T = 2π√(L/g) = k√L. Fit period vs length; g = (2π/k)². (Or fit T² vs L as a straight line.)
[0]*sqrt(x)Default starting guesses: 2
- k - take any point and compute T ÷ √L; expect about 2.0 s/√m, since k = 2π/√g
Simple harmonic motion
Undamped oscillation x(t) = A sin(ωt + φ) + c. Set omega ≈ 2π/period from the data before fitting.
[0]*sin([1]*x+[2])+[3]Default starting guesses: 1, 1, 0, 0
- amplitude - half the peak-to-trough height of the data
- omega - 2π ÷ the period (the x-distance between repeats)
- phase - start at 0, then nudge to line up the first upward zero-crossing
- offset - the midline: the average of the maximum and minimum
Damped oscillation
Decaying oscillation A e^(−t/τ) cos(ωt + φ) + c - a mass on a spring with friction, or a ringing circuit. Estimate τ and ω from the envelope and spacing of the peaks.
[0]*exp(-x/[1])*cos([2]*x+[3])+[4]Default starting guesses: 1, 5, 6.283, 0, 0
- amplitude - the height of the first peak above the offset
- tau - the x where the swing has shrunk to about 1/e (37%) of that first peak
- omega - 2π ÷ the period (spacing between successive peaks)
- phase - 0 if it starts near a maximum, about π/2 if it starts near zero
- offset - the value it eventually settles to
Terminal velocity (approach)
Speed of a falling body with drag: v(t) = v_term (1 − e^(−t/τ)). Rises and levels off at the terminal value.
[0]*(1-exp(-x/[1]))Default starting guesses: 1, 1
- v_terminal - the plateau the data level off to
- tau - the x where the rise has reached about 63% of that plateau
Waves & optics
Single-slit diffraction (Fraunhofer)
Fraunhofer single-slit intensity I = I0 · sinc²(β), β = π a (x−x0)/(λ L). The central peak with weaker side lobes. beta_scale ≈ π a/(λL).
[0]*pow(sin([1]*(x-[2])+1e-6)/([1]*(x-[2])+1e-6),2)+[3]Default starting guesses: 1, 1, 0, 0
- I0 - height of the central peak above the background
- center - the x-position of the central maximum
- background - the floor away from the pattern
- beta_scale - π ÷ (distance from the center to the first dark minimum), since the first zero is at β = π
Double-slit (with single-slit envelope)
Two-slit fringes cos²(δ) modulated by the single-slit envelope sinc²(β). delta_scale sets the fringe spacing (slit separation), beta_scale the envelope (slit width).
[0]*pow(cos([1]*(x-[2])),2)*pow(sin([3]*(x-[2])+1e-6)/([3]*(x-[2])+1e-6),2)+[4]Default starting guesses: 1, 5, 0, 1, 0
- I0 - height of the tallest fringe above the background
- center - x-position of the central (brightest) fringe
- background - the floor
- delta_scale - π ÷ (spacing between adjacent bright fringes)
- beta_scale - π ÷ (distance from the center to where the fringes fade out, the envelope's first minimum)
Double-slit (linear fringe visibility)
Eight-parameter interference fit with a sinc² diffraction envelope, fringe visibility that changes linearly across the pattern, independent envelope and fringe centers, and constant background: N = N_bg + (N0/2) sinc²(k_a(x−x_1)) [1 + (V + V_1(x−x_1)) cos(2 k_d(x−x_0))]. V is the visibility at the envelope center and V_1 its change per unit x. The starting values are generic placeholders; estimate them from your data before fitting.
[1]+[0]/2*([2]*(x-[4])==0?1:pow(sin([2]*(x-[4]))/([2]*(x-[4])),2))*(1+([6]+[7]*(x-[4]))*cos(2*[3]*(x-[5])))
Parameter order: N0, N_bg, k_a, k_d, x_1, x_0, V, V_1.
Default starting guesses: 1, 0, 1, 5, 0, 0, 0.5, 0
- N0 [0] - count scale: about twice the fringe-averaged signal above background at the envelope center; it is not the tallest fringe height.
- N_bg [1] - constant background: estimate the count floor away from the diffraction pattern.
- k_a [2] - diffraction-envelope scale: π ÷ distance from x_1 to the first envelope minimum, in inverse units of x.
- k_d [3] - interference spatial frequency: π ÷ spacing between adjacent bright fringes, in inverse units of x.
- x_1 [4] - envelope center: the center of the broad diffraction peak, independent of the fringe origin.
- x_0 [5] - fringe origin: a bright-fringe phase position near the envelope center; cos(2 k_d(x−x_0)) equals 1 here.
- V [6] - visibility at the envelope center: start between 0 and 1. Estimate (N_max−N_min)/(N_max+N_min−2 N_bg) from the fringes next to x_1.
- V_1 [7] - visibility slope: the change in visibility per unit x. Estimate the contrast the same way near each edge of your fit range, then divide their difference by the distance between them; start at 0 if the contrast looks even.
- The linear visibility describes the pattern only within the fitted range: keep V + V_1(x−x_1) between 0 and 1 there, and do not extrapolate it. It replaces a Gaussian visibility profile, whose center and width cannot both be determined unless the data show the contrast rising and falling.
- Use your measurement units consistently: N0 and N_bg have the units of y; x_1 and x_0 have the units of x; V is dimensionless and V_1 has inverse units of x. Choose a fit range that covers the fringes and envelope in your own data. The sinc² factor is evaluated as 1 at x = x_1. Use ROOT expression mode to edit this model.
Malus's law (polarization)
Transmission through a polarizer: I = I0 cos²(θ − θ0) + background. Enter the angle θ in radians.
[0]*pow(cos(x-[1]),2)+[2]Default starting guesses: 1, 0, 0
- I0 - the maximum intensity minus the background
- angle0 - the angle (in radians) where the intensity is greatest
- background - the minimum (leakage) intensity
Lorentzian / resonance peak
A resonance line shape (Breit–Wigner): driven oscillator amplitude, an RLC resonance curve, or a spectral line. gamma is the half-width at half-maximum.
[0]/(1+pow((x-[1])/[2],2))+[3]Default starting guesses: 1, 0, 1, 0
- amplitude - peak height above the background
- center - the x at the peak
- gamma - the half-width at half-maximum: half the peak's full width measured at half its height
- background - the floor
Gaussian peak
A bell-shaped peak: a spectral line, a beam profile, or a distribution of measurements. ROOT estimates the starting values for a bare gaus.
gausROOT estimates these automatically - you can leave the guesses blank.
- Leave the guesses blank - ROOT reads the height, mean and sigma from the data.
- If you set them: height = peak value · mean = peak position · sigma = (full width at half maximum) ÷ 2.355
Gaussian peak + linear background
A Gaussian peak sitting on a sloping background. Because it is a sum of named functions, give rough starting values (peak height, centre, width, background).
gaus(0)+pol1(3)ROOT estimates these automatically - you can leave the guesses blank.
- height - peak height above the sloping background line
- mean - the peak position
- sigma - (full width at half maximum) ÷ 2.355
- bg_offset - the background level extrapolated to x = 0
- bg_slope - the slope of the baseline on either side of the peak
Thermal & statistical
Newton's law of cooling
An object relaxing to room temperature: T(t) = T_env + ΔT e^(−t/τ). T_env is the surrounding temperature, τ the cooling time.
[0]+[1]*exp(-x/[2])Default starting guesses: 20, 50, 100
- T_env - the temperature it levels off to (the surroundings)
- deltaT - the starting temperature minus T_env
- tau - the time to cover about 63% of the way from start to T_env
Radioactive / exponential decay
Exponential decay N = N0 e^(−t/τ); half-life = τ ln 2. Radioactive counts, capacitor discharge, or any first-order decay. (The tool estimates N0 and τ from the data.)
[0]*exp(-x/[1])Default starting guesses: 1, 1
- N0 - the value at x = 0
- tau - the time to fall to about 37% (1/e) of N0; or half-life ÷ 0.693
Exponential decay + background
Decay sitting on a constant background (e.g. counts above a steady rate). Compare with the plain decay to see whether the background term is needed.
[0]*exp(-x/[1])+[2]Default starting guesses: 1, 1, 0
- background - the steady level reached at late times
- N0 - the value at x = 0 minus the background
- tau - the time for the excess above background to fall to about 37%
Stefan–Boltzmann (power law)
A power law y = a xⁿ. Radiated power vs temperature (n ≈ 4), or any scaling law. On log–log axes this is a straight line of slope n.
[0]*pow(x,[1])Default starting guesses: 1, 4
- n - the exponent; on log–log axes it is the slope (≈ 4 for thermal radiation)
- a - pick one point and compute y ÷ xⁿ using your n estimate
Arrhenius rate
A thermally activated rate k = A e^(−Ea/kT). The activation energy sits in the exponent; a plot of ln k vs 1/T is a straight line.
[0]*exp(-[1]/x)Default starting guesses: 1, 1000
- Ea_over_k - from two points: (ln y₂ − ln y₁) ÷ (1/x₁ − 1/x₂)
- A - y ÷ exp(−Ea_over_k / x) at any point (the high-temperature limit)
Electricity & magnetism
RC charging
A capacitor charging through a resistor: V(t) = V_final (1 − e^(−t/RC)). The time constant RC is where it reaches 63% of the final voltage.
[0]*(1-exp(-x/[1]))Default starting guesses: 5, 1
- V_final - the plateau voltage the curve rises to
- RC - the time to reach 63% of V_final
RC discharging
A capacitor discharging through a resistor: V(t) = V0 e^(−t/RC). Same time constant as charging.
[0]*exp(-x/[1])Default starting guesses: 5, 1
- V0 - the voltage at t = 0
- RC - the time to fall to 37% of V0
Diode I–V (Shockley)
Diode current vs voltage: I = I_sat (e^(V/nV_T) − 1). nV_T ≈ 0.026 V × ideality factor at room temperature.
[0]*(exp(x/[1])-1)Default starting guesses: 0.000001, 0.05
- nVt - about 0.026 V × ideality factor (1–2), so roughly 0.026–0.052 V at room temperature
- I_sat - very small; start around 1e-9 to 1e-6 A and adjust until the curve reaches your current scale
Modern physics
Photoelectric effect
Stopping voltage vs light frequency: V_s = (h/e) f − φ/e. A straight line; the slope is Planck's constant over the electron charge, the intercept gives the work function.
[0]*x+[1]Default starting guesses: 0.000000000000004, -2
- h_over_e - the slope of stopping voltage vs frequency (theory ≈ 4.14e-15 V·s)
- minus_phi_over_e - the (negative) intercept, ≈ −(work function expressed in volts)
Rydberg / hydrogen lines
Hydrogen spectral lines: 1/λ = R (1/n₁² − 1/n₂²). Plot 1/λ against (1/n₁² − 1/n₂²); the slope is the Rydberg constant.
[0]*xDefault starting guesses: 10973731
- Rydberg - the slope of 1/λ vs (1/n₁² − 1/n₂²); theory ≈ 1.097e7 per metre
Compton scattering
Shifted wavelength vs scattering angle: λ' = λ0 + λ_C (1 − cos θ). Plot λ' against (1 − cos θ); the slope is the Compton wavelength.
[0]*x+[1]Default starting guesses: 0.0000000000024, 0
- compton_wavelength - the slope of λ' vs (1 − cos θ); theory ≈ 2.43e-12 m
- lambda0 - the intercept: the unshifted wavelength (at θ = 0)
Beer–Lambert absorption
Attenuation through a medium: I = I0 e^(−μ x). μ is the absorption coefficient; x is thickness (or concentration × path length).
[0]*exp(-[1]*x)Default starting guesses: 1, 1
- I0 - the intensity at x = 0 (no absorber)
- mu - 1 ÷ (thickness that drops the intensity to about 37%); or ln(I0/I) ÷ x at any point
General shapes
Constant
A flat line y = c. Useful as a background, or to test whether data are consistent with no trend.
pol0ROOT estimates these automatically - you can leave the guesses blank.
- c - the average of your y values
Quadratic
A parabola a + b x + c x². ROOT estimates the starting values.
pol2ROOT estimates these automatically - you can leave the guesses blank.
- Leave the guesses blank - ROOT estimates the coefficients.
Cubic
A cubic polynomial. Handy for a smooth empirical trend when there is no physical model.
pol3ROOT estimates these automatically - you can leave the guesses blank.
- Leave the guesses blank - ROOT estimates the coefficients.
Logistic / sigmoid
An S-shaped curve rising from one level to another: threshold behaviour, saturation, a switching curve. k sets the steepness, x0 the midpoint.
[0]/(1+exp(-[1]*(x-[2])))+[3]Default starting guesses: 1, 1, 0, 0
- offset - the lower plateau (the value at small x)
- L - the total rise: upper plateau minus lower plateau
- x0 - the x at the midpoint, halfway up the rise
- k - the steepness ≈ 4 ÷ (x-width over which most of the rise happens); larger k = sharper step