MB-System Unix Manual Page: mbinfo

### MB-System Unix Manual Page

#

##

##

##

##

##

##

##

##

##

##

    mbinfo
    Section:  MB-System 5.0  (1)
    Updated:  3 June 2013
    Index

    NAME

    mbinfo - Output some basic statistics of swath sonar data files.

    VERSION

    Version 5.0

    SYNOPSIS

    mbinfo [-Byr/mo/da/hr/mn/sc -C -Eyr/mo/da/hr/mn/sc
    -Fformat -G -Ifilename
    -Llonflip -Mlondim/latdim
    -N -O -Pping
    -Rwest/east/south/north -Sspeed -W
    -Xoutputformat -V -H]

    DESCRIPTION

    MBinfo is a utility for reading a swath sonar data file
    or files and outputting some basic statistics.  The table generated
    shows the filename, the data format id, a brief description of
    the format, any metadata that have been inserted into the data,
    data counts, navigation totals, time and navigation
    of the first and last data records, minimum and maximum
    data values, and the geographic bounding box of the data.
    The data counts include the total number of bathymetry,
    amplitude, and sidescan values read. These totals may be less
    than the maximum possible (number of data records times the
    maximum number of data supported for the particular data format)
    for formats supporting variable numbers of beams or pixels.
    Also reported are the numbers and percentages of good, zero,
    and flagged data values (good values are those which are neither
    zero nor flagged as bad).

    An important function  of mbinfo is to generate ".inf"
    files that may be parsed by other MB-System programs
    and macros. Programs such as mbgrid and mbmosaic,
    read ".inf" files, when available, to
    determine whether input swath data files actually contain
    any data in the area of interest. The efficiency of these
    programs is enhanced by their ability to avoid reading files
    with no data in the area to be gridded or mosaiced. Programs
    such as mbm_plot and mbm_grid run mbinfo on
    input files to determine the data bounds. The availability
    of ".inf" files allows this information to be determined without
    having to read through each swath file.To create an ".inf" file, simply direct the
    output of mbinfo to a file named by adding the
    suffix ".inf" to the input swath
    data filename. This can also be accomplished using the -O
    option of mbinfo, or the -N and -O options of
    mbdatalist.

    Data archives use metadata harvesting tools that often work better with
    information structured for machine parsing rather than for easy
    reading by humans. To output a variant of "*.inf" files in the JSON
    format (with "_inf.json" suffixes), use the -X1 option.
    Similarly, specifying the -X2 option will result in XML
    output in files with "_xml.inf" suffixes.

    The program mbprocess can insert metadata recognized
    and printed by mbinfo. These metadata include items
    such as the sonar model, the vessel name, and bias parameters.
    See the mbprocess and
    mbset manual pages for details.

    The data input may be averaged over several pings
    and/or windowed in time and space.  Comments in the data
    stream may also be printed out.
    The results are dumped to stdout.

    If pings are averaged (pings > 2)
    mbinfo estimates the variance for each of the bathymetry beams
    and sidescan pixels
    by reading a set number of pings and then finding the
    variance of the values for each beam.  The bathymetry values are
    detrended before variances are calculated.

    The program output can also be extended to include a coarse
    mask representing where data lies within the file's bounding
    box. This mask is shown as a table of 0's and 1's, where
    the 1's indicate bins with data. The dimensions of the mask
    are specified with the -Mlondim/latdim option.
    For instance, if the user specifies -M10/10, then
    mbinfo will read through the data once to establish the
    usual statistics, including the data bounding box. Then, the
    program will initialize a 10 X 10 grid with the minimum and
    maximum longitude and latitude of the bounding box, and
    read the data a second time. Each bin in which a sounding or
    pixel falls will be set to 1. After the second reading pass,
    the data location mask will be output at the end of the
    mbinfo output.

    AUTHORSHIP

    David W. Caress (caress@mbari.org)

      Monterey Bay Aquarium Research Institute

    Dale N. Chayes (dale@ldeo.columbia.edu)

      Lamont-Doherty Earth Observatory

    OPTIONS

    -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, mbinfo ignores comments encountered in the
    data file.  If the -C flag is given, all of the comments will be
    printed out.
    -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 if the input is read from stdin
    or from a file. If format < 0, then the input file specified
    with the -I option will actually contain a list of input swath sonar
    data files. 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. The default format is
    set using mbdefaults.
    -G

    Enables checking for reasonable navigation to be used in
    calculating the minimum and maximum longitude and latitude values.
    This mode excludes longitude and latitude values of 0.0 or
    those values associated with very large apparent speeds
    between pings (calculated using distance and time differences
    between adjacent pings). This option is particularly useful
    when one is trying to obtain reasonable bounds for a plot.
    -H

    This "help" flag cause the program to print out a description
    of its operation and then exit immediately.
    -I

    filename

    Sets the input filename. If format > 0 (set with the
    -f option) then the swath sonar data contained in infile
    is read and processed. If format < 0, then infile
    is assumed to be an ascii file containing a list of the input swath sonar
    data files to be processed and their formats.  The program will read
    the data in each one of these files.
    In the infile file, each
    data file should be followed by a data format identifier, e.g.:

            datafile1 11

            datafile2 24

    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".
    -L

    lonflip

    Sets the range of the longitude values returned.
    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: mbinfo selects the bext longitude range based
    on the first data.
    -M

    londim/latdim

    The program output can be extended to include a coarse
    mask representing where data lies within the file's bounding
    box. This mask is shown as a table of 0's and 1's, where
    the 1's indicate bins with data. The dimensions of the mask
    are specified with the -Mlondim/latdim option.
    -N

    Extends the program output to include notices. These notices
    include three sections. The first is a list of all of the
    data record types (e.g. survey, comment, navigation, parameter)
    encountered while reading the file. Some formats are quite simple
    and only include survey records and comments. Other formats
    are complex and may contain many different sorts of data
    records, including some that only derive from a particular
    sonar model. The second section lists any nonfatal error messages
    (e.g. unintelligible record) generated while reading the
    file. Finally, the third section of notices lists any
    particular problems with the data that have been identified
    (e.g. some navigation is zero or some depths are too large
    to be correct).
    -O

    This option causes the program output to be directed to
    "inf" files rather than to stdout. Each "inf" file is named
    using the original data file path with an ".inf" suffix appended.
    -P

    pings

    Turns on variance calculations for the bathymetry, amplitude,
    and sidescan data (as available in the data stream).  If
    pings = 1, then no variance calculations are made.  If
    pings > 1, then variances are calculated for each beam
    and pixel using groups of pings values.  The bathymetry
    values are detrended before the variances are calculated;
    the amplitude and sidescan values are not detrended.  The
    variance calculations can provide crude measures of noise
    and/or signal as a function of beam and pixel number.
    Default: pings = 1 (no variance calculations).
    -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 read.
    Default: west=-360, east=360, south=-90, north=90.
    -S

    speed

    Sets the minimum speed in km/hr (5.5 kts ~ 10 km/hr) allowed in
    the input data; pings associated with a smaller ship speed will not be
    copied. Default: speed = 0.
    -T

    timegap

    Sets the maximum time gap in minutes between adjacent pings allowed before
    the data is considered to have a gap. Default: timegap = 1.
    -V

    Normally, mbinfo only prints out the statistics obtained
    by reading all of the data.  If the
    -V flag is given, then mbinfo works in a "verbose" mode and
    outputs the program version being used and all read error status messages.
    -W

    Normally, mbinfo reports depth values in meters. If the
    -W flag is given, then mbinfo reports these values
    in feet.
    -X

    outputformat

    Normally, mbinfo reports information as text formatted for easy
    reading. If this option is given with outputformat=1, then the
    output will be in the JSON format. If the -O option is used to
    explicitly make "*.inf" files, then the output will be JSON and the output
    filenames will be named using the original data file path with an "_inf.json"
    suffix appended. If this option is given with outputformat=2, then the
    output will be in the XML format. If the -O option is used to
    explicitly make "*.inf" files, then the output will be XML and the output
    filenames will be named using the original data file path with an "_inf.xml"
    suffix appended.

    EXAMPLES

    Suppose one wishes to know something about the contents of
    a Hydrosweep file (format 24) called example_hs.mb24.
    The following will suffice:

            mbinfo -F24 -Iexample_hs.mb24

    The following output is produced:

     Swath Data File:      example_hs.mb24

     MBIO Data Format ID:  24

     Format name:          MBF_HSLDEOIH

     Informal Description: L-DEO in-house binary Hydrosweep

     Attributes:           Hydrosweep DS, 59 beams, bathymetry and amplitude,

                           binary, centered, L-DEO.

     Data Totals:

     Number of Records:              263

     Bathymetry Data (59 beams):

       Number of Beams:            15517

       Number of Good Beams:       13661     88.04%

       Number of Zero Beams:         868      5.59%

       Number of Flagged Beams:      988      6.37%

     Amplitude Data (59 beams):

       Number of Beams:            15517

       Number of Good Beams:       13661     88.04%

       Number of Zero Beams:         868      5.59%

       Number of Flagged Beams:      988      6.37%

     Sidescan Data (0 pixels):

       Number of Pixels:               0

       Number of Good Pixels:          0      0.00%

       Number of Zero Pixels:          0      0.00%

       Number of Flagged Pixels:       0      0.00%

     Navigation Totals:

     Total Time:             1.2425 hours

     Total Track Length:    20.9421 km

     Average Speed:         16.8548 km/hr ( 9.1107 knots)

     Start of Data:

     Time:  08 14 1993 18:00:25.000000  JD226

     Lon:  -49.3011     Lat:   12.1444     Depth:  4920.0000 meters

     Speed: 18.3600 km/hr ( 9.9243 knots)  Heading:  97.2000 degrees

     Sonar Depth:    0.0000 m  Sonar Altitude: 4920.0000 m

     End of Data:

     Time:  08 14 1993 19:14:58.000000  JD226

     Lon:  -49.1111     Lat:   12.1149     Depth:  5021.0000 meters

     Speed: 17.2800 km/hr ( 9.3405 knots)  Heading:  97.0000 degrees

     Sonar Depth:    0.0000 m  Sonar Altitude: 5021.0000 m

     Limits:

     Minimum Longitude:     -49.3061   Maximum Longitude:     -49.1064

     Minimum Latitude:       12.0750   Maximum Latitude:       12.1806

     Minimum Sonar Depth:     0.0000   Maximum Sonar Depth:     0.0000

     Minimum Altitude:     4087.0000   Maximum Altitude:     5034.0000

     Minimum Depth:        3726.0000   Maximum Depth:        5190.0000

     Minimum Amplitude:     100.0000   Maximum Amplitude:    6380.0000

    Suppose we wanted to know how noisy the outer beams are relative
    to the inner beams.  We might try:

            mbinfo -F24 -P5 -Iexample_hs.mb24

    obtaining:

     Swath Data File:      example_hs.mb24

     MBIO Data Format ID:  24

     Format name:          MBF_HSLDEOIH

     Informal Description: L-DEO in-house binary Hydrosweep

     Attributes:           Hydrosweep DS, 59 beams, bathymetry and amplitude,

                           binary, centered, L-DEO.

     Data Totals:

     Number of Records:              263

     Bathymetry Data (59 beams):

       Number of Beams:            15517

       Number of Good Beams:       13661     88.04%

       Number of Zero Beams:         868      5.59%

       Number of Flagged Beams:      988      6.37%

     Amplitude Data (59 beams):

       Number of Beams:            15517

       Number of Good Beams:       13661     88.04%

       Number of Zero Beams:         868      5.59%

       Number of Flagged Beams:      988      6.37%

     Sidescan Data (0 pixels):

       Number of Pixels:               0

       Number of Good Pixels:          0      0.00%

       Number of Zero Pixels:          0      0.00%

       Number of Flagged Pixels:       0      0.00%

     Navigation Totals:

     Total Time:             1.2425 hours

     Total Track Length:    20.9421 km

     Average Speed:         16.8548 km/hr ( 9.1107 knots)

     Start of Data:

     Time:  08 14 1993 18:00:25.000000  JD226

     Lon:  -49.3011     Lat:   12.1444     Depth:  4920.0000 meters

     Speed: 18.3600 km/hr ( 9.9243 knots)  Heading:  97.2000 degrees

     Sonar Depth:    0.0000 m  Sonar Altitude: 4920.0000 m

     End of Data:

     Time:  08 14 1993 19:14:58.000000  JD226

     Lon:  -49.1111     Lat:   12.1149     Depth:  5021.0000 meters

     Speed: 17.2800 km/hr ( 9.3405 knots)  Heading:  97.0000 degrees

     Sonar Depth:    0.0000 m  Sonar Altitude: 5021.0000 m

     Limits:

     Minimum Longitude:     -49.3061   Maximum Longitude:     -49.1064

     Minimum Latitude:       12.0750   Maximum Latitude:       12.1806

     Minimum Sonar Depth:     0.0000   Maximum Sonar Depth:     0.0000

     Minimum Altitude:     4087.0000   Maximum Altitude:     5034.0000

     Minimum Depth:        3726.0000   Maximum Depth:        5190.0000

     Minimum Amplitude:     100.0000   Maximum Amplitude:    6380.0000

     Beam Bathymetry Variances:

     Pings Averaged: 5

      Beam     N      Mean     Variance    Sigma

      ----     -      ----     --------    -----

        0      0       0.00       0.00      0.00

        1      0       0.00       0.00      0.00

        2    110    4719.59     342.69     18.51

        3    105    4779.49     399.15     19.98

        4    155    4748.81     280.18     16.74

        5    155    4817.12     194.62     13.95

        6    150    4826.44     197.76     14.06

        7    160    4863.82     155.50     12.47

        8    215    4806.08     229.11     15.14

        9    235    4807.09     220.23     14.84

       10    240    4766.29     158.83     12.60

       11    250    4764.34     221.09     14.87

       12    245    4765.35     146.24     12.09

       13    250    4782.02     167.34     12.94

       14    240    4798.38      92.98      9.64

       15    245    4775.16      98.27      9.91

       16    225    4782.35     136.30     11.67

       17    210    4820.37      80.70      8.98

       18    215    4821.15      80.97      9.00

       19    215    4827.71      76.20      8.73

       20    195    4842.65      84.22      9.18

       21    190    4843.02     155.87     12.48

       22    185    4884.28      73.69      8.58

       23    175    4885.21      69.88      8.36

       24    175    4871.47      52.01      7.21

       25    180    4871.92      34.71      5.89

       26    200    4830.80      36.83      6.07

       27    205    4835.16      33.47      5.79

       28    210    4809.96      43.07      6.56

       29    190    4850.77      40.97      6.40

       30    240    4768.69      64.23      8.01

       31    240    4772.90      74.44      8.63

       32    245    4760.11      57.97      7.61

       33    255    4734.01      81.72      9.04

       34    255    4728.19      82.21      9.07

       35    260    4722.94      83.45      9.14

       36    260    4721.95     102.02     10.10

       37    260    4713.48      83.85      9.16

       38    250    4715.40     101.33     10.07

       39    255    4722.56     118.20     10.87

       40    250    4727.48     109.13     10.45

       41    255    4734.96     127.97     11.31

       42    255    4724.53     124.06     11.14

       43    230    4744.74     122.96     11.09

       44    225    4752.16      98.22      9.91

       45    230    4692.27     107.96     10.39

       46    240    4696.93      95.93      9.79

       47    230    4699.80     129.08     11.36

       48    225    4696.32     145.20     12.05

       49    220    4681.50     140.29     11.84

       50    210    4676.16     103.35     10.17

       51    180    4627.31     105.22     10.26

       52    200    4654.55     207.85     14.42

       53    130    4665.82     250.97     15.84

       54    185    4704.29     300.80     17.34

       55    135    4731.13     218.16     14.77

       56    150    4736.29     178.16     13.35

       57    115    4691.45     217.31     14.74

       58      0       0.00       0.00      0.00

    SEE ALSO

    mbsystem(1)

    BUGS

    No bugs, only features. Maybe too many features...

     Index

    NAME
    VERSION
    SYNOPSIS
    DESCRIPTION
    AUTHORSHIP
    OPTIONS
    EXAMPLES
    SEE ALSO
    BUGS

Last Updated: 3 June 2013

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

Back to MB-System Home Page...