Screen for Erroneous
Values Based on Forward Moving Average
screenWithForwardMovingAverage(integer
numberToAverageOver,
floating-point
changeLimit)
Flag values in time series exceeding maximum change from a forward moving average. A running forward moving average of valid values is progressively computed over numberToAverageOver points. Values exceeding the moving average computed for the preceeding point location by more than changeLimit are flagged or set to the "Missing" value depending upon the settings for setInvalidToMissingValue or qualityFlagForInvalidValue parameters. Values failing the quality test are excluded from the forward moving average computation for the subsequent points. The maximum change comparison is done only when consecutive values are not flagged.
Parameters:
numberToAverageOver - the number of values to average over for computing the forward moving average. Must be greater than 2.
changeLimit - allowed deviation in the tested value from the forward moving average.
Example:
screenedData =
tsData.screenWithForwardMovingAverage(
integer numberToAverageOver,
floating-point changeLimit)
Returns: a copy of the time series with values failing the quality test set to undefined and with the quality flag set to missing.