DS_FIND_SINGLE_HISTOGRAM(3)

FUNCTION
ds_find_single_histogram - Find the histogram of a 1D array.

SYNOPSIS
#include <karma_ds.h>

flag ds_find_single_histogram

(CONST char *data, unsigned int elem_type, unsigned int conv_type, unsigned int num_values, CONST uaddr *offsets, unsigned int stride, double min, double max, unsigned long num_bins, unsigned long *histogram_array, unsigned long *histogram_peak, unsigned long *histogram_mode)

DESCRIPTION
This routine will find the histogram of a single trace (element versus a dimension). This routine may be called repeatedly with multiple traces in order to build an aggregate histogram of all traces.

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

elem_type
    The type of the element.

conv_type
    The type of conversion to use for complex numbers. Legal value for this include: CONV_CtoR_REAL CONV_CtoR_IMAG CONV_CtoR_ABS CONV_CtoR_SQUARE_ABS CONV_CtoR_PHASE CONV_CtoR_CONT_PHASE

num_values
    The length of the dimension.

offsets
    The address offsets for data along the dimension.

stride
    If the value of offsets is NULL, this gives the stride (in bytes) between consecutive values along the dimension.

min Data values below this will be ignored.

max Data values above this will be ignored.

num_bins
    The number of histogram bins.

histogram_array
    The histogram array. The values in this array are updated and hence must be initialised externally.

histogram_peak
    The peak of the histogram is written here. This value is updated, and hence must be externally initialised to 0.

histogram_mode
    The mode of the histogram (index value of the peak) will be written here. This value is updated, and hence must be externally initialised to 0.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Safe.

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/