cdfdb −− convert from linear to decibel measure or vice versa
cdfdb −[ld] field_name scale
Cdfdb reads a common data format file from the standard input and writes a modified version to the standard output. The modification consists of converting values of the specified variable field from linear to decibel measure or vice versa. In particular, if the d flag is specified, field values V are modified by the formula V = 10*[log10(V) + scale], whereas if the l flag is specified, the transformation V = pow[10,V/10 − scale] is made. If a field element exceeds the bad data limit, no transformation is done, and the element consequentially remains bad. The scale factor is included as a convenience so that the results of transforming otherwise good data can be kept from exceeding established bad data limits.
If the linear−to−decibel transformation is attempted on zero or negative data, a math error would result. Cdfdb takes the absolute value of initial data in this case and sets elements that are less than 1.e−30 in magnitude to this value. This prevents a math package error, but misrepresents the data.