Analysis functions

Overview
LabPlot supports a wide variety of data analysis functions:
Data reduction
Differentiation
Integration
Interpolation
Smoothing
Nonlinear curve fitting
Fourier filter
Fourier transform
All of them can be applied to any data consisting of x- and y-columns. The analysis functions can be accessed using the Analysis menu or the context menu of a worksheet. The newly created curves can be customized (line style, symbol style, ) like any other x-y-curve.

Data reduction
To reduce the number of data points without losing the features of a data set you can apply one of several line simplification algorithm:
Douglas-Peucker
Visvalingam-Whyatt
Reumann-Witkam
Perpendicular distance simplification
n-th point simplification
Radial distance simplification
Interpolation (nearest neighbor)
Opheim
Lang
The desired tolerance is automatically calculated from the data but can also be changed in the dock widget.

Differentiation
Numerical differentiation of data can be done specifying:
order of derivation (first to sixth order)
order of accuracy (up to 4th order, depending on derivation order)

Integration
Numerical integration of data can be done specifying one of the methods
rectangle (1-point) rule
trapezoid (2-point) rule
Simpson-1/3 (3-point) rule
Simpson-3/8 (4-point) rule
The default method (trapezoid) should be suitable for most cases. The number of resulting data points is reduced for both Simpson-rules due to the properties of these methods.

Interpolation
Interpolation of data can be done with several algorithm:
linear
polynomial (if number of data points < 100)
cubic spline
cubic spline (periodic)
Akima spline
Akima spline (periodic)
Steffen spline (needs GSL ≥ 2.0)
cosine
exponential
piecewise cubic Hermite (finite differences, Catmull-Rom, cardinal, Kochanek-Bartels)
rational functions
The interpolating function is calculated with the given number n of data points and evaluated as:
function
derivative
second derivative
integral (starting from zero)

Smoothing
A number of different smoothing methods are supported:
Moving average (central)
Moving average (lagged)
Percentile filter
Savitzky-Golay
All smoothing methods support several padding modes (constant, periodic, mirror, nearest, etc.) for the beginning and end of the data set. The moving averages support several weight functions (uniform, triangular, binomial, parabolic, tricubic, etc.) which can be selected to weight the selected data points depending on their distance.

Curve fitting
Linear and non-linear curve fitting of data can be done with several predefined fit-models (for instance polynomial, exponential, Gaussian or custom) to data consisting of x- and y-columns with an optional weight column. With a custom model any function with unlimited number of parameters can be used for fitting. The results including statistical properties are displayed in the results text.
The start values of the parameter can be set in the parameter dialog. It is also possible to fix any parameter and set lower and upper limits to the values here. Be aware that reducing the parameter space by fixing parameter or specifying limits can slow down convergence or avoid finding a good result. It's always a good idea to remove any parameter limitations when good start values are found.
Following options can be set in the options dialog to optimize the fitting:
Max. iterations: number of maximum iterations
Tolerance: desired tolerance for result
Evaluated points: number of points to evaluate the fit function
Evaluate full range: evaluate the fit function for the full data range instead of evaluating only for the given x range
Use results as new start values: results will be the new parameter start values

Fourier filter
This function can be used to apply a Fourier filter to any data consisting of x- and y-columns. Supported filter types are:
Low pass
High pass
Band pass
Band reject (band block)
where any of them can have the form
Ideal
Butterworth (order 1 to 10)
Chebyshev type I or II (order 1 to 10)
Optimal "L"egendre (order 1 to 10)
Bessel-Thomson (any order)
The cutoff value(s) can be specified in the units frequency (Hertz), fraction (0.0 to 1.0) or index of the data points.

Fourier transform
To convert a signal from time to frequency domain or to change between other conjugate variables like position and momentum (k-space) a discrete Fourier transform can be applied. Following options can be used to suite one needs:
Window function (Welch, Hann, Hamming, etc.) to avoid leakage effects
Output (magnitude, amplitude, phase, dB, etc.)
One or two sided spectrum with or without shifting
X axis scaling to frequency, index or period