DS_FIND_2D_STATS(3)

EXPERIMENTAL_FUNC
ds_find_2D_stats - Compute simple statistics for a 2D array.

SYNOPSIS
#include <karma_ds.h>

flag ds_find_2D_stats

(CONST char *data, unsigned int length1, uaddr *offsets1, unsigned int length2, uaddr *offsets2, unsigned int elem_type, unsigned int conv_type, double *min, double *max, double *mean, double *stddev, double *sum, double *sumsq, unsigned long *npoints)

DESCRIPTION
This routine will find the minimum, maximum, mean, rms and sum of a single plane (element versus two dimensions).

data
    A pointer to the data.

length1
    The number of values to process along one of the dimensions. For efficiency this should be the more significant dimension.

offsets1
    The address offsets for data along the corresponding dimension.

length2
    The number of values to process along the other of the dimensions

offsets2
    The address offsets for data along the corresponding dimension.

elem_type
    The type of the element.

conv_type
    The type of conversion to use for complex numbers.

min The minimum value will be written here.

max The maximum value will be written here.

mean
    The mean value will be written here.

stddev
    The standard deviation will be written here.

sum The total of all values will be written here.

sumsq
    The total of the squares of all values will be written here.

npoints
    The number of values used to compute statistics will be written here. This will differ from num_values if there are blanked pixels.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Safe.

NOTE
The minimum and maximum value must be initialised to a very large positive number and a very large negative number, respectively, outside of the routine. In other words, the routine does not initialise these values prior to testing for the minimum and maximum.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/