KPG1_XYZWx

Converts a two-dimensional array into a list of x-y co-ordinates, values and weights

Description:

This routine converts a two-dimensional array into a list of x-y co-ordinates, data values and weights for each of the good pixels in the array. The x-y co-ordinates come from the axis arrays supplied. Bad pixels are ignored if BAD is .TRUE.. If VARWTS is .TRUE., weights are calculated from the reciprocal of the variance for each pixel, otherwise the weights are returned 1.0.

Invocation

CALL KPG1_XYZWx( DIM1, DIM2, ARRAY, XAXIS, YAXIS, BAD, VARWTS, VAR, SIZE, X, Y, Z, W, NGOOD, XMIN, XMAX, YMIN, YMAX, STATUS )

Arguments

DIM1 = INTEGER (Given)
The first dimension of the two-dimensional array.
DIM2 = INTEGER (Given)
The second dimension of the two-dimensional array.
ARRAY( DIM1, DIM2 ) = ? (Given)
The input data array.
XAXIS( DIM1 ) = DOUBLE PRECISION (Given)
X axis co-ordinates for the input data array.
YAXIS( DIM2 ) = DOUBLE PRECISION (Given)
Y axis co-ordinates for the input data array.
BAD = LOGICAL (Given)
Flag indicating whether bad values are likely to be present.
VARWTS = LOGICAL (Given)
Flag indicating if the variance array contains valid data.
VAR( DIM1, DIM2 ) = ? (Given)
An optional array containing the variance of the values in the input data array, used to generate a weight for each element. It is only used if VARWTS is .TRUE..
SIZE = INTEGER (Given)
The total number of pixels.
X( SIZE ) = DOUBLE PRECISION (Returned)
The mean x positions for each pixel
Y( SIZE ) = DOUBLE PRECISION (Returned)
The mean y positions for each pixel.
Z( SIZE ) = DOUBLE PRECISION (Returned)
The data value for each pixel.
W( SIZE ) = DOUBLE PRECISION (Returned)
The weight for each pixel.
NGOOD = INTEGER (Returned)
The number of good pixels.
XMIN = DOUBLE PRECISION (Returned)
Minimum x co-ordinate.
XMAX = DOUBLE PRECISION (Returned)
Maximum x co-ordinate.
YMIN = DOUBLE PRECISION (Returned)
Minimum y co-ordinate.
YMAX = DOUBLE PRECISION (Returned)
Maximum y co-ordinate.
STATUS = INTEGER (Given and Returned)
Global status value.

Notes: