Operations =========== Working with Operations ~~~~~~~~~~~~~~~~~~~~~~~ Various operations can be applied to curves in a graph. By default operations are applied only in the graph, **not to the worksheet data**. These include: * Translate and scale * Move and delete data points * Derivative, integral * Smooth, denoise * Interpolation/extrapolation * Add, subtract, multiply, etc. with another curve * Other calculations (manual) Curves that have operations appear blue in the legend: .. image:: images/legend-opers.png A list of all the operations applied to the selected curves appears in the properties window of the curve under the `Operations` tab. Operations can be individually enabled/disabled, moved, removed or edited. .. image:: images/opers.png Use :menuselection:`Operations --> Apply Permanently` to apply the operations to the worksheet data. :menuselection:`Operations --> Apply to Copy` makes a copy of the curve and applies the operations to it, removing them from the original curve. Operations can also be copied and pasted between curves. .. image:: images/opermenu.png Available Operations ~~~~~~~~~~~~~~~~~~~~ Translate --------- Shift horizontally and/or vertically (add a constant). Scale ----- Scale horizontally and/or vertically (multiply by a constant). Differentiate ------------- Three methods are available: **Central Differences** Derivative is the average of the slopes between each point and its two closest neighbors. **Savitzky-Golay** Calculate derivative using Savitzky-Golay smoothing (see below). *derivative*: order of the derivative to calculate *points*: number of points to use on either side of the data point *order*: Order of the polynomial used, usually leave this at 3 **Polynomial** Calculate *n*-th derivative from fitting a *n*-th order polynomial to a given number of points around each data point. Integrate --------- Two methods are available: **Trapezoidal** Integrate using the trapezoidal rule. **Splines** Calculate integral of a spline fitted to the data. *order*: polynomial order of the spline Smooth ------ Four smoothing methods are available: **Adjacent averaging** Data are smoothed using moving average. You can set the number of points on either side, as well as a `smoothing window `_ to emphasize the central values in the average. **Savitzky-Golay** Smoothing using a `Savitzky-Golay filter `_. You can set the number of points on either side, and the polynomial order. **Splines** Smooth using a spline curve. Set the spline order. **Order filter** Each point is replaced by the chosen percentile of a given number of data points around it. The default is a median filter (percentila is 0.5). Interpolate/Extrapolate ----------------------- Four interpolation methods are available: linear, splines, B-splines and `PCHIP `_. For extrapolation, you also have the choice to use data from another dataset or from the current fit function. Dataset Calculations -------------------- Add, subtract, multiply or divide with another curve. Manual ------ Enter expressions to apply manual calculations to the *x* and *y* values of the curve. Edit Points ----------- Drag data points to move, double click to remove. Denoise ------- Denoise a signal using wavelets. Parameters are the same as MATLAB's `wden `_ function.