multiMode2Calib

Description

multiMode2Calib is a specialized utility designed to combine multiple beam pattern files (generated by newGetBP) and output them in a format suitable for KMALL multibeam sonar calibration (specifically targeting EM712 70-100kHz modes). It allows for the integration of beam patterns from different acquisition modes or configurations into a single, comprehensive calibration file.

The tool can also apply a “sawtooth” correction to the beam patterns and offers options to flip the sign of the backscatter values and apply a reference dB level.

Usage

multiMode2Calib -allbps <input_MS_BP_scii_file(s)> -out <output_sis5_calib_file> [OPTIONS]

Arguments

Option Description  
-allbps <input_MS_BP_scii_file(s)> Required. One or more input multi-sector beam pattern files generated by newGetBP.  
-out <output_sis5_calib_file> Required. The path for the output KMALL calibration file.  
-v Enable verbose output.  
-Ref_dB_level <value> Apply a reference dB level to the backscatter values. 0.0
-flip_sign Flip the sign of the backscatter values (e.g., convert positive to negative dB).  
-addSawTooth <sector> <degstep> <stepsize> Add a sawtooth-shaped correction to a specific sector’s beam pattern. <sector> is the sector ID, <degstep> is the degree step for the sawtooth, and <stepsize> is the amplitude of the sawtooth.  

How It Works

  1. Input Reading: Reads one or more multi-sector beam pattern files (.MS.beampatterns from newGetBP) using load_MS_bp (from j_generic_beam_pattern.h). These files contain beam patterns and associated TX sector parameters (center frequency, pulse length, bandwidth, mode, etc.).
  2. Combination: It combines all the loaded beam patterns and their corresponding TX sector parameters into a single internal structure, merging data from multiple input files.
  3. Sawtooth Correction (Optional): If -addSawTooth is specified, it applies a periodic, sawtooth-shaped correction to the backscatter values of a designated sector.
  4. KMALL Calibration File Generation:
    • The tool then iterates through a predefined set of KMALL modes (Very Shallow, Shallow, Medium, Deep, Very Deep, Extra Deep), including single and dual swath configurations (e.g., EM712 70-100kHz modes).
    • For each KMALL mode/swath/sector combination, it attempts to find a matching beam pattern from its combined internal data based on a combination of waveform ID, center frequency, signal length, bandwidth, and a mode ID (a unique identifier saved by newGetBP).
    • If a match is found, it extracts the relevant portion of the beam pattern, potentially applying the -flip_sign and -Ref_dB_level options.
    • These processed beam pattern values (angle and offset in dB) are then written to the output KMALL calibration file in the specified ASCII format.
    • If no matching beam pattern is found for a particular KMALL mode/swath/sector, it writes out zero values.
  5. Output: The generated KMALL calibration file is an ASCII file containing calibration tables for various sonar operating modes.

Output Files

  • <output_sis5_calib_file>: An ASCII file containing KMALL calibration tables.

Dependencies

  • j_generic_beam_pattern.h: For multi-sector beam pattern structures and functions (load_MS_bp).
  • support.h: For general utility functions and error handling.

Notes

This tool is crucial for preparing custom beam patterns for use in KMALL sonars, allowing for fine-tuning of backscatter calibration based on empirical data rather than manufacturer defaults. The ability to combine multiple beam patterns (e.g., from different water depths or seafloor types) provides flexibility in generating a robust calibration. The sawtooth correction is a specific empirical adjustment for certain sonar characteristics.