IARRAY_SCALE_AND_OFFSET(3)

FUNCTION
iarray_scale_and_offset - Scale and offset an Intelligent Array.

SYNOPSIS
#include <karma_iarray.h>

flag iarray_scale_and_offset

(iarray out, iarray inp, double scale[2], double offset[2], flag magnitude)

DESCRIPTION
This routine will perform a scale and offset on every element in an "Intelligent Array" (output = input * scale + offset).

out The output Intelligent Array.

inp The input Intelligent Array.

scale
    The complex scale value.

offset
    The complex offset value.

magnitude
    If TRUE and converting from a complex to a real array, the magnitude of the complex data (after scale and offset have been applied) is used, else the real component of the complex scaled data is used.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

NOTES
The input and output arrays MUST be the same size (though not necessarily the same type).

When converting from a real to a complex array, the imaginary component of the output array is set to 0. A complex scale or offset value will not result in a complex output if the input is real.

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/