Scripting > Math Functions


Screen for Erroneous Values Based on Maximum/Minimum Range


screenWithMaxMin(floating-point minValueLimit,

      floating-point maxValueLimit,

      floating-point changeLimit,

      boolean setInvalidToMissingValue,

      floating-point invalidValueReplacement,

      string qualityFlagForInvalidValue)

 

Flag values in time series exceeding minimum and maximum limit values or maximum change limit.

 

Values in the time series are screened for quality. Values below minValueLimit or above maxValueLimit or with a change from the previous time series value greater than changeLimit fail the quality test.  The maximum change comparison is done only when consecutive values are not flagged.

 

Parameters:

minValueLimit - minimum valid value limit.

maxValueLimit - maximum valid value limit.

changeLimit - maximum change allowed in the tested value from the previous time series value.

setInvalidValueToSpecified - if true, time series values failing the quality test are set to the specified value.

invalidValueReplacement - The value to use for replacing invalid values is setInvalidToSpecifiedValue is set to "true".

qualityFlagForInvalidValue - character string representing the quality flag setting for values failing the quality test.  The accepted character strings are: "M" or "Missing", "R" or "Rejected", "Q" or "Questionable".

Example:

screenedData = tsData.screenWithMaxMin(

            floating-point minValueLimit,

                         floating-point maxValueLimit,

                         floating-point changeLimit,

                         boolean setInvalidToMissingValue,

                         floating-point invalidValueReplacement,

                         string qualityFlagForInvalidValue)

Returns:  a copy of the time series with values failing the quality test set to missing.