15 Data AnalysisDataAnalysis
Introduction
Origin contains powerful tools for all of your analytic needs, including peak analysis, curve fitting, statistics, and signal processing. The output of one operation can be used as input for another, allowing for a chain of operations and their associated results to be updated. You can easily update results when input data or analysis parameters are changed and avoid the trouble of repeating the procedure from the beginning.
The following sections cover (1) delineating the data that you wish to analyze and (2) the Origin and OriginPro tools available for analyzing that data. Please refer to the How to Handle Repetitive Tasks chapter of this User Guide for more information on Analysis Templates, Dialog Themes and other timesaving features.
 Origin 2016 introduced addon tools called Apps. Since being introduced, many new exploratory and analysisrelated tools have been added to OriginLab's File Exchange and more tools are being released all the time. Please visit the File Exchange to review available tools.

Selecting Data
Origin's analysis can be performance from workbook or graph windows. By default analysis will be on done on highlighted data in worksheet or active plot in graph. You may want to restrict your analysis to a subset of the data; say, a certain range of rows or columns in a worksheet, or a certain X range in a graph.
You can either do the data selection (with methods mentioned below) before opening an analysis dialog or after opening the dialog. Most of Origin's XFunction based analysis tools have a Input Data branch with standard range selection control that you'll want to become familiar with (we explain the control, below).
Selecting Data in the Worksheet
Selecting Data, Worksheet
When you highlight a range of worksheet data, then open one of XFunction based dialog boxes  that would include nearly all of those that open from the Analysis or Statistics menus  you will see your range selection already entered into the dialog box Input Data branch. Most will find that selecting worksheet data prior to opening an Analysis or Statistics dialog box, is the easiest way to specify which data you wish to analyze.
If you open one of the XFunction dialog boxes without preselecting your data, the first thing you should do after openning a dialog is to select data in Input Data branch:
 Click the range selection control next to Input Data. The dialog box will roll up.
 Go to worksheet and highlight your worksheet data, then click the button at the right end of the rolled up dialog box. The Input Data branch will now show the selected range.
Note that you do not have to select entire datasets (columns). You can select a portion of your worksheet data and analyses will be confined to that selected subset of your data. Also if the analysis supports multiple datasets, you could support multiple ranges such as multiple Y columns or Y ranges. If the analysis only supports one dataset, though you could select multiple ranges, only the 1st range will be picked in analysis.
Note:
 The Input Data branch has a hierarchical structure. If the analysis supports multiple datasets, you can add multiple ranges under Input Data and they will show as Range 1, Range 2, etc., each with its corresponding X, Y, Error and Row controls.
 Mousing over each level will show a tooltip of where the data on that level is from (i.e. book, sheet and column).
 Rows control under each range node lets you set range by row index or X value. If you want to apply the same row range to all ranges under Input Data, click the arrow button to the right of the range node and choose Apply Row Range to All.
 Depending on where you are in the Input Data hierarchy, range selection button may have some limitations. E.g. if you click range selection control next to Y, though you could select multiple columns in a worksheet, only the 1st column is accepted.
 Click the arrow button to the right of the range selection control will show more selection options, such as pick a column there to do quick data selection.
 Depending on which level you are in, the selection options when clicking the arrow button may vary, such as clicking the "arrow" button next to Input Data, you will see a Select Columns... menu, which opens Column Browser to select multiple columns even from different worksheets.
Use List Datasets dropdown list to filter which sheets you want to pick from. The top panel list can be sorted by clicking any of the column headings, making it easy to select, for example, all columns that share the same LName or Comments. Then click Add button to add the column to your selection list in bottom panel. To modify the data input range of any dataset, click the range button to the right of any dataset added to the bottom panel and edit the From and To values.
Selecting Data in the Graph
Selecting Data, Graph
Active Dataset
When a graph window is active and you select one of the Analysis menu tools, the default behavior is for the analysis dialog box to open showing the selected range of the active dataset as your Input Data (note that analysis dialogs include an Input Data node that allows adjustments  adding more datasets with the interactive range selector button, changing a data range, etc.).
The active dataset is the one that shows in the data list (bottom of the Data menu) with a check mark next to it. Note that this analysis dialog box behavior applies even to plot groups. You can force an Analysis dialog box to register a particular data range by clicking on another of the data plots listed at the bottom of the Data menu.
Alternately, you can graphically set the range for your analysis by selecting one or more plots in the graph window:
 If your data plots are not part of a plot group, you can click once on the intended plot before opening an Analysis dialog box and this will set the Input Data range to the selected plot.
 If your data plots are part of a plot group, click once on any of the plots in the group to set Input Range to all plots in the group; or click a second time on any plot to restrict analysis to the selected plot (note that this does not switch the active dataset). Alternately, you can preselect multiple plots using the Regional Data Selector (see below).
 You can indicate the active dataset by placing a red rectangle around the plot's legend entry. To turn this feature on, click on your graph window, select Format: Page Properties..., click on the Legends/Titles tab and choose Indicate Active Dataset.

Selecting a Subset of Your Data Graphically
You can graphically select a range of data using the Regional Data Selector tool: Selecting Data, GraphRegional Data Selector
 With a graph window active, click and hold the Regional Data Selector button on the Tools toolbar, and then choose Selection on Active Plot or Selection on All Plots.
 Drag out a rectangle or freehand object to select an area of the plot(s). Press Space to toggle between rectangle and freehand modes .
When you make your selection, data markers appear on the graph, delineating the selected range(s). You can work with graphically selected data using Origin's analysis tools (e.g., Linear Fit), but note that some analysis dialog boxes do not work on multiple data ranges. The smoothing dialog box, for example, (Analysis: Signal Processing: Smooth...) will only smooth data in the active dataset or a single, selected plot.
  In addition to the data selection and masking methods discussed in this section, Origin includes data filtering and data reduction tools. Please visit the linked pages for details.

Editing a Data Marker
To edit a data marker:
Data Markers
 To modify a data range, right click a data marker and choose Edit or doubleclick on data marker. The red marker changes to dark color with arrows on both ends and cursor changes into a target. Drag start or end marker to a new position or use one of the keyboard shortcuts listed below and modify the data range. To escape edit mode, doubleclick on the marker or press Enter key.
 There are other options when right click data marker such as delete marker, delete data, etc..
Note: If you have used the Regional Data Selector tool to place markers on multiple plots (Selection on All Plots), be aware that moving markers will affect the data range of the active plot only; the ranges of other selected plots will not follow that of the active plot. This is a limitation of the Regional Data Selector.

Alternately, you can use these keyboard shortcuts to select and edit data markers:
 Select data markers using these keys ...
Hot Key

Action

s

Select the first pair of data markers on the graph (those marked with "1").

Tab

Select the next pair of data markers (not in edit mode) or the other data marker of the pair (in marker edit mode).

Home

Return to the first data marker.

End

Go to the last data marker.

 ... then activate and edit the data marker using these key combinations:
Hot Key

Action

Enter

Activate the selected data marker for editing. (Press Enter again to exit data selection mode.)

Arrow

Move the active data marker exactly one data point.

Ctrl/Shift + Arrow

Move the active data marker multiple data points.

Delete

Delete the the active data marker.

Difference between Data Markers and Analysis Markers
Data Markers
Analysis Markers
 Data Markers define a subrange that you select using the Data Selector tool.
If you want to remove the data markers from a graph, you can select Data: Clear Data Markers from the main menu, or click the Clear Data Markers button on the Markers and Locks toolbar.
 When the analysis routine is completed, Data Markers are replaced with Analysis Markers. By default, Analysis Markers will not show if the analysis is done on the entire dataset. If performed on a subrange, Analysis Markers will show at the beginning and end of that subrange. To modify the data range and rerun your analysis, you must rightclick an analysis marker and choose Change Parameters.... Change the Input Data range and rerun the analysis.
Note:
 If you set Recalculate to None in the analysis dialog box, then no analysis markers are generated.
 Data markers and analysis markers are not exported when you choose File: Export Graphs.
 To select the exact same range again for another analysis, click the green lock and choose Plot Input Data with Data Markers to create a new graph and do analysis on it.
 There is a Markers and Locks toolbar to control analysis markers and locks, such as Marker Hide Show to toggle analysis markers on or off, etc. There is also Data: Analysis Marker menu and context menus when right click on analysis marker, green lock, in graph layer to control analysis markers.

Data Masking
Masking is another tool that you can use when you want to analyze only a subset of your data, or when you have spurious data points that you do not want included in your analysis. Mask or unmask will trigger recalculation.
You can mask data points in either your worksheet or your graph. When data exist in both the worksheet and the graph, masking data in one will mask the corresponding data in the other.
Note that there are two toolbars with masking buttons: the Tools toolbar and the Mask toolbar. The masking tools on the Tools toolbar work only with graphs. The tools on the Mask toolbar work with worksheets or graphs.
Masking Data in Worksheets
Masking of worksheet data excludes masked data from analysis operations. When plotted, masked data points display in the mask color.
Masking Data, Worksheets
Masking Data, Remove or Disable Mask
Action

Toolbar Button

Shortcut Command

Notes

Mask data


Mask: Range

Mask the selected data range. Masked data will display in the mask color.

Unmask data


Mask: Clear Range

Unmask the selected data range. Unmasked points are included in analysis operations and plot "normally".

Change mask color


Mask: Change Color

Change the mask color of the masked data range.

Disable masking


Mask: Disable Masking

Toggle the mask on or off for all masked data in the worksheet.

Masking Data in Graphs
Masking Data, Graphs
With your graph window active:
 Choose Data: Mask Data Points from the main menu or click the Mask Points on Active Plot button or Mask Points on All Plots button on the Tools toolbar. This activates the Regional Mask Tool.
 To mask a single point, double click on the point.
 To mask a region of points, similar to Regional Data Selector, press the space bar to toggle among masking by row index, rectangular region or by freehand region. then draw a rectangle or freehand region to mask data in that region.
Note that the cursor changes as you:
 Press space bar to toggle masking data points by row index number, rectangular region or freehand region.
 Choose the Mask Points on the Active Plot tool vs. the Mask Points on All Plots of Active Layer tool (Tools toolbar).
Mask Points on Active Plot

Mask Points on All Plots of Active Layer

Purpose



Mask data points by row index number. All data points between the lowest and highest selected index numbers are masked regardless of whether they lie inside your rectangle.



Mask data points by rectangular region. Only the data points inside the rectangle that you drag out, will be masked.



Mask data points by freehand region. Only the data points inside the region that you drag out, will be masked.

To remove the mask from data points in the graph window:
 Choose either the Unmask Points on the Active Plot tool or the Unmask Points on All Plots of Active Layer tool on the Tools toolbar.
 Use the space bar, as needed, to choose points by index, rectangular region or by freehand region, then drag to unmask your data points.
 Masking Data, Remove or Disable Mask
There are some useful buttons on Mask toolbar such as
 Change mask color button to avoid using same color as data plot as mask color.
 Hide/Show masked points to hide masked points on the screen, printout and exported graph.
 Disable/Enable Masking button to quickly toggle the mask on or off without removing the masked points.

Drawing or Moving, or Deleting Data Points in the Graph
Data Points, Deleting
Data Points, Drawing
This collection of tools and menudriven operations is helpful in exploring certain "what if" scenarios, or to quickly generate some data for purposes such as testing a fitting function. These procedures work only with 2D scatter plots.
 Activate the graph window.
 Click on the Draw Data Tool .
 Make sure that the correct graph layer is active and place the cursor on the graph.
 Doubleclick to create data points. The Data Display tool opens (if not already open) and displays the X and Y values for each created data point.
 When you have finished adding data points, click on another tool (on the Tools toolbar) to exit drawing mode.
When you use the Draw Data tool, you simultaneously create a hidden worksheet named Drawn (worksheets are automatically enumerated, with n = 1, 2, 3, 4, etc.).
Opening the hidden Drawn Worksheet
Rightclick on the data plot and select Go to Drawn from the shortcut menu or in Plot Details dialog, with data plot selected on left panel, click the Workbook button.
A Drawn workbook will appear with A(X) and B(Y) columns with coordinate values of your drawn data plot.
Deleting a Data Point
You can delete individual data points from your graph:
 Select Data: Remove Bad Data Points.
 Doubleclick on the data point, or click to select the data point and press ENTER key.
 Click Arrow button on Tools toolbar or press ESC key to exit the Remove Bad Data Points mode.
The data point is deleted from both the data plot and the worksheet cell. In the worksheet, only the data cell for the Y value will be cleared and shown as missing value.
Moving a Data Point
You can move individual data points in the graph. Understand that when you do this, you are changing the plot and the underlying data:
 Select Data: Move Data Points (you'll be warned that you are about to change your data).
 Click on the point you want to move (change X and Y coordinates). Place crosshairs on the point and drag; or use the arrow keys.
 Click the Pointer button on the Tools toolbar or press ESC to exit the Move Data Points mode.
The data point is moved in the plot and the X and Y coordinates are changed in the worksheet cell.
Mathematics
Origin provides a number of mathematics tools to perform basic calculations, interpolation, and area or volume calculations.
Basic Math
Math Tools, Basic
Tool Name

Description

Menu Entry

 Simple Column Math/Simple Curve Math
 Normalize Columns/Curves
 Average Multiple Curves
 Differentiate

 Perform basic calculations on worksheet columns or XY data plots

Analysis:Mathematics (workbook, graph)


 Perform differentiation over a region of interest in a graph Region of Interest (ROI)

Gadgets:Differentiate... (graph)


 Use formulae to set/transform worksheet column values

Analysis:Mathematics (workbook)


 Generate pseudo inverse of a matrix

Analysis:Mathematics (matrix)

 Median Filter
 Special Filter
 Custom Filter

 Apply median/special/custom filter to a matrix

Analysis:Mathematics (matrix)

Interpolation
Math Tools, Interpolation
Tool Name

Description

Menu Entry


 Perform interpolation over a region of interestRegion of Interest (ROI)

Gadgets:Interpolate... (graph)

 Interpolate/Extrapolate
 XYZ Trace Interpolation(3D Graph)
 Trace Interpolation(2D Graph)

 Perform interpolation/extrapolation on a group of XY data.
 Perform periodic interpolation on XYZ worksheet data
 Perform interpolation on cycle or periodic curves

Analysis:Mathematics (workbook, graph)

 Interpolate/Extrapolate Y from X
 3D Interpolation

 Perform interpolation/extrapolation on a group of XY data to find Y at given X values.
 Perform interpolation with a 3D function on XYZ dataset.

Analysis:Mathematics (workbook)

 2D Interpolate/Extrapolate

 Perform 2D interpolation/extrapolation for a matrix

Analysis:Mathematics (matrix, graph from matrix)

Area/Volume Calculation
Math Tools, Area/Volume
Tool Name

Description

Menu Entry


 Perform integration over a region of interest in a 2D GraphRegion of Interest (ROI)

Gadgets:Integrate... (graph)

 Integrate(2D Graph)
 Polygon Area(2D Graph)
 XYZ Surface Area (3D Graph) (Pro Only)

 Perform integration on input data
 Calculate the area of enclosed plot regions
 Calculate the area of the XYZ surface

Analysis:Mathematics (workbook, graph)

 2D Volume Integrate (Pro Only)
 Matrix Surface Area (Pro Only)

 Calculate the volume beneath the matrix surface from zero plane
 Calculate the area of the matrix surface

Analysis:Mathematics (matrix, 3D graph from matrix)

Curve Fitting
Linear and Polynomial Fit
Curve Fit, Linear and Polynomial
Linear and polynomial fitting can be performed on worksheet data or data plots in a graph. The menu entries of these tools are listed in the table below. All are available for both workbook or plotted data.
Tool Name

Menu Entry


Analysis:Fitting:Linear Fit or Gadgets:Quick Fit (graph)

 Fit Linear with X Error (Pro Only)

Analysis:Fitting:Fit Linear with X Error

 Multiple Linear Regression

Analysis:Fitting:Multiple Linear Regression


Analysis:Fitting:Polynomial Fit or Gadgets:Quick Fit (graph)

Nonlinear Curve Fit
Curve Fit, Nonlinear
Surface Fit
You can perform nonlinear curve fitting using one of many builtin fitting functions, or you can create a userdefined fitting function. OriginPro supports implicit function fitting, surface fitting, and fit comparison. Some tools are available only in OriginPro.
The table below summarizes available nonlinear curve fitting tools:
Tool Name

Features

Menu Entry


 Fit a region of interest in a graph interactivelyRegion of Interest (ROI)
 Fit with builtin or userdefined fitting functions
 Fit one or multiple datasets

Gadgets:Quick Fit (graph) or Gadgets:Quick Sigmoidal Fit (graph)


 Fit with builtin or userdefined fitting functions
 Fit one or multiple datasets
 Compare fit, multiple parameter sets
 Global fit with parameter sharing
 Global fit, parameter sharing with multiple functions (Pro Only)
 Fit with replicas
 Advanced options including bounds, constraints, fit control

Analysis:Fitting:Nonlinear Curve Fit (workbook, graph)

 Implicit Curve Fitting (Pro Only)

 Fit with implicit functions
 Orthogonal Distance Regression (ODR) algorithm

Analysis:Fitting:Nonlinear Implicit Curve Fit (workbook, graph)


 Fit data from a matrix or worksheet XYZ columns

Analysis:Fitting:Nonlinear Surface Fit (workbook, graph) or Analysis:Nonlinear Matrix Fit (matrix)


 Create or edit userdefined fitting functions

Tools:Fitting Function Builder

 Fitting Function Organizer

 Manage fitting functions by categories
 Move or share functions between categories

Tools:Fitting Function Organizer


 Simulate a curve from a given function
 Simulate a surface from a given function (Pro Only)

Analysis:Fitting:Simulate Curve or Analysis:Fitting:Simulate Surface

 Fit Comparison (Pro Only)

 Compare fit results from two datasets using one function function
 Compare fitting results for one dataset using two fitting functions

Analysis:Fitting:Compare Datasets or Analysis:Fitting:Compare Models (workbook, graph)

 Fit and Rank Functions (Pro Only)

 Compare fit results of two or more functions for a single dataset

Analysis:Fitting:Rank Models (workbook, graph)

Peak Analysis
Peak Analysis
Origin provides several tools for peak analysis. With these tools, you can define and subtract baselines, find peaks, integrate peaks, and fit peaks. Some tools are available only in OriginPro.
The table below summarizes various tools available for peak analysis:
Tool Name

Features

Menu Entry


 Perform peak analysis over a region of interest Region of Interest (ROI)
 Create baseline
 Subtract baseline
 Find peaks
 Integrate peaks
 Fit peaks

Gadget:Quick Peaks (graph)


 Pick multiple peaks
 Fit peaks

Analysis:Peaks and Baseline:Multiple Peak Fit (graph, workbook)


 Create baseline
 Subtract baseline
 Find peaks
 Integrate peaks
 Fit multipeak datasets (Pro Only)
 Fit baseline (Pro Only)
 Find hidden peaks
 Compute many peak characteristics (Pro Only)

Analysis:Peaks and Baseline:Peak Analyzer (graph, workbook)


 Use a theme file created using Peak Analyzer tool
 Perform batch peak analysis on multiple datasets

Analysis:Peaks and Baseline:Batch Peak Analysis Using Theme (graph, workbook)

Signal Processing
Origin provides signal processing tools for many tasks, including producing signal transforms, smoothing/filtering, and correlation on 1D and 2D signals. Advanced tools are available in OriginPro.
You may refer to the tables below for the signal processing tools and their menu entry.
Signal Transforms
Signal Processing, Transforms
Tools

Menu Entry


Gadgets:FFT... (graph)

 Fast Fourier Transform (FFT)
 Inverse Fast Fourier Transform (IFFT)

Analysis:Signal Processing:FFT (workbook)

 2D FFT (Pro Only)
 2D IFFT (Pro Only)

Analysis:Signal Processing:FFT (matrix)

 Shorttime Fourier Transform (STFT) (Pro Only)

Analysis:Signal Processing:STFT (workbook)

 Hilbert Transform (Pro Only)

Analysis:Signal Processing:Hilbert Transform (workbook)


Plot>2D:Profile:Image Profile(matrix, worksheet, XYZ data)

Filtering
Signal Processing, Filtering
Filtering, Signal Processing
FFT
Tools

Menu Entry


Analysis:Signal Processing:FFT Filters (workbook)


Analysis:Signal Processing:2D FFT Filters (matrix)

 IIR Filter Design (Pro Only)

Analysis:Signal Processing:IIR Filter (workbook)

Smoothing
Signal Processing, Smoothing
Smoothing
Tools

Menu Entry


Analysis:Signal Processing:Smooth (workbook, matrix)

Correlation
Signal Processing, Correlation
Tools

Menu Entry


Analysis:Signal Processing:Correlation (workbook)

 2D Correlation (Pro Only)

Analysis:Signal Processing:2D Correlation (matrix)

Convolution
Convolution
Tools

Menu Entry


Analysis:Signal Processing:Convolution (workbook)

Wavelet Analysis (Pro Only)
Wavelet Analysis
Tools

Menu Entry

 Continuous Wavelet Transform
 Discrete Wavelet Transform (Decomposition)
 Inverse Discrete Wavelet Transform (Reconstruction)
 MultiScale Wavelet Decomposition
 Smoothing
 Noise Removal

Analysis:Signal Processing:Wavelet Analysis (workbook)

 2D Wavelet Decomposition
 2D Wavelet Reconstruction

Analysis:Signal Processing:Wavelet Analysis (matrix)

Other Advanced Tools (Pro Only)
Signal Processing, Decimation
Signal Processing, Coherence
Signal Processing, Envelope Curves
Signal Processing, Rise Time
Tools

Menu Entry


Gadget:Rise Time (graph)


Analysis:Signal Processing:Decimation (workbook)


Analysis:Signal Processing:Coherence (workbook)


Analysis:Signal Processing:Envelope (workbook)

Image Processing
Image Processing
Origin provides a collection of tools for basic image processing. These tools are accessible from the Image menu when a matrix book is active. The tools are organized in the following submenus:
 Image:Adjustments
 Image:Arithmetic Transforms
 Image:Conversion
 Image:Geometric Transforms
 Image:Spatial Filters
Topics for Further Reading
