Scripting > Math Functions


Screen for Erroneous Values Based on Duration Magnitude

 
screenWithDurationMagnitude(string durationStr,

      floating-point minRejectLimit,

      floating-point minQuestionLimit,

      floating-point maxRejectLimit,

      floating-point maxQuestionLimit)

 

Flag values in time series whose accumulation over a specified period lies minimum/maximum limits values as questionable or rejected.

Values in the time series are screened for quality. All (non-missing) values whose accumulated value for the specified duration is below minRejectLimit or above maxRejectLimit are marked with a rejected quality flag. Other whose whose accumulated value for the specified duration is below minQuestionLimit or above maxQuestionLimit 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.

 

Parameters:

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.

minRejectLimit - Values whose accumulated value for the specified duration is below this will be marked as rejected.

minQuestionLimit - Values whose accumulated value for the specified duration is below this, but not below

minRejectLimit - will be marked as questioned.

maxQuestionLimit - Values whose accumulated value for the specified duration is above this, but not above

maxRejectLimit - will be marked as questioned.

maxRejectLimit - Values whose accumulated value for the specified duration is above this will be marked as rejected.

Example:

screenedData = tsData. screenWithDurationMagnitude(string durationStr,

      floating-point minRejectLimit,

      floating-point minQuestionLimit,

      floating-point maxRejectLimit,

      floating-point maxQuestionLimit)

Returns: A copy of the time series with values with the quality set as described.