mbgetesf(1)

NAME
mbgetesf - Extract swath bathymetry data flags into an edit save file.

VERSION
Version 5.0

SYNOPSIS
mbgetesf [-Fformat -Iinfile -Mmode -Oesffile -V -H]

DESCRIPTION
Swath bathymetry data is typically edited either with interactive tools such as mbedit or automatic filters such as mbclean. The beams which are deemed "bad" are flagged, and the flags are output to an "edit save file", which can be applied to data later by mbprocess. Occasionally, the need arises to translate data flagging information from one file to another which represents a different version of the same dataset. In particular, it may happen that editing has been done on a data format which does not support all of the original data stream (e.g. the edmb Hydrosweep format 22, which does not contain travel times or amplitudes), but the user now wishes to work with the complete data stream without having to redo the editing process. The utility mbgetesf allows the user to extract the flagging information in the form of an "edit save file" like those generated by mbedit and mbclean. These edits can be applied to data later using mbprocess. If the edit save file is named properly (an ".esf" suffix added to the input swath file name), the edits can automatically be loaded into mbedit or mbclean. The user can extract edit events from only the flagged beams (-M1), or can extract edit events specifying null and flagged beams (-M2) and all (good, flagged, and null) beams (-M3). The latter cases are necessary only if previous editing has involved nulling beams that were originally classified as good or unflagging beams that were originally flagged. The default input is from stdin, and the default output is to standard out.

AUTHORSHIP
David W. Caress (caress@mbari.org)
  Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)
  Lamont-Doherty Earth Observatory

OPTIONS

-F  format
    Sets the format for the input and output swath data using MBIO integer format identifiers. These utilities uses the MBIO library and will read any swath data format supported by MBIO. A list of the swath data formats currently supported by MBIO and their identifier values is given in the MBIO manual page.

-H  This "help" flag causes 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.

-M  mode
    Specifies which beam flag values are output as edit events. If mode = 1, then only flagged beams are output. If mode = 2, then flagged and null beams are output. If mode = 3, then an edit event will be output for every beam, including those that are "good" (neither flagged nor null). Default: mode = 1.

-O  esffile
    Specifies output edit save file to which the edit events will be written. If no edit save file is specified, the output will be written to stdout. Default: esffile = stdout.

-V  Normally, mbgetesf works "silently" without outputting anything to the stderr stream. If the -V flag is given, then mbgetesf works in a "verbose" mode and outputs the program version being used and all error status messages.

EXAMPLES
Suppose one has an edmb format (MBIO format id 22) Hydrosweep file called hs_ew9103_143.mb22 which has been edited using older versions of mbedit so that no edit save file was generated. Further suppose that one's thesis advisor suggests that the bathymetry would be better if it were recalculated from travel times using a new water velocity model, requiring that the raw Hydrosweep data (originally collected in format 21 but recently translated to format 24) in the file hs_ew9103_143.mb24 be used. First extract the edit events in the form of a edit save file from the edited edmb file:
     mbgetesf -F22 -Ihs_ew9103_143.mb22      -Ohs_ew9103_143.mb24.esf -V
Note that the edit save file has been given the name of the second swath file with ".esf" appended. This naming convention is the same as if mbedit or mbclean had been run on hs_ew9103_143.mb24. Now, running either mbedit or mbclean will automatically load the edit events as a starting point for editing or filtering. To simply apply the extracted edit events to the swath bathymetry, first use mbset to enable applying the edits in the mbprocess parameter file, and then run mbprocess to actually apply the edits and generate a processed output swath file:
     mbset -Ihs_ew9103_143.mb24      -PEDITSAVEMODE:1      -PEDITSAVEFILE:hs_ew9103_143.mb24.esf      -V
     mbprocess -Ihs_ew9103_143.mb24 -V
The output swath file will be named hs_ew9103_143p.mb24.

SEE ALSO
mbsystem(l), mbedit(l), mbclean(l), mbset(l), mbprocess(l).

BUGS
Let us know.