nadirdamp
Description
nadirdamp is a utility designed to dampen out low-frequency ridges that often appear in the nadir region of JCU GLORIA format sidescan files. It achieves this by applying a linear interpolation across a defined βwidthzoneβ around the nadir, effectively smoothing out anomalies in that area. This tool is typically applied to the .low component resulting from a destriping operation.
Usage
nadirdamp [-widthzone <pixels>] <infile_prefix>
Arguments
| Option | Description | Default |
|---|---|---|
-widthzone <pixels> | Specifies the number of pixels on either side of the nadir to be affected by the damping. The total zone width will be 2 * <pixels>. | 50 |
<infile_prefix> | Required. The prefix for the input GLORIA low-pass file. The tool assumes the input file has a .low extension. The output file will have a .low_damp extension. | Β |
How It Works
- Input Files: The tool takes a single JCU GLORIA low-pass file (e.g.,
<infile_prefix>.low) as input. - Determine Nadir Zone: The
widthzoneparameter defines the area around the nadir (center of theall_dataarray, typicallyGLORIA_SIDESIZE). For example, ifwidthzoneis 50, the zone affected will be fromGLORIA_SIDESIZE - 50toGLORIA_SIDESIZE + 50. - Read Reference Pixels: For each record, it reads the pixel values at the left and right boundaries of the
widthzone:left = out_rec.all_data[GLORIA_SIDESIZE - widthzone];right = out_rec.all_data[GLORIA_SIDESIZE + widthzone];
- Linear Interpolation: For each pixel (
j) within the nadirwidthzone:- It calculates a new pixel value by linearly interpolating between the
leftandrightreference pixel values. The formula used is:new_value = (left * (widthzone - j)) / (widthzone * 2.) + (right * (widthzone + j)) / (widthzone * 2.); - This effectively creates a smoothed gradient across the nadir zone, from the
leftvalue to therightvalue.
- It calculates a new pixel value by linearly interpolating between the
- Write Output: The modified record (
out_rec) is written to the output file (e.g.,<infile_prefix>.low_damp). - Loop: This process repeats for all records in the input file.