3.3. Extracting Statistics

MB-System™ provides mbinfo as a simple tool to extract statistics about a data set. Actually we've already used mbinfo and didn't know it. It was called in the background on our first call to mbdatalist to create the ".inf" files for each data file. However we could have executed mbinfo on each file individually as shown below.

mbinfo -F 183 -I 00020504090010.mb183

The results are sent to STDOUT by default rather than an ".inf" file. One can optionally redirect the results to a file of the same name as the original with ".inf" appended to the end with the -O flag. The resulting file will be automatically read and utilized by several of the other MB-System™ processes.

Here is the result of executing the mbinfo line above.

Swath Data File:      00020504090010.mb183
MBIO Data Format ID:  183
Format name:          MBF_HSDS2LAM
Informal Description: L-DEO HSDS2 processing format
Attributes:           STN Atlas multibeam sonars, 
                      Hydrosweep DS2, Hydrosweep MD, 
                      Fansweep 10, Fansweep 20, 
                      bathymetry, amplitude, and sidescan,
                      up to 1440 beams and 4096 pixels,
                      XDR binary, L-DEO.

Data Totals:
Number of Records:               37
Bathymetry Data (140 beams):
  Number of Beams:             5180
  Number of Good Beams:        5106     98.57%
  Number of Zero Beams:          74      1.43%
  Number of Flagged Beams:        0      0.00%
Amplitude Data (140 beams):
  Number of Beams:             5180
  Number of Good Beams:        5106     98.57%
  Number of Zero Beams:          74      1.43%
  Number of Flagged Beams:        0      0.00%
Sidescan Data (2180 pixels):
  Number of Pixels:           73815
  Number of Good Pixels:      55276     74.88%
  Number of Zero Pixels:      18539     25.12%
  Number of Flagged Pixels:       0      0.00%

Navigation Totals:
Total Time:             0.1593 hours
Total Track Length:     3.4493 km
Average Speed:         21.6521 km/hr (11.7038 knots)

Start of Data:
Time:  05 04 2002 08:59:56.460000  JD124
Lon:  169.8792     Lat:   42.1343     Depth:  5057.7613 meters
Speed: 23.1530 km/hr (12.5151 knots)  Heading:  46.1206 degrees
Sonar Depth:    5.8000 m  Sonar Altitude: 5051.9613 m

End of Data:
Time:  05 04 2002 09:09:29.968000  JD124
Lon:  169.9084     Lat:   42.1563     Depth:  4950.8452 meters
Speed: 21.0345 km/hr (11.3700 knots)  Heading:  43.9014 degrees
Sonar Depth:    5.1000 m  Sonar Altitude: 4945.7452 m

Limits:
Minimum Longitude:     169.8268   Maximum Longitude:     169.9605
Minimum Latitude:       42.0966   Maximum Latitude:       42.1970
Minimum Sonar Depth:     4.6000   Maximum Sonar Depth:     6.7000
Minimum Altitude:     4817.2718   Maximum Altitude:     5051.9613
Minimum Depth:        4770.9467   Maximum Depth:        5347.7265
Minimum Amplitude:       7.0000   Maximum Amplitude:     241.0000
Minimum Sidescan:        2.0000   Maximum Sidescan:      255.0000

We could also have executed mbinfo on a list of data files to see summary statistics for all of them. As an example we'll use our survey list created earlier:

[vschmidt@val-ldeo cookbook_examples]$ mbinfo -F-1 -I survey-datalist

And the results...

...
Data Totals:
Number of Records:             2412
Bathymetry Data (140 beams):
  Number of Beams:           337680
  Number of Good Beams:      329580     97.60%
  Number of Zero Beams:        8100      2.40%
  Number of Flagged Beams:        0      0.00%
Amplitude Data (140 beams):
  Number of Beams:           337680
  Number of Good Beams:      329580     97.60%
  Number of Zero Beams:        8100      2.40%
  Number of Flagged Beams:        0      0.00%
Sidescan Data (4094 pixels):
  Number of Pixels:         8746103
  Number of Good Pixels:    7680282     87.81%
  Number of Zero Pixels:    1065821     12.19%
  Number of Flagged Pixels:       0      0.00%

Navigation Totals:
Total Time:             7.0001 hours
Total Track Length:   128.0750 km
Average Speed:         18.2963 km/hr ( 9.8899 knots)

Start of Data:
Time:  05 04 2002 09:59:44.485000  JD124
Lon:  170.0626     Lat:   42.2726     Depth:  4508.8810 meters
Speed:  0.0000 km/hr ( 0.0000 knots)  Heading:  44.6704 degrees
Sonar Depth:    6.0000 m  Sonar Altitude: 4502.8810 m

End of Data:
Time:  05 04 2002 16:59:44.722000  JD124
Lon:  170.2718     Lat:   42.4209     Depth:  1446.6716 meters
Speed: 21.4741 km/hr (11.6076 knots)  Heading:  35.9473 degrees
Sonar Depth:    5.4000 m  Sonar Altitude: 1441.2716 m

Limits:
Minimum Longitude:     170.0040   Maximum Longitude:     170.3616
Minimum Latitude:       42.1619   Maximum Latitude:       42.4469
Minimum Sonar Depth:     3.6000   Maximum Sonar Depth:     7.9000
Minimum Altitude:      990.7620   Maximum Altitude:     4740.1799
Minimum Depth:         973.2481   Maximum Depth:        6223.7055
Minimum Amplitude:       0.0000   Maximum Amplitude:     250.0000
Minimum Sidescan:        1.0000   Maximum Sidescan:      255.0000

Here mbinfo has created summary statistics for the entire survey . We can see that the survey lasted some seven hours covering some 128 km at an average ship speed of about 10 knots. We can see the number of beams recorded, and had any processing been done on these data files, we would see the number of beams that had been flagged for removal. We can also see the data bounds, in latitude, longitude, minimum and maximum water depth, and start and stop times.

Now that we've seen how to quickly make some nice plots and extract some basic meta-data about our data files, we can turn to the topic of processing that data.