MB-System Unix Manual Page

mbanglecorrect

Section: MB-System 5.0 (l)
Updated: 9 August 2001
Index
 

NAME

mbanglecorrect - Apply a grazing angle correction to beam amplitude or sidescan data in swath sonar data.

 

VERSION

Version 5.0

 

SYNOPSIS

mbanglecorrect [-Akind/scale -Byr/mo/da/hr/mn/sc -C -Dmode/length -Eyr/mo/da/hr/mn/sc -Fformat -G -Iinfile -K -Lbuffersize -Mnsmooth -Nnangle/anglemax -Ooutfile -Rwest/east/south/north -Scorrectionfile -Zdepth -V -H]

 

DESCRIPTION

The program mbanglecorrect is used for processing sidescan data. This program corrects the sidescan data by dividing by a model of the backscatter vs grazing angle function to produce a flat image which shows geology better than the raw data (each value is also multiplied by a scale factor set with the -A option. The backscatter vs grazing angle model is either read from a file (global correction) or obtained by averaging over the input sidescan data in some number of nearby pings (local correction) using the same algorithm as the program mbbackangle. If local correction is used, the user specifies the angular width of the swath considered and the number of angular bins in that swath which are used in calculating the local correction. When the correction model is defined using the entire dataset the output data will predominantly show large scale variability in seafloor reflectivity. When the model used to correct the data is locally defined, the output data will tend to show an enhanced view of local or fine scale structure, although odd effects may occur at boundaries between different types of seafloor. No assumption is made about the nature of the data or the sonar used to collect it. If bathymetry data is available, then the acrosstrack seafloor slope is taken into account when calculating grazing angles, unless the -G option is used to force the assumption of a flat seafloor (this pertains only to the application of the grazing angle correction; seafloor slopes are always used, if available, in calculating local grazing angle correction functions). The bathymetry can be smoothed prior to the calculation of slopes, if desired. If bathymetry is not available, the seafloor is assumed to be flat with a depth specified by the -Z option. The use of bathymetric slopes in the grazing angle calculations will tend to remove bathymetric signals from the data. The default input and output streams are stdin and stdout.;

 

AUTHORSHIP

David W. Caress (caress@mbari.org)

  Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)

  Lamont-Doherty Earth Observatory

 

OPTIONS

-A
kind/scale
Determines whether beam amplitude (kind = 1) or sidescan (kind = 2) data will be processed. Also determines the scaling factor scale which is multiplied times the amplitude or sidescan value after it has been divided by the appropriate grazing angle correction. Since the correction is done by division, any pixel or beam value which is exactly the same as the correction function will end up with a value equal to scale. The value scale should be chosen so that the resulting values can be represented in the relevent data format (e.g. if sidescan values are represented by unsigned short integers so that possible values range from 0 to 65535, a choice of scale = 1000 works well). Default: kind = 2, scale = 1000.
-B
yr/mo/da/hr/mn/sc
This option sets the starting time for data allowed in the input data. The -E option sets the ending time for data. If the starting time is before the ending time, then any data with a time stamp before the starting time or after the ending time is ignored. If instead the starting time is after the ending time, then any data between the ending and starting time will be ignored. This scheme allows time windowing both inside and outside a specified interval. Default: yr/mo/da/hr/mn/sc = 1962/2/21/10/30/0.
-C
Normally, if mbanglecorrect generates the grazing angle correction locally, the correction is forced to be symmetric about the vertical (zero angle) axis. If -C is specified, the local amplitude vs grazing angle function will not be forced to be symmetric.
-D
mode/length
Sets the manner in which the local grazing angle correction is calculated. If mode = 1, then the local correction function will be calculated for the current ping using the length previous pings and the next length pings, thus using a total of 2*length + 1 pings for the grazing angle correction. Imode = 2, then the local correction will be calculated for the current ping using all pings which are within length km of the current ping along the shiptrack.
-E
yr/mo/da/hr/mn/sc
This option sets the ending time for data allowed in the input data. The -B option sets the starting time for data. If the starting time is before the ending time, then any data with a time stamp before the starting time or after the ending time is ignored. If instead the starting time is after the ending time, then any data between the ending and starting time will be ignored. This scheme allows time windowing both inside and outside a specified interval. Default: yr/mo/da/hr/mn/sc = 2062/2/21/10/30/0.
-F
format
Sets the data format used in reading the input from stdin or from a file. This program uses the MBIO library and will read or write any swath sonar format supported by MBIO. A list of the swath sonar data formats currently supported by MBIO and their identifier values is given in the MBIO manual page. Default: format = 11.
-G
This option forces the grazing angle correction to be made using a flat seafloor assumption, so that seafloor slopes are ignored even if bathymetry is available.
-H
This "help" flag causes the program to print out a description of its operation and then exit immediately.
-I
infile
Sets the input swath sonar data filename. This program uses the MBIO library and will read or write any swath sonar format supported by MBIO. A list of the swath sonar data formats currently supported by MBIO and their identifier values is given in the MBIO manual page. Default: infile = "stdin".
-K
This option causes the correction to be made by subtracting the modeled value from the observed and then adding the scale value defined with the -A option. The "subtraction" mode of correction is appropriate for log scaled data (e.g. amplitude or backscatter values reported in dB).
-L
buffersize
Sets the maximum number of data records which can be read into the buffer. In general, data records may be of several different types (e.g. parameter, position, comment) in addition to survey data records. Many data formats include many more position data records than survey data records. Thus, a large buffer may be required to access a reasonable number of survey data records. However, on memory limited machines large buffer sizes can lead to poor performance due to memory swapping. The default value of buffersize = 500 is appropriate for most cases, but users can set the buffer size as required. The absolute maximum buffer size is 5000. Default: buffersize = 500.
-M
nsmooth
Causes the bathymetry to be smoothed prior to the calculation of seafloor slopes. An acrosstrack boxcar mean filter is applied extending nsmooth beams to either side of each beam (2 * nsmooth + 1).
-N
nangle/angle
The amplitude vs grazing angle table is calculated by binning the amplitude values according to their grazing angles and averaging the amplitudes within each bin. This option sets the number of grazing angle bins (nangle) and the maximum angle considered (angle). The grazing angle function will be defined at nangle points spaced equally from -angle to +angle. The nangle value should be an odd integer so that the middle bin is centered on the angle 0.0. Default: nangle = 161, angle = 80.0.
-O
outfile
Data file to which the output data will be written. The MBIO format id used is the same as for the input data. If no output file is specified, the output will be written to stdout. Default: outfile = stdout.
-R
west/east/south/north
Sets the longitude and latitude bounds within which swath sonar data will be read. Only the data which lies within these bounds will be copied. Default: west=-360, east=360, south=-90, north=90.
-S
correctionfile
Data file from which a global grazing angle correction function is read. If the -S option is not used, then local corrections will be calculated using the parameters specified with the -D and -N options.
-V
Normally, mbanglecorrect works "silently" without outputting anything to the stderr stream. If the -V flag is given, then mbanglecorrect works in a "verbose" mode and outputs the program version being used, the values of some important control parameters, and all error status messages.
-Z
depth
This option specifies a default depth value in meters to be used whenever bathymetry values are unavailable. A flat seafloor (zero slope) will be assumed wherever the default depth needs to be used (e.g. data files with sidescan but no bathymetry, or the outer parts of swaths where the sidescan may extend further than the bathymetry). If this option is not used, no corrected amplitude or sidescan values will be output where bathymetry is unavailable.

 

EXAMPLES

Suppose one has a SeaBeam 2100 data file called test.mb41 which contains bathymetry (121 beams in a 120 degree swath), beam amplitude (121 beams coincident with bathymetry), and sidescan data (2000 pixels, roughly a 150 degree swath). Plots of the raw sidescan are dominated by the high amplitude specular region in the center of the swath and the gradual fall-off of amplitudes in the outer swath. In order to obtain a global correction function which can be used by mbanglecorrect to "flatten out" the sidescan values so that seafloor features are more evident, the user can run mbbackangle as follows:
        mbbackangle -F41 -Itest.mb41 -A2 -N161/80 > gaf.dat

Given the correction file, mbanglecorrect can now be used to apply the correction uniformly to the data:
        mbanglecorrect -F41 -Itest.mb41 -Otest_corr.mb41 \ 

                -A2/1000 -Sgaf.dat

Here the scale of 1000 applied with the -A option implies that "normal" pixels (having values originally equal to the correction function at their grazing angle) will end up with values of 1000. In order to calculate the grazing angle correction locally, the following will work:
        mbanglecorrect -F41 -Itest.mb41 -Otest_corr.mb41 \ 

                -A2/1000 -D2/1 -N161/80

Here the local grazing angle correction for each ping will be calculated using all pings within 1 km of that ping along the shiptrack, as specified using the -D option. The calculation of the grazing angle correction function itself will involve binning and averaging the sidescan values in 161 1-degree-wide angular bins extending from -80 to +80 degrees, as specified using the -N option

 

SEE ALSO

mbsystem(l), mbbackangle(l), mbfilter(l)

 

BUGS

None that are particularly memorable.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
AUTHORSHIP
OPTIONS
EXAMPLES
SEE ALSO
BUGS


Last Updated: 9 August 2001


Return to list of MB-System manual pages...

Back to MB-System Home Page...