layout: default title: autorejectSoundings parent: OMG Tools nav_order: 79 —
autorejectSoundings
Description
autorejectSoundings is a utility for automatically flagging (rejecting) anomalous multibeam soundings within OMG-HDCS merged files. It applies rejection criteria based on across-track and along-track slope discontinuities, as well as the isolation of individual soundings. The tool is designed to work in a batch mode, applying criteria previously identified as effective using interactive tools like SwathEditor.
This tool aims to automate the removal of spikes and other noise artifacts from bathymetric data.
Usage
autorejectSoundings <mergefile(s)> [-v] [-isolated] [-criteria <filename>]
Arguments
| Option | Description | |—|—| | <mergefile(s)> | Required. One or more paths to OMG-HDCS merged files to be processed. These files are modified in place. | | -v | Enable verbose output. | | -isolated | Flags soundings that are isolated in space (i.e., surrounded by flagged or missing beams). | | -criteria <filename> | Specifies a file containing the numerical criteria for slope-based rejection. The file should contain: * interping_distance (double) * ACROSS_twoslopelimit (double) * ALONG_twoslopelimit (double) |
How It Works
- File Processing: The tool iterates through each provided merged file.
- Criteria Loading (
-criteria): If a criteria file is specified, it readsinterping_distance,ACROSS_twoslopelimit, andALONG_twoslopelimitfrom it. These values define the thresholds for detecting spikes. - Profile Iteration: For each profile (
kfrom 1 tosummary.numProfiles - 2, to allow for before and after pings):- Reads the current profile’s beams (
beams), the previous profile’s beams (before_beams), and the next profile’s beams (after_beams). - Slope-Based Rejection (
-criteria):- Across-Track Slopes: For each beam
i, it calculates the slope betweenbeams[i-1]andbeams[i], and betweenbeams[i]andbeams[i+1]. If both these slopes exceedACROSS_twoslopelimit(and are of opposite sign for detecting spikes),beams[i].statusis set to22. - Along-Track Slopes: Similarly, for each beam
i, it calculates the slope betweenbefore_beams[i]andbeams[i], and betweenbeams[i]andafter_beams[i]. If both these slopes exceedALONG_twoslopelimit(and are of the same sign for detecting spikes),beams[i].statusis set to22.
- Across-Track Slopes: For each beam
- Isolated Beam Rejection (
-isolated):- Checks for isolation in the across-track direction (i.e., if a beam has valid depth but its neighbors are flagged or missing).
- Checks for isolation in the along-track direction (i.e., if a beam has valid depth but its corresponding neighbors in the previous and next pings are flagged or missing).
- If a beam is deemed isolated, its
statusis set to22.
- Reads the current profile’s beams (
- In-Place Update: The modified
beams(with updatedstatusflags) are written back to the merged file for the current profile. - Beam Buffer Update: Before processing the next profile, the
beamsfrom the current ping are copied tobefore_beams, andafter_beamsare copied tobeams, to maintain the sliding window of three pings.
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 is intended for batch processing after initial tuning of rejection criteria using interactive tools. It helps to automatically remove common noise artifacts, improving the overall quality of bathymetric datasets. The specific status flag 22 is typically used to mark automatically rejected soundings.
How It Works
- File Processing: The tool iterates through each provided merged file.
- Criteria Loading (
-criteria): If a criteria file is specified, it readsinterping_distance,ACROSS_twoslopelimit, andALONG_twoslopelimitfrom it. These values define the thresholds for detecting spikes. - Profile Iteration: For each profile (
kfrom 1 tosummary.numProfiles - 2, to allow for before and after pings):- Reads the current profile’s beams (
beams), the previous profile’s beams (before_beams), and the next profile’s beams (after_beams). - Slope-Based Rejection (
-criteria):- Across-Track Slopes: For each beam
i, it calculates the slope betweenbeams[i-1]andbeams[i], and betweenbeams[i]andbeams[i+1]. If both these slopes exceedACROSS_twoslopelimit(and are of opposite sign for detecting spikes),beams[i].statusis set to22. - Along-Track Slopes: Similarly, for each beam
i, it calculates the slope betweenbefore_beams[i]andbeams[i], and betweenbeams[i]andafter_beams[i]. If both these slopes exceedALONG_twoslopelimit(and are of the same sign for detecting spikes),beams[i].statusis set to22.
- Across-Track Slopes: For each beam
- Isolated Beam Rejection (
-isolated):- Checks for isolation in the across-track direction (i.e., if a beam has valid depth but its neighbors are flagged or missing).
- Checks for isolation in the along-track direction (i.e., if a beam has valid depth but its corresponding neighbors in the previous and next pings are flagged or missing).
- If a beam is deemed isolated, its
statusis set to22.
- Reads the current profile’s beams (
- In-Place Update: The modified
beams(with updatedstatusflags) are written back to the merged file for the current profile. - Beam Buffer Update: Before processing the next profile, the
beamsfrom the current ping are copied tobefore_beams, andafter_beamsare copied tobeams, to maintain the sliding window of three pings.