rejectJIM
Description
rejectJIM is a utility designed to identify and flag noisy or anomalous beams within OMG-HDCS merged files, primarily focusing on data between specified beam ranges. It applies a statistical filter based on standard deviation to detect outliers, and can also re-initialize beam statuses.
The tool aims to remove spurious soundings (often referred to as “Jim” noise, a common type of spurious noise) that appear in multibeam data, particularly in the inner swath.
Usage
rejectJIM <mergefile(s)> [-v] [-newstart] [-sdev <factor>]
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. | |
-newstart | Re-initializes the status of all beams to 0 (good) before applying the filter. | |
-sdev <factor> | Specifies the standard deviation multiplier to use for outlier detection. Beams whose detrended depth deviates by more than factor * standard_deviation from the mean will be flagged. | 1.96 (equivalent to ~95% confidence interval) |
How It Works
- File Processing: The tool iterates through each provided merged file.
- Summary Header Reading: Reads the summary header for basic file information.
- Profile and Beam Iteration: For each profile (ping) in the file:
- Beam Status Initialization (
-newstart): If-newstartis used, all beam statuses are reset to0(good) if they have a validobservedDepth. - Least Squares Fit: It defines two “windows” of beams (hardcoded to
15-25and40-45). It uses theacrossTrackandobservedDepthof valid beams within these windows to perform a least-squares linear regression. This fit estimates the average depth and across-track slope of the seafloor in these relatively “good” regions. - Detrending: It then “detrends” the observed depths of beams within a broader range (
finish_firsttostart_second) by subtracting the effect of the calculated slope. - Standard Deviation Calculation: The standard deviation (
sdev) of these detrended depths (relative to the intercept of the least-squares fit) is calculated, again using beams within the two “good” windows. - Outlier Detection: For beams in the “middle” region (hardcoded to
finish_firsttostart_second), it checks if their detrended depth deviates from the mean (intercept) by more thansdev_factor * sdev. - Flagging: If a beam is identified as an outlier, its
statusis set to22(a common flag for bad soundings in OMG tools).
- Beam Status Initialization (
- In-Place Update: If any beam’s status is modified, the updated raw beam records are written back to the merged file.
- Summary Report: After processing all profiles in a file, it reports the total number of beams filtered from that file.
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
“Jim” noise is a common artifact in multibeam sonar data, often characterized by spurious detections in the inner swath. This tool applies a statistical filter to detect and remove such outliers, improving the quality of the bathymetric data. The hardcoded beam ranges suggest this tool is optimized for specific sonar configurations or data characteristics. As the tool modifies files in-place, backups are recommended.