DS_FIND_1D_STATS(3)

EXPERIMENTAL_FUNC
ds_find_1D_stats - Compute simple statistics for a 1D array.

SYNOPSIS
#include <karma_ds.h>

flag ds_find_1D_stats

(CONST char *data, unsigned int num_values, uaddr *offsets, 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, sum and sum-of-squares of a single trace (element versus a dimension). Blanked values are excluded.

data
    A pointer to the data. Misaligned data will cause bus errors on some platforms.

num_values
    The number of values to process.

offsets
    The address offsets for data along the 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 may 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/