Control Ribbon

Fit Controls

The Control Ribbon holds six blocks of tools for choosing an algorithm, picking or writing a function, weighting the data, setting confidence bounds, and limiting the fit range.

01Block 1 — Fitting algorithm and Function Mode

The left-hand block contains the algorithm selector plus the Function Mode and Run Fit buttons.

  • Levenberg–Marquardt (LM) — fast and efficient; usually the best first choice.
  • Trust Region (TR) — allows both initial values and coefficient constraints, useful for bounded parameters.
  • Orthogonal Distance (OD) — handles errors in both X and Y. Disabled unless Enable X Errors is checked; when it is, OD is selected automatically.

LM and OD are unconstrained: you can set initial coefficient values but not limits. TR accepts both.

  • Function Mode — when checked, the secondary line becomes a Function Line. Pressing Run Fit then draws a pure function (model) on top of your first dataset, without loading a second dataset. See the Plotting a second line section for details.
  • Run Fit — performs the fit using the current function and starting coefficients. In Function Mode it draws the function using the absolute values from the Fitting Coefficients table.

02Block 2 — Built-in functions

Two drop-downs select CFTool’s predefined functions:

  • The top box selects the function type (polynomial, linear, trigonometric, etc.).
  • The bottom box selects the specific function within that type.

For polynomials and peak fitting, a dialog asks for the polynomial order or the number of peaks (1–10, except for the Resonance Peak function). Depending on your choice, extra input boxes appear to guide you.

03Block 3 — Custom functions and coefficients

  • Click the y = text box to open the Custom Function dialog. Enter your function using standard syntax (see Entering Custom Functions for examples).
  • Tick Apply Custom Function to activate it. This also opens the Fitting Coefficients dialog, where you can enter starting values and check that CFTool has recognised your coefficient names correctly.
  • Fitting Coefficients — opens the coefficients table at any time to adjust starting values or constraints.

04Block 4 — Weighting tools

If your dataset includes a σ (sigma) column, Apply Weights is ticked automatically to confirm it was loaded. When checked, CFTool weights the data by 1 / σ², giving more influence to points with smaller uncertainty. Without weights, all points are treated as equally reliable and coefficient errors are estimated from data scatter.

Two weighting modes are available:

  • Relative — uses the relative sizes of the σ values to influence the fit, while coefficient errors are still based on scatter.
  • Absolute — uses both the relative and absolute magnitudes of σ to calculate the fit and the coefficient errors. Only choose this if you are confident the σ values represent true absolute uncertainties.

After fitting, you can overlay Show Error Bars and/or an unweighted fit (Show Unweighted) on top of the weighted fit by checking the corresponding boxes.

05Block 5 — Confidence level and bounds

Use the Confidence Level drop-down to set the confidence interval applied to coefficient errors and to any plotted prediction or functional bounds. If Prediction Bounds or Functional Bounds are ticked, they are drawn around the fitted curve at widths matching the chosen level.

  • With no error bars, the bounds are derived from the scatter in the data.
  • If Y-errors are present, the supplied σY values are used instead.
  • Apply Weights (X) lets the algorithm adjust the fit using the x-weighting values.

Below Block 5. The Enable X Errors button sits here — required for Orthogonal Distance fits.

06Block 6 — Fit limits

This block sets the X-axis range over which the data are fitted.

  • Enter minimum and maximum values manually; limit markers appear on the graph showing the selected range.
  • Tick Show Limits to show the limit lines and make them draggable. The lower limit snaps up to the next data point; the upper limit snaps down to the next data point.
  • Reset Limits returns to the full data extent.
  • Untick Show Limits if you don’t want the markers on a saved plot.

Dragging with the mouse is usually the easiest way to adjust limits.

Below Block 6 — the Line Selector. Where earlier versions had an Add Line / Enable Line button, a drop-down now chooses which line you work on: Primary Line, Secondary Line (shown as Function Line in Function Mode), or Full Graph. The fit controls, limits and Label Editor all act on the selected line; in Full Graph the line-specific controls lock. See Plotting a second line.

07Summary

Block Function
1 Algorithm selection, Function Mode, Run Fit
2 Built-in functions and presets
3 Custom functions and coefficient control
4 Weighting and error-bar options
5 Confidence levels and bounds / apply X weights
6 Fit-range controls and markers