Click or drag to resize
CVVURollingStats Method
Calculate a statistic in a rolling window.

Available since Oasis montaj version: 5.1.0
License: Available to anyone with an Oasis Montaj license.  

Namespace: Geosoft.Desktop.GXNet
Assembly: geosoft.desktop.gxnet (in geosoft.desktop.gxnet.dll)
Notes
If the input VVs are not REAL, copies are made to temporary REALs for processing. If the window size is even, it is increased by 1 so that the output value is put at the exact center index of the window. Statistics are calculated on the values in a window surrounding the individual data points. By shrinking the window at the ends, one-sided effects can be eliminated. For instance, if the data is linear to begin with, a rolling mean will not alter the original data. However, if the window size is kept constant, then values near the ends tend to be pulled up or down. With shrinking, the window is shrunk so that it always has the same width on both sides of the data point under analysis; at the end points the window width is 1, at the next point in it is 3, and so on, until the full width is reached. The median value is calculated by sorting the valid data in the window, then selecting the middle value. If the number of valid data points is even, then the average of the two central values is returned. The mode value is defined as the value which occurs most frequently in the data. This value may not even exist, or may not be unique. In this implementation, the following algorithm is used: The valid data in the window is sorted in ascending order. The number of occurrences of each data value is tracked, and if it occurs more times than any value, it becomes the modal value. If all values are different, this procedure returns the smallest value. If two or more values each have the same (maximum) number of occurrences, then the smallest of these values is returned.
Syntax
public static void RollingStats(
	CVV oVV1,
	CVV oVV2,
	int i3,
	int i4,
	int i5
)

Parameters

oVV1
Type: GeoEngine.Core.GXNetCVV
Input VV
oVV2
Type: GeoEngine.Core.GXNetCVV
Output VV
i3
Type: SystemInt32
See ST_INFOConstant
i4
Type: SystemInt32
Window size (>0, increased to nearest odd value)
i5
Type: SystemInt32
Shrink window at ends (1:Yes, 0:No)
See Also