11.3 The Quick Peaks GadgetGadgetQuickPeaks
Overview
The Quick Peaks Gadget provides a quick and interactive way to perform peak analysis on data plotted in a graph. You can select an arbitrary range of the data plot using the region of interest (ROI) object displayed in the graph. Peak analysis results will update as the ROI is moved or resized.
With the Quick Peaks gadget, you can:
To Open Quick Peaks Gadget
To use this tool, select Gadgets: Quick Peaks from the Origin menu, when a graph is active. If the tool has already been activated, you can reopen the Quick Peaks dialog by clicking on the arrow in the upperright corner of the ROI and choosing Preferences.
To Show or Hide Gadget Tool
To toggle the display of all gadget ROI boxes in a graph at the same time, click the H button in the top right corner of the graph, which enables users to export the graph with gadget results.
ROI Box Tab
X Scale

Specify the X Data range for the ROI.
 From
 The beginning of X scale.
 To
 The ending of X scale.
 Fixed (Prevent moving by ROI)
 Fix the X scale to prevent from moving by ROI box.

Show Tool Name

Specify whether to show the tool's name near the top of the ROI.

Show Number of Peaks on CenterTop

Specify whether to show the number of peaks on centertop of the ROI.

Fill Color

Specify the filled color of the ROI.

Baseline Tab
Mode

Specify the baseline mode. Options include:
 None (Y=0)
 Use Y=0 as baseline.
 Constant
 Use a horizontal line for baseline. You can specify the intercept of the horizontal line in the Constant control below.
 2nd Derivative
 Use the 2nd Derivative method to create baseline.
 Use Existing Dataset
 Select an existing dataset as the baseline.
 Min&Max
 Use minimum Y as baseline to find positive peaks. Use maximum Y as baseline to find negative peaks.
 End Points Weighted
 Create a smoothed curve using data points from two ends.
 Straight Line
 Connect two end points of the data plot and connect them as baseline.

Range

This is not available when the Mode is Straight Line. Specify how the baseline range shows on the ROI.
 Full Plot Range
 Create the baseline for the full plot range.
 Curve Within ROI
 Create the baseline only for the plot range within the ROI box.

Fix x to

This is only available when the Mode is Straight Line. Specify how the straight line end points are decided.
 Entire Data
 The end points of the data plot are used
 Rectangle
 The end points at the boundaries of ROI box are used
 Scale
 The end points at the X axis scale are used

Y Offset of Left

This is only available when the Mode is Straight Line. Specify the left end point offset on the Y axis scale.

Y Offset of Right

This is only available when the Mode is Straight Line. Specify the right end point offset on the Y axis scale.

Smoothing Method

Select smoothing method to create baseline. This option is only available when the Mode is set as 2nd Derivative.
 Window Size: Specify the desired window size (a positive integer) in the moving window for the SavitzkyGolay or AdjacentAveraging smoothing.
 Threshold: Specify threshold for the SavitzkyGolay or Adjacent_Averaging smoothing.
 Polynomial Order: This parameter is available only when SavitzkyGolay is selected for Smoothing Method. It specifies the polynomial order (1 through 9).

Maximum Anchor Points

Specify the maximum of baseline anchor points. This option is only available when you set Mode to 2nd Derivative.

Connected Method

Specify connect method for the anchor points. This option is only available when you set Mode to 2nd Derivative.

Constant

Use dropdown list to specify the intercept for the horizontal line to be used as the baseline.
 Minimum
 Set the intercept to the minimum value of the data.
 Maximum
 Set the intercept to the maximum value of the data.
 Mean
 Set the intercept to the mean of the data.
 Median
 Set the intercept to the median of the data.
 Custom
 When this option is chosen, specify the desired intercept for the horizontal line as baseline.

Y=

Specify the customized intercept for the horizontal line as baseline. This option is only available when Constant is Custom.

Dataset

Specify a dataset as baseline. This option is only available when Mode is set to Use Existing Dataset.

End Points(%)

Specify the percentage of end points to create baseline. This option is only available when you set Mode as End Points Weighted.

Find Peak Tab
Direction

Specify whether or not to find peaks with a specified direction only.
 Positive
 Find positive peaks only.
 Negative
 Find negative peaks only.
 Both
 Find both positive and negative peaks.

Peak Finding Settings

Specify the settings for finding peaks.
 Method: Use this dropdown list to select the method to find the peaks.
 Local Maximum
 Use the Local Maximum method to find the peaks.
 Window Search
 Use the Window Search method to find the peaks.
 1st Derivative
 Use the first derivative method to find the peaks.
 2nd Derivative (Search Hidden Peaks)
 Use the 2nd Derivative method to find the peaks. This method is capable of detecting hidden peaks in the data.
 Residual (Search Hidden Peaks)
 Use the Residual after 1st Derivative method to find the peaks. This method is capable of detecting hidden peaks in the data.
 Local Points: This is available only when Local Maximum is selected in the Method dropdown list. It specifies the number of points in the local area, which will be used for finding the peaks with the Local Maximum method.
 Size Option: This is available only when Window Search is selected in the Method dropdown list. This dropdown list specifies how the Height and Width values (see below) are interpreted.
 Raw Size
 The values will be interpreted as raw sizes.
 Percent of Raw Data
 The values will be interpreted as the percentages with respect to the total width or maximum height of the spectrum data.
 Height: This is available only when Window Search is selected in the Method dropdown list. It specifies the height of the rectangle, which is used to find the peaks. There is an Auto check box to the right. If it is selected, it will determine the value automatically. Therefore, if you want to edit the value, please uncheck this check box.
 Width: This is available only when Window Search is selected in the Method dropdown list. It specifies the width of the rectangle, which is used to find the peaks. There is an Auto check box to the right. If it is selected, it will determine the value automatically. Therefore, if you want to edit the value, please uncheck this check box.
 Smooth Derivative: This is available only when 1st Derivative, 2nd Derivative (Search Hidden Peaks) or Residual (Search Hidden Peaks) is selected in the Method dropdown list. Specify the method to smooth the derivative of data (1st derivative or 2nd derivative).
 Method: Specify the smoothing method.
 None
 Do not use any smoothing method.
 SavitzkyGolay
 Specify the SavitzkyGolay method to get smooth derivative.
 FFT Filter
 Specify the FFT Filter method to smooth derivative. It is only available for 2nd Derivative (Search Hidden Peaks).
 AdjacentAveraging
 Specify the AdjacentAveraging method to smooth derivative. It is only available for 2nd Derivative (Search Hidden Peaks).
 Quadratic SavitzkyGolay
 Specifies the Quadratic SavitzkyGolay method to smooth derivative. It is only available for 2nd Derivative (Search Hidden Peaks).
 Polynomial Order: It is available for SavitzkyGolay and Quadratic SavitzkyGolay methods to specify the polynomial order.
 Points of Window: It is available for SavitzkyGolay, AdjacentAveraging and Quadratic SavitzkyGolay methods. The greater this value, the greater the degree of smoothing. A value of zero for this parameter will leave the data unsmoothed.
 Cut Off Frequence: It is available only for FFT Filter method. It specifies the cutoff frequency.

Peak Filtering

Specify how to filter peaks.
 Method: Use this dropdown list to specify whether you want to limit the number of found peaks or the height of the peaks.
 None
 Select this option if you do not want to limit the number of found peaks nor the heights of the peaks.
 By Height
 When you select this option and specify a threshold height with the Threshold Height(%) text box, only the peaks whose heights are not less than the threshold height will be found.
 By Number
 If you select this option and enter a value in the Number of Peaks text box, you can limit the number of peaks that will be found.
 Threshold Height(%): This text box is available only when By Height is selected in the filter Method dropdown list. You can use it to specify the minimum height of the found peaks. It is a percent of a reference value, which is defined as follows: First, get the maximum value and the minimum value of the data (if a baseline has been subtracted from it, use the data after subtraction). Then compare the absolute values of the maximum value and the minimum value. The greater one will be regarded as the reference value of the Threshold Height. There is an Auto check box to the right. When it is selected, the smooth points will be determined automatically. If you want to specify the height, make sure the clear this check box.
 Number of Peaks: This text box is available only when By Number is selected in the filter Method dropdown list. You can use it to specify the maximum number of the found peaks. There is an Auto check box to the right. When it is selected, the smooth points will be determined automatically. If you want to specify the number of peaks, make sure the clear this check box.

Peak Display

Peak Marker: Whether to show peak marker.
 Color: The color of peak marker.
 Size: The size of peak marker. This dropdown list allows typing a number not listed there.
Peak Label: Whether to show peak label.
 Label: What label of the peak to show, includes three options:
 X of Peaks: Show only X scale of the peak as peak label.
 Y of Peaks: Show only Y scale of the peak as peak label.
 (X,Y) of Peaks: Show both X and Y scales of the peak as peak label.
Base Marker: Whether to show base marker.
 Color: The color of base marker.
 Size: The size of base marker. This dropdown list allows typing a number not listed there.

Tag Peak and Base as

 Data Plot
 If this is selected, later if you select Tag Peaks from the gadget flyout menu, the tagged peak labels will be automatically created as a data plot and added to the original graph.
 Marker
 If this is selected, later if you select Tag Peaks from the gadget flyout menu, the tagged peak labels will be only added as data marker. But you can right click on the data marker(move mouse over and right click when mouse turn to crossing) and choose Convert to Data Plot to convert data marker into data plot.

Area Tab
Integration from

Select how to integrate the peaks, from Beaseline or Y=0.

Show Integrated Area

Select if show the integration area of found peaks in the ROI box.

Output to Tab
Script Window

Specify whether to output the results to the Script Window.

Results Log

Specify whether to output the result to the Results Log.

Append to Worksheet

Specify whether to append the results to a worksheet.

Result Worksheet Name

This is only available when Append to Worksheet is selected. It is used to specify the name of the worksheet.

Tag Info Worksheet Name

Specify the output sheet name to store the tag information. If Data Plot is chosen for Tag Peak and Base as in the Find Peaks tab, a new worksheet with specified name will be created with tag info data when output the results; Otherwise, if Marker is chosen for Tag Peak and Base as, the worksheet will not be created because Marker does not have associated data.

Output Baseline to Worksheet

Specify if output the baseline to worksheet.

Quantities Tab
Output Quantities

Specify what data to output.
 Dataset Identifier
 Specify a dataset identifier in the dropdown list.
 Peak ID
 Peak ID, something like "Peak 1", "Peak 2", etc.
 Peak Row
 The row index of the peak center.
 Peak X
 The X scale of the peak.
 Peak Y
 The Y scale of the peak.
 Height
 The height of peak, calculated from baseline.
 Peak Area
 The peak area that is calculated by integrating the raw peak data from the baseline or Y=0 (depending on the selection in the Integrate From dropdown list under the Area tab). The integration range is marked out by Base Marker on Find Peak tab, which is not identical to the range covered by ROI box.
 FWHM
 The full width at half maximum height or the peak width at half the peak's maximum value.
 Centroid
 The peak centroid or gravity center, which is defined as:
 Left Half Width
 The left half width. If we draw a line for , this line will intercept with the input data at two points. Let's denote them as and , where . Also, we denote the peak center as . Then we can compute the left half width as:
 Right Half Width
 The righthalf width. If we draw a line for , this line will intercept with the input data at two points. Let's denote them as and , where . Also, we denote the peak center as . Then we can compute the right half width as:
 Left Base Marker Row
 The row index of the left base marker.
 Left Base Marker X
 The X scale of the left base marker.
 Left Base Marker Y
 The Y scale of the left base marker.
 Right Base Marker Row
 The row index of the right base marker.
 Right Base Marker X
 The X scale of the right base marker.
 Right Base Marker Y
 The Y scale of the right base marker.
 Info
 The information of the baseline, which is an embedded notes window.

Flyout Menu
New Output

Output results to the specified worksheet (if not empty, append the results).

New Output for Entire Curve

Output results for all peaks in the active plot to the specified worksheet (if not empty, append the results).

New Output for All Curves (N)

Output the results for all curves in the current layer to the specified worksheet (if not empty, append the results).

New Output for All Layers (L)

Output the results for all curves in all layers within the current graph to the specified worksheet (if not empty, append the results).

Subtract Baseline

Subtract the specified baseline from source data in the ROI box.

Tag Peaks

Tag the found peaks and add the peak labels for found peaks as a label plot or data markers into the original graph. The labels will still exist even after closing the gadget. When the peaks are added as data marker, they can be used by the Multiple Peak Fit (menu is Analysis: Peaks and Baseline: Multiple Peak Fit) tool.

Fit Peaks

Fit the found peaks by specifying a fitting function.

Switch to Peak Analyzer

Switch to Peak Analyzer to fit the found peaks. More details about fitting peaks in Peak Analyzer, please refer to this help page.

Update Output

Update the output, and the original results will be clear, then add the current results. This is applicable only when you have output the peak values.

Go to Report Worksheet

Activate the report worksheet, if there is one.

Change Data

Change the source data set. This is applicable only when there are multiple curves on the graph layer.
Please note, when you change the source data/target plot, the peak markers and peak labels of found peaks will automatically show on the newlyselected plot, following the settings in the Find Peaks tab. If you need keep the peak markers and labels on current plot, please select Tag Peaks from the flyout menu.
By default, the Auto mode will be checked in the flyout menu, which means the target data/plot will follow the data plot selection/highlighting outside the ROI box on the graph.
For the earlier versions than Origin 2019, Origin doesn't support this auto behavior; to change target plot/data, you can only select desired one from the flyout plot list.
In the flyout menu, it will show first 20 datasets/plots. If there are more than 20 plots in the graph, you can click More... at the bottom of the list to open the Select Plot dialog to select other plots.

Expand to Full Plot(s) Range

Expand the ROI box to full plot range.

Fix ROI Position

Fix the ROI position, then you cannot move it any more.

Save Theme

Save theme for the dialog settings.

Save as <default>

Save the current dialog settings as default theme.

Load Theme

Load the existed theme to apply the dialog settings.

Preferences

Open the Quick Peaks Preferences dialog, which is similar with the one when starting the gadget by selecting menu Gadgets: Quick Peaks.

