IARRAY_SET_DATA_SCALING(3)

EXPERIMENTAL_FUNC
iarray_set_data_scaling - Set the scale and offset for data in an Intelligent Array.

SYNOPSIS
#include <karma_iarray.h>

flag iarray_set_data_scaling

(iarray array, double scale, double offset)

DESCRIPTION
This routine will set 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. The scaling information will 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).

array
    The array.

scale
    The scaling value. The name of the scaling value is constructed by appending "__SCALE" to the array value name (see <-iarray_value_name->) If appropriate, the FITS-style "BSCALE" keyword is written instead.

offset
    The offset value. The name of the offset value is constructed by appending "__OFFSET" to the array value name(see <-iarray_value_name->) If appropriate, the FITS-style "BZERO" keyword is written instead.

RETURN VALUE
TRUE if the scaling information is different from what was already attached to the array, 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/