MB-System Unix Manual Page
mbclean
Section: MB-System 5.0 (l)
Updated: 12 March 2001
Index
NAME
mbcleanold - Old tool to automatically flag bad beams in swath sonar bathymetry data.
VERSION
Version 5.0
SYNOPSIS
mbcleanold [-Amax -Blow/high -Cslope
-Dmin/max -Fformat
-Gfraction_low/fraction_high
-Iinfile -Llonflip -Nbuffersize -Ooutfile
-Mmode -Q -Unmin -Xzap_beams -V -H]
DESCRIPTION
mbcleanold identifies and flags artifacts in
swath sonar bathymetry data. This program replicates the
functionality of the mbclean program included
in MB-System version 4 distributions. The input swath data is read
into a buffer, processed, and then written directly into
an output swath data file. The current version of mbclean
generates an "edit save file" like that of mbedit rather
than directly outputting a swath file. See the mbclean
manual page for details.
Several algorithms are available for identifying artifacts; multiple
algorithms can be applied in a single pass.
The most commonly used approach is to identify artifacts
based on excessive bathymetric slopes.
If desired, mbcleanold will also flag beams
associated with "rails" where
outer beams have smaller acrosstrack distances
than more inner beams (-Q option).
Low and high bounds on acceptable depth values can be set; depth values
outside the acceptable range will be flagged. The acceptable depth
ranges can either be absolute (-B option), relative to
the local median depth (-A option) or defined by low
and high fractions of the local median depth (-G option).
A set number of outer beams can also be flagged.
The order in which the flagging algorithms are applied is
as follows:
1. Flag specified number of outer beams (-X option).
2. Flag soundings outside specified acceptable
depth range (-B option).
3. Flag soundings outside acceptable depth range using
fractions of local median depth (-G option).
4. Flag soundings outside acceptable depth range using
deviation from local median depth (-A option).
5. Flag soundings associated with excessive slopes
(-C option or default).
6. Zap "rails" (-Q option).
7. Flag all soundings in pings with too few
good soundings (-U option).
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
Alberto Malinverno
Schlumberger-Doll
OPTIONS
- -A
-
max
This option sets the range of acceptable depth values relative to
the local median depth. The median depth is obtained from the
current ping and the pings immediately before and after that
ping. If a depth value deviates from the median depth by more
than max, then it
will be flagged. No deviation from the median depth checking is
done if the -A option
is not used.
- -B
-
low/high
This option sets the range of acceptable depth values. If a depth
value is less than low or more than high then it
will be flagged. No depth range checking is done if the -B option
is not used.
- -C
-
slope
The value slope is the maximum acceptable slope. Beams associated
with excessive slopes will be flagged or removed according to the
operational mode specified using the -M option. This method will
be used if no other algorithms are specified; if other algorithms are
specified but -C is not used then no slope checking will occur.
Default: slope = 1.0
- -D
-
min/max
Sets the minimum and maximum allowed distances between beams used for
some of the flagging algorithms. Both values are expressed in terms
of fractions of the local median depth. Thus, -D0.01/0.25
will translate, if the local median depth is 1000 meters, to a minimum
distance of 10 meters and a maximum distance of 250 meters.
The min value sets the minimum distance
between beams required for an excessive slope to be used
to flag bad beams.
The navigation and heading of the ship are used to calculate the locations
of beams. Ship turns often cause beams of adjacent pings to overlap, causing
the distances between these beams to become quite small. This can, in turn,
magnify noise in the bathymetry data to produce slope estimates which
are excessively large. The max value sets the maximum distance
between the current beam and other beams for those beams to be used
in evaluating the current beam. For instance, only beams within the
maximum distance are used to calculate the local median depth, and only
beams within the maximum distance are used to check for excessive slopes.
Default: min/max = 0.01/0.25.
- -F
-
format
Sets the format for the input and output swath sonar data using
MBIO integer format identifiers.
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
-
fraction_low/fraction_high
This option sets the range of acceptable depth values relative to
low and high fractions of the local median depth.
The median depth is obtained from the
current ping and the pings immediately before and after that
ping. If a depth
value is less than fraction_low times the median depth
(e.g. fraction_low = 0.5 means one half the median
depth) or more than fraction_high times the median depth then it
will be flagged. No fractional depth range checking is
done if the -G option
is not used.
- -H
-
This "help" flag cause the program to print out a description
of its operation and then exit immediately.
- -I
-
infile
Data file from which the input data will be read. If
no input file is specified, the input will be read
from stdin. Default: infile = stdin.
- -L
-
lonflip
Sets the range of the longitude values used.
If lonflip=-1 then the longitude values will be in
the range from -360 to 0 degrees. If lonflip=0
then the longitude values will be in
the range from -180 to 180 degrees. If lonflip=1
then the longitude values will be in
the range from 0 to 360 degrees.
Default: lonflip = 0.
- -M
-
mode
Sets the manner in which bad beams identified by excessive slope
are handled.
mode = 1: Flags one beam associated with each outlier slope.
The flagged beam is the one furthest from the local
median depth.
mode = 2: Flags both beams associated with each outlier slope.
mode = 3: Zeros one beam associated with each outlier slope.
The zeroed beam is the one furthest from the local
median depth.
mode = 4: Zeros both beams associated with each outlier slope.
If the data format of the input file
prohibits storage of negative depths, an error message will be output
and the program will exit. Default: mode = 1.
- -N
-
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.
- -O
-
outfile
Data file to which the output data will be written. If
no output file is specified, the output will be written to
stdout. Default: outfile = stdout.
- -Q
-
This flag causes mbcleanold to search for bad "rails" in the
swath sonar swath; the "rails" refer to groups of outer beams which
have crosstrack distances (and depths) much less than they should
have. These are identified when one or more outer beams lies
inboard of a more inner beam; all beams outboard of the first
offending beam are flagged.
- -U
-
nmin
This flag causes mbcleanold to search for port or starboard
halves of pings which contain fewer than nmin good bathymetry
values. All bathymetry values in the affected half-pings are
flagged.
- -X
-
zap_beams
If this option is used, the outermost zap_beams at both ends
of the swath are flagged as bad; this is useful if the outer beams
are known to be unreliable. Default: zap_beams = 0.
- -V
-
Normally, mbcleanold works "silently" without outputting
anything to the stderr stream. If the
-V flag is given, then mbcleanold works in a "verbose" mode and
outputs the program version being used, all error status messages,
and the number of beams flagged as bad.
EXAMPLES
Suppose one wishes to do a first pass edit of
a raw SeaBeam 2112 file in
the vendor format (format 41). Use the following to flag any
beams which deviate by more than 1% from the local median
depth or which produce a slope greater than 3.5 (74 degrees):
mbcleanold -F41 -M1 -C3.5 -D0.01/0.20 -G0.99/1.01 -I sb199507130318.rec -O sb199507130318_c.mb41
The program will output some information because of the
-V option:
Program MBCLEAN
Version $Id: mbcleanold.l,v 5.1 2001/03/22 21:15:49 caress Exp $
MB-system Version 4.3
132 records loaded into buffer
f: 1995 9 2 04:50:44.413000 75 1243.50 1263.80
f: 1995 9 2 04:50:44.413000 76 1244.80 1263.80
f: 1995 9 2 04:50:44.413000 99 1244.20 1265.20
f: 1995 9 2 04:50:48.795000 14 1242.90 1257.30
......... (lines deleted) .........
s: 1995 9 2 04:59:25.189000 45 1784.00 1231.20 3.71 148.80
s: 1995 9 2 04:59:31.779000 46 1777.20 1230.90 3.63 149.80
s: 1995 9 2 04:59:31.779000 47 1530.50 1231.20 4.27 68.50
......... (lines deleted) .........
82 records dumped from buffer
0 records loaded into buffer
50 records dumped from buffer
179 bathymetry data records processed
0 outer beams zapped
0 beams out of acceptable depth range
96 beams out of acceptable fractional depth range
0 beams exceed acceptable deviation from median depth
0 bad rail beams identified
14 excessive slopes identified
110 beams flagged
0 beams zeroed
SEE ALSO
mbsystem(l), mbclean(l), mbunclean(l), mbedit(l),
mbinfo(l)
BUGS
The algorithms implemented in mbcleanold simply
don't detect all bathymetric artifacts that
are obvious to the eye on contour charts. Although
mbcleanold often does a credible first pass at
flagging obvious artifacts, we strongly recommend that
any swath bathymetry processing stream include
interactive editing of the
bathymetry data (e.g. mbedit).
Index
- NAME
-
- VERSION
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHORSHIP
-
- OPTIONS
-
- EXAMPLES
-
- SEE ALSO
-
- BUGS
-
Last Updated: 12 March 2001
Return to list of MB-System manual pages...
Back
to MB-System Home Page...