Control Ribbon

The Control Ribbon provides six groups of tools for fitting, weighting, and managing how CFTool performs and displays fits.


Block 1 — Fitting algorithm and function mode

The left-hand block contains three buttons:

  • Fitting Algorithm — choose between:

    • Levenberg–Marquardt (LM) – fast and efficient; usually the best first choice.

    • Trust Region (TR) – allows both initial values and coefficient constraints, useful for controlling fits with bounded parameters.

    • Orthogonal Distance (OD) – handles errors in both X and Y. This option is disabled unless Enable X Errors is checked; when it is, OD is selected automatically.

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

  • Function Mode — when checked, Line 2 is automatically enabled. Pressing Run Fit will draw a pure function (model) on top of your first dataset without loading a second dataset.
    See the Second Line / Function-only 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.


Block 2 — Built-in functions

This block provides dropdown menus for 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 number of peaks (1–10 except for the Resonance Peak function).
Depending on your choice, additional input boxes appear to guide you.


Block 3 — Custom functions and coefficients

  • Click the y = … text box to open the Custom Function dialog.
    Enter your function using standard syntax (see 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 button — opens the coefficients table at any time to adjust starting values or constraints.

  • Fit button — runs the fit to the current data using your defined function and coefficients.


Block 4 — Weighting tools

If your dataset includes a σ (sigma) column, the Apply Weights box is ticked automatically to confirm it has been loaded.

  • When Apply Weights is checked, CFTool weights the data using
    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 σ 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 coefficient errors.
    Only choose this if you are confident that σ values represent true absolute uncertainties.

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


Block 5 — Confidence level and prediction bounds

Use the Confidence Level drop-down to select the confidence interval applied to coefficient errors and to any plotted prediction or functional bounds.

If Prediction Bounds or Functional Bounds are ticked, these will be drawn around the fitted curve with widths corresponding to the chosen confidence 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) checkbox allows the algorithm to adjust the fit using the x-weighting values.

Note: Below Block 5 you can find the Enable X Errors button, required for Orthogonal Distance fits


Block 6 — Fit limits

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

  • Enter minimum and maximum values manually to set limits.
    Limit markers will appear on the graph showing the selected range.

  • Tick Show Limits to show the limit lines and make them draggable.
    You can then drag them to new positions:

    • The lower limit snaps upward to the next data point.

    • The upper limit snaps downward to the next data point.

  • Click Reset Limits to return 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.

Note: Below Block 6 you can find the Add Line/ Enable Line button, which adds a second line and then toggles between the two lines


Summary

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