Reduce XY data using subgroup stats on X
Minimum Origin Version Required: 8.1 SR0
More options are introduced since 2015 SR0
1. reducexy iy:=(col(A),col(B)) subgroup:=inc xincr:=0.5 xstats:=median ystats:=min;
2. reducexy iy:=(col(A),col(B)) subgroup:=points points:=8 xstats:=ave ystats:=ave;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | iy |
Input XYRange |
|
Specifies the input data range. |
SubGroup Method | subgroup |
Input int |
|
Specifies the method to divide the source data into subgroups. Then data points in each group will be merged into a single data point.
Option list:
|
Divide XY by | divide |
Input int |
|
Available when SubGroup Method(subgroup) set to By Number of Groups(roups) and By X Increment(inc). Determine how to divide input XY datasets into subgroups.
Option list:
|
N | points |
Input int |
|
This is only available when By Every N Points is selected in SubGroup Method. It specifies a number n. Then every n data points in the input range are merged into one data point. |
X Increment | xincr |
Input double |
|
This is only available when By X Increment is selected in SubGroup Method. It specifies a value dx. Then the input data points are divided into several groups using dx so that for any two data points which belong to the same group, the difference in their X values cannot exceed dx. After grouping, each group of data points will be merged into one. When xincr is not specified, its default value is automatically calculated by the this equation: xincr = end-start / nsize * 5, where nsize is the number of input data points. |
Groups | groups |
Input int |
|
This is only available when By Number of Groups is selected in SubGroup Method. It specifies the number of groups. |
X Start | start |
Input double |
|
Specifies the X value to start grouping. |
X End | end |
Input double |
|
Specifies the X value to end grouping. |
Reference Column(s) | ref |
Input Range |
|
Specifies the reference column(s), when SubGroup Method is set to ref By Reference Column(s). |
Merged X by | xstats |
Input int |
|
Specifies the way to pick the X value of the output data point, into which a group of data points are merged.
Option list:
The next three items are available when SubGroup Method is By X Increment or By Number of Groups.
|
Merged Y by | ystats |
Input int |
|
Specifies the way to pick the Y value of the output data point, into which a group of data points are merged.
Option list:
|
Output | oy |
Output XYRange |
|
Specifies the output range.
See the syntax here. |
Output Group Info | rd |
Output ReportData |
|
When SubGroup Method is set to ref By Reference Column(s), you can use this option to output the group information from the reference columns |
This X-function allows you to reduce XY data based on X values. The X values are required to be monotonic.
It provides multiple methods to group the data. After being grouped, each group of data points are merged into a single data point. You can specify the way to pick the X and Y values of the output data point.
There is a dataset whose X values are not evenly spaced, and you want to reduce the data according to the X values. The dataset contains 200 data points. If you perform the following steps, you will get 50 of them:
You can also use the following script command to reduce the data points:
reducexy -r 2 iy:=[Book2]Convolution!(col(A),col(B)) subgroup:=groups groups:=50 xstats:=first ystats:=min;
Keywords:data reduction, average, mean, sum, minimum, maximum, statistics, binning