KPG1_GHSTx

Calculates the histogram of an array of data

Description:

This routine calculates the truncated histogram of an array of data between defined limits and in a defined number of bins.

Invocation

CALL KPG1_GHSTx( BAD, SIZE, ARRAY, WGTS, WEIGHT, NUMBIN, CUMUL, : VALMAX, VALMIN, HIST, STATUS )

Arguments

BAD = LOGICAL (Given)
If .TRUE., bad pixels will be processed. This should not be set to false unless the input array contains no bad pixels.
SIZE = INTEGER (Given)
The dimension of the array whose histogram is required.
ARRAY( SIZE ) = ? (Given)
The input data array.
WGTS( SIZE ) = DOUBLE PRECISION (Given)
The weight associed with each element of the input data array. Ignored if WEIGHT is zero.
WEIGHT = DOUBLE PRECISION (Given)
If non-zero, this is the increment in weight that contributes a single count to a histogram bin. This if WEIGHT is 0.1, and WGTS(10) is 0.232, the histogram bin containing the value of ARRAY(10) will be incremented by 2 (i.e. int(0.232/0.1). If WEIGHT is ZERO, then the WGTS array is ignored and every element of ARRAY is assigned a unit weight.
NUMBIN = INTEGER (Given)
Number of bins used in the histogram. For integer data types this should result in a bin width of at least one unit. So for example, byte data should never have more than 256 bins.
CUMUL = LOGICAL (Given)
Is a cumulative histogram required?
VALMAX = ? (Given and Returned)
Maximum data value included in the array. If this is supplied as VAL__BAD <T >, then the actual maximum value in the ARRAY is found and used, and returned on exit.
VALMIN = ? (Given and Returned)
Minimum data value included in the array. If this is supplied as VAL__BAD <T >, then the actual minimum value in the ARRAY is found and used, and returned on exit.
HIST( NUMBIN ) = INTEGER (Returned)
Array containing the histogram.
STATUS = INTEGER (Given and Returned)
Global status value.

Notes: