- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine compresses an n-dimensional data array and its associated
variance array by integer factors along each dimension by summing the arrays’
values in a
rectangular box. The output data array may be normalised to take account of any bad values that
may be present.
Invocation
CALL KPG1_CMVDx( NDIM, DIMS, INARR, INVAR, COMPRS,
NLIM, NORMAL, OUTARR, OUTVAR, SUM, NUM, STATUS )
Arguments
NDIM = INTEGER
(Given)
The dimensionality of the n-dimensional arrays. It must be greater than one.
To handle one-dimensional arrays, give them a second dummy dimension of 1.
DIMS(
NDIM ) = INTEGER (Given)
The dimensions of the input n-dimensional arrays.
INARR(
) = ? (Given)
The input n-dimensional data array.
INVAR(
) = ?
(Given)
The input n-dimensional variance array.
COMPRS( NDIM ) = REAL (Given)
The factors
along each dimension by which the input array is compressed to form the output array.
NLIM =
INTEGER (Given)
The minimum number of good input elements in a compression box that permits
the corresponding output array element to be good. If fewer than NLIM pixels participated in the
sum, the output pixel will be bad.
NORMAL = LOGICAL (Given)
If .TRUE., the summation is
normalised to allow for bad data, i.e. the sum with each box is multiplied by the ratio of the total
number of pixels in the box to the actual number included to yield the output pixel value. If .FALSE.,
the output array element just equates to the sum of good pixels within each box.
OUTARR(
) = ? (Write)
The
compressed n-dimensional data array. Its dimension I must be given by DIMS( I )/COMPRS( I ).
OUTVAR(
) = ? (Write)
The compressed n-dimensional variance array. Its dimension I must be given by DIMS( I )/COMPRS( I ).
SUM( ) = ?
(Returned)
Workspace used for efficiency in computing the summations. This should have size at least equal
to DIMS( 1 )
2.
NUM(
) = INTEGER (Returned)
Workspace used to count the number of good
elements in the input box. This should have size at least equal to DIMS( 1 )
2.
STATUS = INTEGER (Given and Returned).
Global status value
Notes:
-
There is a routine for the following numeric data types: replace "
x"
in the routine name by D or R
as appropriate. The input and output arrays plus a work space must have the data type
specified.
-
There is no protection against overflows when the absolute data values are very large.
Bugs:
{note_bugs_here}
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑