Gamma LAT: Reference Manual


lin_comb

ANSI-C program: lin_comb.c

NAME
lin_comb - Calculation of linear function of input data values (float).

SYNOPSIS
lin_comb <nfiles> <f1> <f2> ... <factor0> <factor1> <factor2> ... <f_out> <width> [start] [nlines] [pixav_x] [pixav_y] [zero_flag]

<nfiles> number of input data files
<f1> 1. input data file (float)
<f2> 2. input data file (float)
... further input files (float)
<factor0> factor0: constant term
<factor1> factor1 to multiply with f1
<factor2> factor2 to multiply with f2
... factors for further input files
<f_out> output file (float)
<width> number of samples/row
[start] starting line (default=1)
[nlines] number of lines to display (default: 0=to end of file)
[pixav_x] number of pixels to average in range (default=1)
[pixav_y] number of pixels to average in azimuth (default=1)
[zero_flag] NULL value interpretation flag
(default: 0 => 0.0 interpreted as missing value
1 => 0.0 interpreted as valid image value)

EXAMPLE
lin_comb 3 1825_1868.cc 1868_1911.cc 1911_1954.cc 0.0 2.0 1.0 2.0 cc_out.ras 2500 1 0 3 3 0

Generates a file of float based on the 3 input data files using the linear function:
output = 0.0 + 2.0 * (first file) + 1.0 * (second file) + 2.0 * (third file).
Multilooking in range and azimuth (3 looks in each direction) is performed.
0.0 in the input data files is interpreted as missing value; for pixels with missing values 0.0 is written to the output file.

INSTALLATION
Source code lin_comb.c in ./src. For compilation adjust and use Makefile: Executable version lin_comb in ../bin

AVAILABILITY
Uses ISP type definition file typedef_ISP.h.

DESCRIPTION
lin_comb allows to generate an image defined by a linear function of a number of input files of type float.

Values 0.0 of the input data files may either be interpreted as NULL values (zero_flag=0) or as valid data. In the case of an interpretation as NULL values 0.0 is written to the output file as soon as at least one of the input data files has NULL value for a pixel.

The calulation of a linear function may be of interest to reduce image noise by averaging multiple input files of the same type which are statistically independent, or to apply retrieval algortihms based on available data files using linear functions.

OPTIONS
Multilooking in range and/or azimuth may be applied.

An image sub-section may be selected.

SEE ALSO
typedef_ISP.h".

DIAGNOSTICS
All messages are generally self-explanatory.

NOTES
To calculate non-linear funtions of a number of input data files the porgram lin_comb may be copied, modified to calculate the specific function, compiled, and used.


© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 1997.
UW, CW, last change 6-Jan-1997.