IARRAY_GET_DATA_SCALING(3)

FUNCTION
iarray_get_data_scaling - Get the scale and offset for data in an Intelligent Array.

SYNOPSIS
#include <karma_iarray.h>

flag iarray_get_data_scaling

(iarray array, double *scale, double *offset)

DESCRIPTION
This routine will determine the scale and offset for data in an Intelligent Array. This may be important when a floating-point array has been converted to an integer array to save space. Scaling information should be attached to the array so that the original data values may be reconstructed (aside from quantisation effects). The following expression may be used to convert scaled values to real values: (output = input * scale + offset). The scaling and offset values should previously have been attached to the Intelligent Array using the <-iarray_set_data_scaling-> routine.

array
    The array.

scale
    The scaling value will be written here. The name of the scaling value is constructed by appending "__SCALE" to the array value name (see <-iarray_value_name->). If no scaling value is found, 1.0 is written here. As a fallback, if the FITS-style "BSCALE" keyword is found and is appropriate, this is used.

offset
    The offset value will be written here. The name of the offset value is constructed by appending "__OFFSET" to the array value name (see <-iarray_value_name->). If no offset value is found, 0.0 is written here. As a fallback, if the FITS-style "BZERO" keyword is found and is appropriate, this is used.

RETURN VALUE
TRUE if either the scaling or offset value were found, else FALSE

Multi-threading Level
Unsafe.

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/