Screen for Erroneous
Values Based on Constant Value
screenWithConstantValue(string
duration,
floating-point
rejectTolerance,
floating-point
questionTolerance,
floating-point
minThreshold,
integer
maxMissing)
Flag values in time series whose values do not change more than a specified amount over a specified duation as questionable or rejected.
Values in the time series are screened for quality. All (non-missing) values whose difference over the specified duration is below rejectTolerance are marked with a rejected quality flag. Other whose whose difference over the specified duration is below questionTolerance are marked with a questioned quality flag. Other values are marked with an okay quality flag unless they are already marked as rejected or questioned. Only values above the specified minThreshold value are screened as described. Only time periods that contain no more that maxMissing missing values are screened as described.
Parameters:
tsc - The time series to derive from.
durationStr - The time period over which to perform the test, of the form nX, where in is an integer and X is one of Minutes, Hours, or Days, which can be abbreviated to one or more characters.
rejectTolerance - Values will be marked as rejected if they do not differ by more than this amount over the specified duration. To disable marking values as rejected, set this tolerance to less than zero.
questionTolerance - Values will be marked as questioned if they do not differ by more than this amount over the specified duration. To disable marking values as questioned, set this tolerance to less than zero.
minThreshold - Values will be screened only if they are greater than this value.
maxMissing - The maximum number of missing values to tolerate in the specified duration for screening purposes.
Example:
newDataSet = dataset.screenWithConstantValue(string duration,
floating-point rejectTolerance,
floating-point questionTolerance,
floating-point minThreshold,
integer maxMissing)
Returns: A copy of the time series with values with the quality set as described.