Gamma LAT: Reference Manual


linear_to_dB

ANSI-C program: linear_to_dB.c

NAME
linear_to_dB - Convert image from linear scale to dB and vise versa.

SYNOPSIS
linear_to_dB <pwr_in> <pwr_out> <width> [inverse_flag] [null_value]

<pwr_in> input image (format: floating point)
<pwr_out> output image (format: floating point)
<width> number of samples/line
[inverse_flag] flag indicating direction of conversion (default=0)
(default: 0=converts linear scale (input) to dB scale (output)
1=converts dB values (input) to linear scale (output))
[null_value] null value appointed to values <=0 in linear scale, (default=0.0)

EXAMPLE
linear_to_dB 1352_1610.pwr1 1352_1610.pwr1_dB 2500 0 -999.0

Converts the input backscatter intensity file to dB scale. A value of -999.0 in the output file is appointed to values <= 0.0 of the input file.

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

AVAILABILITY
Uses ISP type definition file typedef_ISP.h.

DESCRIPTION
linear_to_dB converts the real valued input data file of type float to dB scale and vice versa.

The forward transformation linear scale (value) to dB scale (value_in_dB) is defined by

value > 0.0: value_in_dB = 10.0*log10(value)
value <= 0.0: value_in_dB = NULL value
The inverse transformation dB scale (value_in_dB) to linear scale (value) is defined by
value_in_dB != NULL value: value = 10.0^(value_in_dB/10.0)
value_in_dB = NULL value: value = 0.0

OPTIONS
Forward or backward transformation may be selected.

SEE ALSO
typedef_ISP.h.

DIAGNOSTICS
All messages are generally self-explanatory.

NOTES
None.


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