MB-System Unix Manual Page: mbextractsegy

### MB-System Unix Manual Page

#

##

##

##

##

##

##

##

##

##

##

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

    NAME

    mbextractsegy - extracts subbottom profiler, center beam reflection,
    or seismic reflection data from swath data supported by MB-System and
    rewrites it as a SEGY file.

    VERSION

    Version 5.0

    SYNOPSIS

    mbextractsegy [-Byr/mo/da/hr/mn/sc -Eyr/mo/da/hr/mn/sc
    -Fformat -Ifile -Jxscale/yscale/maxwidth
    -Lstartline/lineroot -M -Osegyfile -Qroutetimefile
    -Rroutefile -Ssampleformat
    -Ttimeshift -Urangethreshold -Zplotmax -V -H]

    DESCRIPTION

    MBextractsegy is a utility for reading a swath sonar data file
    or files, extracting subbottom profiler, center beam reflection,
    or seismic reflection data, and outputting that selected data
    as a SEGY file. Parameters such as sonar depth, seafloor depth, and
    position are embedded into the SEGY data. The SEGY files are
    output in a form used by the seismic reflection processing package
    SIOSEIS. A "sinf" file containing statistics about the content
    of the SEGY file is created automatically by MBextractsegy; this
    file is named by adding a ".sinf" suffix to the SEGY filename.

    At present, the only swath data formats from which subbottom data
    can be extracted are format 88 (Reson 7k format), format 132
    (Edgetech Jstar format), and format 133 (Edgetech Jstar format).

    The extracted segy data file(s) can be organized three ways. If the -O
    option is used to specify a single segy output file, then all of the
    segy data will be output to that single file. If either the -Q or
    -R options are used to specify a survey route file that includes
    the waypoints covered while collecting the data file(s) referenced by
    -Ifile, then the output segy data will be broken up by the
    sequential lines defined by the waypoints. The -Q option specifies a
    route file that includes the time at which each waypoint is reached in the
    data, and the -R option specifies a route file of the form exported by
    MBgrdviz. In the waypoint-driven case each output segy file will be named
    using the line root name specified by -Lstartline/lineroot with a
    sequential line number starting from startline. If neither the -O or
    -L options are used, each input swath file will have a corresponding
    segy output file with the ".segy" suffix added to the original filename.

    MBextractsegy also generates a "first cut plot" script that will generate
    grayscale section plots in Postscript of each segy file using the programs
    MBsegygrid and mbm_grdplot. The -Z sets the trace value
    corresponding to the maximum grayscale (black) in the section plots.

    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.
    -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 the program mbdefaults..
    -H

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

    infile

    Sets the input file path. If format > 0 (set with the
    -f option or mbdefaults) 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".
    -J

    xscale/yscale/maxwidth

    Sets the scale of the default section plots. The xscale value is
    in inches per shot, and the yscale value is in inches per second.
    The maxwidth value sets the maximum plot width in inches. If
    xscale and the shot range imply a width greater than maxwidth,
    then the section will be broken up into multiple plots.
    Default: xscale = 0.01; yscale = 75; maxwidth = 45.0
    -L

    startline/lineroot

    This option sets the starting line number and the output filename root
    used when -R is specified so that data are output according
    to planned survey lines. Default: startline = 1; lineroot = "sbp".
    -M

    This option causes mbextractsegy to omit data during turns when
    extracting into line files according to a specified set of waypoints
    (-R option). The traces will not be output until the heading is
    within 15 degrees of the next survey line's bearing.
    -O

    This option sets the output SEGY file path. If neither -O nore -R are invoked,
    the output SEGY filename (or files if a datalist is being processed) will
    be the input swath filename with ".segy" appended.
    -Q

    routetimefile

    This option specifies route file containing the times that the survey reached
    the intended waypoints. This text file consists of lines of the form:

            count waypoint longitude latitude heading time_d

    where count is just an integer counter starting at 0, waypoint is the waypoint
    number starting at 0, longitude and latitude are the waypoint position in
    decimal degrees, heading is the heading in decimal degrees, and time_d is
    the unix or epoch time (time since 00:00:00 January 1, 1970) in decimal
    seconds that the survey reached this waypoint. This file can be generated from
    an mbgrdviz route file and survey data using the program mbroutetime.
    If routetimefile is specified, mbextractsegy
    will output SEGY data in files corresponding to the planned survey lines.
    The output SEGY file names will be based on lineroot and will include
    the line number starting with starline, both of which are specified
    using the -L options.  If neither -O nore -R are invoked,
    the output SEGY filename (or files if a datalist is being processed) will
    be the input swath filename with ".segy" appended.
    -R

    routefile

    This option specifies an mbgrdviz route file containing the intended
    waypoints of the survey. If routefile is specified, mbextractsegy
    will output SEGY data in files corresponding to the planned survey lines.
    The output SEGY file names will be based on lineroot and will include
    the line number starting with starline, both of which are specified
    using the -L options.  If neither -O nore -R are invoked,
    the output SEGY filename (or files if a datalist is being processed) will
    be the input swath filename with ".segy" appended.
    -S

    sampleformat

    Sets the sample format desired for use in the output SEGY file. Options include:

            MB_SEGY_SAMPLEFORMAT_NONE           1

            MB_SEGY_SAMPLEFORMAT_TRACE          2

            MB_SEGY_SAMPLEFORMAT_ENVELOPE       3

            MB_SEGY_SAMPLEFORMAT_ANALYTIC       4

    MB_SEGY_SAMPLEFORMAT_TRACE implies that the seismic trace is in the original,
    most raw form with both positive and negative values.
    MB_SEGY_SAMPLEFORMAT_ANALYTIC implies that the trace has been
    been transformed from the original time series to an analytic signal containing
    both real and imaginary parts. Both the real and imaginary signals
    are stored in the SEGY file. MB_SEGY_SAMPLEFORMAT_ENVELOPE implies that the
    analytic signal has been reduced back to a single real, positive-only envelope
    signal by taking the magnitude of the real and imaginary parts at every sample.
    It is important to note that this option only sets the desired sample format, and
    the program may find it necessary to store the data in an alternate form. For
    instance, if the user specifies MB_SEGY_SAMPLEFORMAT_TRACE or
    MB_SEGY_SAMPLEFORMAT_ANALYTIC but the swath file only contains envelope data,
    the data will be written in the envelope form. The default value of
    MB_SEGY_SAMPLEFORMAT_NONE allows the program to choose the most appropriate
    sample format.
    -U

    rangethreshold

    If the -R option is specified, mbextractsegy breaks up the
    output into files corresponding to survey lines specified in a route file.
    This option sets the threshold distance in meters used to determine when
    a waypoint along the route has been reached; the program considers the
    next waypoint reached when the range to the waypoint becomes smaller
    than rangethreshold and then ceases to decrease.
    Default: rangethreshold = 25 m.
    -Z

    plotmax

    Specifies the trace value corresponding to the maximum grayscale (black)
    in the section plots. Default: plotmax = 50.
    -V

    This option increases the verbosity of mbextractsegy, causing it
    to print out messages regarding its progress to stdout.

    EXAMPLES

    Suppose that one has collected a set of Reson 7k datafiles incorporating
    multibeam sonar data, sidescan data, and subbottom profiler data, and
    that the filenames are:

            20040722_152111.s7k

            20040722_154429.s7k

            20040722_160809.s7k

    In order to extract the subbottom data into segy files, one can use
    mbextractsegy on each file in turn, for example:

            mbextractsegy -I 20040722_152111.s7k

    which yields the following output:

            2527 records output to segy file 20040722_154429.s7k.segy

    In this command the 7k file format id of 88 is inferred from the
    ".7k" filename suffix.

    One may also input a datalist file referencing all of the 7k files. The
    contents of a datalist file (typically named datalist.mb-1) would look like:

            20040722_152111.s7k 88

            20040722_154429.s7k 88

            20040722_160809.s7k 88

    where the second column is the data format id (see the mbsystem man page
    for a discussion of datalist files). To operate on all the files in
    a single command, use:

            mbextractsegy -I datalist.mb-1

     which yields the following output:

            2527 records output to segy file 20040722_154429.s7k.segy

            2568 records output to segy file 20040722_160809.s7k.segy

            2569 records output to segy file 20040722_163148.s7k.segy

    In this command the datalist format id of -1 is inferred from the
    ".mb-1" filename suffix.

    Use of the -V option causes mbextractsegy to output information
    about every tenth record written to a segy file. So:

            mbextractsegy -I 20040722_152111.s7k -V

    which yields the following output:

            2527 records output to segy file 20040722_154429.s7k.segy

            Outputting subbottom data to segy file 20040722_152111.s7k.segy

            file:20040722_152111.s7k record:10 shot:65  2004/204 15:20:42.083 samples:8330 interval:64 usec  minmax: 0.000000 17487.244141

            file:20040722_152111.s7k record:20 shot:75  2004/204 15:20:47.698 samples:8330 interval:64 usec  minmax: 0.000000 16525.875000

            ......... lines omitted ..........

            file:20040722_152111.s7k record:2510 shot:2565  2004/204 15:44:05.893 samples:8330 interval:64 usec  minmax: 0.000000 17616.189453

            file:20040722_152111.s7k record:2520 shot:2575  2004/204 15:44:11.507 samples:8330 interval:64 usec  minmax: 0.000000 31888.093750

            2527 records output to segy file 20040722_152111.s7k.segy

    MBextractsegy also generates a "sinf" file containing statistics about the data in the segy
    file 20040722_152111.s7k.segy. The contents of the sinf file 20040722_152111.s7k.segy.sinf are:

            SEGY Data File:      20040722_152111.s7k.segy

            File Header Info:

              Channels:                          1

              Auxiliary Channels:                0

              Sample Interval (usec):           64

              Number of Samples in Trace:     8330

              Trace length (sec):         0.533120

              Data Format:                IEEE 32 bit integer

              CDP Fold:                          0

            Data Totals:

              Number of Traces:               2527

              Min Max Delta:

                Shot number:                    56     2582     2527

                Shot trace:                      1        1        1

                RP number:                      56     2582     2527

                RP trace:                        1        1        1

                Delay (sec):              0.000000 0.000000 0.000000

                Range (m):                0.000000 0.000000 0.000000

                Receiver Elevation (m):   -224.030000 -2.860000 -221.170000

                Source Elevation (m):     -224.030000 -2.860000 -221.170000

                Source Depth (m):         2.860000 224.030000 -221.170000

                Receiver Water Depth (m): 51.510000 487.670000 -436.160000

                Source Water Depth (m):   51.510000 487.670000 -436.160000

            Navigation Totals:

              Start of Data:

                Time:  07 22 2004 15:20:37.029000  JD204

                Lon: -121.8573     Lat:   36.7755

              End of Data:

                Time:  07 22 2004 15:44:15.438000  JD204

                Lon: -121.8572     Lat:   36.7952

            Limits:

              Minimum Longitude:    -121.8574   Maximum Longitude:    -121.8572

              Minimum Latitude:       36.7755   Maximum Latitude:       36.7952

    SEE ALSO

    mbsystem(1), mbsegyinfo(1), mbsegylist(1), mbsegygrid(1),
    SIOSEIS(http://sioseis.ucsd.edu/ )

    BUGS

    Doesn't support all of the data formats containing subbottom or center beam
    reflection data..

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