deHump
Description
deHump is a utility designed to apply empirical angular corrections to multibeam sonar data, specifically targeting the “hump” effect often observed in older EM1000 data from the Creed, believed to be caused by erroneous beam pointing angle correctors in the EPROM.
The tool can apply corrections using two methods: angshift (shifting the beam angle) or depscale (scaling the observed depth). It can process either standard OMG-HDCS merged files or USL-HDCS observed depth files.
Usage
deHump <mergefile(s)> [-v] (-angshift <value> | -depscale <value>) [-mode <value>] [-hdcs] [-symm]
Arguments
| Option | Description |
|---|---|
<mergefile(s)> | Required. One or more paths to OMG-HDCS merged files or USL-HDCS line directories. These files are modified in place. |
-v | Enable verbose output. |
Correction Methods (Choose one)
| Option | Description | |—|—| | -angshift <value> | Apply a constant angular shift (in degrees) to the beam angles. | | -depscale <value> | Apply a depth scaling factor to specific beam ranges. | 0.0105 |
Other Options
| Option | Description | |—|—| | -mode <value> | Only apply corrections to profiles (pings) with this specific mode value. | 999 (all modes) | | -hdcs | Process USL-HDCS observed depth files instead of OMG-HDCS merged files. | | -symm | (Present in USAGE but not implemented) Likely intended for symmetric application of corrections. | | -hackfn <filename> | (Present in USAGE but not implemented) Likely intended for an external hack function file. |
How It Works
- File Processing: The tool iterates through each provided merged file (or USL-HDCS directory).
- Summary Header Reading & File Type Handling: Reads the summary header and handles both OMG-HDCS and USL-HDCS file formats, mapping USL-HDCS data to OMG structures.
- Correction Parameter Setup:
-angshiftmethod: It calculatesangle_corrector[k]values for each beamk. These correctors are based onang_shiftand are non-zero only for the innermost and outermost beams, with a smooth transition to zero in between.-depscalemethod: It calculatesdep_shift[k]values for each beamk. These are non-zero (equal todep_scaleor a scaled version of it) for the innermost and outermost beams, and zero for central beams, following a pattern based on beam number.
- Profile and Beam Iteration: For each profile (ping) in the file:
- Mode Filtering: If
-modeis specified, it only processes pings whoseprofile.modematches themode_choice. - Reads the raw beams for the current profile (converting USL-HDCS beams to OMG format if
hdcs_flagis set). - For each beam
ithat has anobservedDepthandreflectivity:- Apply
angshift:- Calculates
orig_anglefromorig_depthandorig_range. - Adds
angle_corrector[i]toorig_angleto getreal_angle. - Recalculates
real_rangeandreal_depthfromreal_angleandslant_range. - Updates
beams[i].observedDepthandbeams[i].acrossTrackwith thesereal_depthandreal_rangevalues.
- Calculates
- Apply
depscale:- Subtracts
beams[i].observedDepth * dep_shift[i]frombeams[i].observedDepth.
- Subtracts
- Apply
- Mode Filtering: If
- In-Place Update: The modified
beams(with corrected depths and/or across-track values) are written back to the merged file (or USL-HDCS file) for the current profile.
Output Files
The input merged files are modified in-place.
Dependencies
OMG_HDCS_jversion.h: For OMG-HDCS data structures.support.h: For general utility functions and error handling.
Notes
This tool provides empirical corrections for specific sonar artifacts observed in older datasets. The corrections are heuristic and may need careful application. The tool modifies merged files in place, so backups are recommended. It handles both OMG-HDCS and legacy USL-HDCS file formats.