
Envelope
Menu Information
Envelope
Brief Information
Get envelope of the data
Additional Information
Minimum Origin Version Required: 8.1 SR0
This feature is for OriginPro only.
Command Line Usage
- envelope iy:=col(b) type:=2;
- envelope iy:=col(b) type:=0 npts:=5;
Variables
Display Name
| Variable Name
| I/O and Type
| Default Value
| Description
|
| Input
| iy
|
Input
XYRange
| <active>
|
Specifies the input data range.
|
| Envelope Type
| type
|
Input
int
| Upper Envelope
|
Specifies the type of envelope to be found.
Option list:
- upper:Upper Envelope
- Only the upper envelope will be found.
- lower:Lower Envelope
- Only the lower envelope will be found.
- both:Both Envelopes
- Both the upper and the lower envelopes will be found.
|
| Smooth Points
| npts
|
Input
int
| 2
|
Smoothing is performed during the envelope detection. This variable controls the smoothing degree. The greater this value is, the smoother the envelope curve will be. See the algorithm part for details.
|
| Output
| rd
|
Output
ReportData
| [<input>]<input>
|
Specifies the output range.
|
Description
Envelope is a curve ?enveloping? the source data. It is tangent to every peak in the source dataset.
This X-Function obtains the upper, lower, or both envelopes of the source data by applying a local maximum method combined with a cubic spline interpolation.
Examples
- The following example detects both upper and lower envelopes in the imported signal data .
- Import the file \Samples\Signal Processing\Sine Signal with High Frequency Noise.dat.
- Highlight the columns in the worksheet and select Plot: Line: Line from the Origin menu to create a line plot.
- Select Analysis: Signal Processing: Envelope from the Origin menu to bring up the dialog of the X-Function.
- Select Both Envelopes from the Envelope type drop-down list. Set Smooth Points to 1.
- Check OK to execute. The envelopes should be plotted on the graph. You will get the following result:
- The following scripts perform envelope detection without opening the dialog.
//import the desirable data into a new book.
filename$ = system.path.program$+"Samples\Signal Processing\Gaussian Envelope.dat";
newbook;
impASC filename$;
envelope iy:=col(b) type:=both;//get both upper and lower envelopes to the data
Algorithm
This X-Function detects the envelopes in the following steps:
- Find out all the points whose first-order derivative is equal to zero in the source data. These points will be called the extreme values.
- Perform cubic spline interpolation through these extreme values.
- Smooth the interpolated data. The smoothing method employed here is Adjacent-Averaging, which takes the average of a certain number of data points around each point in original data. For more information about the smoothing method, please refer to the Algorithm description of the Smoothing function in our User Guide