KPG1_THRSx

Sets pixels in array to defined new values outside limits

Description:

This routine takes an array and sets all values above a defined upper threshold to a new defined value, and sets all those below a defined lower threshold to another defined value. In practice, all values outside the two thresholds may be set to zero or the bad value, for example.

If the lower threshold is greater than or equal to the upper threshold, the values between the thresholds are set to the supplied lower replacement value, and the upper replacement value is ignored. In this case the number of replaced pixels is returned in NREPLO, and NREPHI is returned as -1.

Invocation

CALL KPG1_THRSx( BAD, EL, INARR, THRLO, THRHI, NEWLO, NEWHI, OUTARR, NREPLO, NREPHI, STATUS )

Arguments

BAD = LOGICAL (Given)
The bad-pixel flag. If it is .TRUE., tests are made for bad array values. When .FALSE., no tests are made for bad values, and any encountered are treated literally.
EL = INTEGER (Given)
Dimension of the input and output arrays.
INARR( EL ) = ? (Given)
Input data to be thresholded.
THRLO = ? (Given)
Upper threshold level.
THRHI = ? (Given)
Lower threshold level.
NEWLO = ? (Given)
Value to which pixels below THRLO will be set.
NEWHI = ? (Given)
Value to which pixels above THRHI will be set.
NREPLO = ? (Returned)
The number of values less than the lower threshold and substituted.
NREPHI = ? (Returned)
The number of values greater than the upper threshold and substituted.
OUTARR( EL ) = ? (Returned)
Output thresholded data.
STATUS = INTEGER (Given)
Global status.

Notes: