MB-System Unix Manual Page

mbsegygrid

Section: MB-System 5.0 (1)
Updated: 12 October 2013
Index
 

NAME

mbsegygrid - Generate time vs. trace number grids of seismic data from segy files.

 

VERSION

Version 5.0

 

SYNOPSIS

mbsegygrid -Isegyfile -Ogridfile [-Ashotscale/timescale -Bmaxvalue/window -Ddecimatex/decimatey -Gmode/gain[/window] -Smode[/start/end[/schan/echan]] -Tsweep[/delay] -Wmode/start/end -H -V]";

 

DESCRIPTION

MBsegygrid generates grids of seismic data from segy files. The program works by inserting trace data into a grid in which the y-axis is some measure of trace number, range, or distance along a profile, and the y-axis is time. The output files are GMT netCDF format grid files.

By default or with use of the -A option, the x-dimension of the grid is determined by the number of traces specified by the -S option and any decimation specified with option -D. If the -R option is used, then the profile will represent a line between specified start and end positions divided into binning cells according to a specified cell size, and the x-dimension of the grid will be the distance along the line (in meters) divided by the cell size and any decimation specified with option -D.

The y-dimension of the grid is determined by the sample spacing, any decimation specified with option -D, and the time sweep specified by the -T option.

If the -S option is not specified, then all of the traces in the segy file will be gridded. If the time sweep and delay (if any) are not specified using the -T option, then the sweep and delay will be set so that all trace samples are incorporated into the grid.

A simple time-varying gain can be applied to the traces before gridding using the -G option. The start time for the gain may be either the start of the trace or the seafloor arrival time.

Simple time-domain low-pass filtering can be applied to the traces before gridding using the -F option.

Regions of the grid without data are indicated in the output by NaN values.

 

MB-SYSTEM AUTHORSHIP

David W. Caress

  Monterey Bay Aquarium Research Institute
Dale N. Chayes

  Center for Coastal and Ocean Mapping

  University of New Hampshire
Christian do Santos Ferreira

  MARUM - Center for Marine Environmental Sciences

  University of Bremen

 

OPTIONS

-A
shotscale/timescale
This option causes the x-axis to be rescaled from shot number to distance in meters and the y-axis to be rescaled from time in seconds to depth in meters. The shotscale value represents the shot spacing in meters and the timescale value is the scaling from time to depth (typically 750 m/s for the water column).
-B
maxvalue[/window]
This option causes the application of automatic gain control (AGC). At each sample, a time interval window seconds long centered on the sample is considered. The sample value is multiplied by a scaling factor calculated as maxvalue divided by the maximum original value in the time interval. This approach can emphasize coherent arrivals regardless of amplitude level. If window is not specified, then the window is taken to be the trace length in time so that the entire trace is normalized using the same scale factor, and all traces has the same maximum value of maxvalue.
-D
decimatex/decimatey
Sets the decimation of traces (decimatex) and samples (decimatey) used in generating the output grid. The downsampling of the data is actually accomplished by averaging the values within each grid bin rather than omitting traces or samples.
-F
mode/window
Sets the application of low-pass filtering to the trace data. The filtering is applied by convolving a filter function of length window seconds with the trace. Currently the only available filter is a cosine taper, set using mode = 1.
-G
mode/gain[/window]
Sets the application of gain to the trace data. The mode value determines how the gain is applied. If mode = 0, no gain is applied.If mode = 1, the gain is applied starting from the beginning of the trace. If mode = 2, the gain is applied starting at the seafloor (assuming that a seafloor pick has been defined in the segy data file). The gain value sets the gain applied as follows. If G = gain and t is the time in seconds since the start of gain application, then each sample is multiplied by a factor of (1 + (G * t)). The parameter window, if given, sets the length of the time interval in seconds that gain is applied. When the gain is windowed, trace values after the end of the gain window are zeroed.
-H
This "help" flag cause the program to print out a description of its operation and then exit immediately.
-I
segyfile
Sets the filename of the input segy seismic data file to be gridded.
-O
gridfile
Sets the filename for the output GMT netCDF format grid.
-R
cellsize/startlon/endlon/startlat/endlat
If the -R option is used, then the profile will represent a line between start and end positions specified using longitude and latitude values in decimal degrees. This line segment is divided into binning cells according to cellsize in meters, and the x-dimension of the grid will be the distance along the line (in meters) divided by the cell size and any decimation specified with option -D. Effectively, the location of each trace will be projected onto the line segment and the segment added to the appropriate cell. Where cells have multiple traces, the traces will be averaged.
-S
mode[/start/end[/schan/echan]]
This option sets the range of traces that are gridded, and thus determines the x-dimension of the output grid (also impacted by any decimation specified with -D). If mode = 0, then start and end refer to shot numbers. This typically is useful for subbottom data or seismic data in shot gather form. If mode = 1, then start and end refer to CMP (or RP or CDP) numbers. This typically is useful for seismic reflection data in stacked or CMP gather forms. If the data are multichannel seismic reflection or seismic refraction in either shot or CMP gathers, the start and end of the channels selected for gridding is set using the optional schan and echan, respectively. The x-dimension of the output grid is determined by (end - start + 1) * (echan - schan + 1) / decimatex. If mode=2, then start and end refer to shot numbers and all traces within that range of shot numbers are plotted. Effectively the channel numbers are ignored by setting all trace channels to 0 and plotting channel 0.
-T
sweep[/delay]
Sets the time range of seismic data to be gridded. The sweep specifies the number of seconds of data comprising the y-axis of the grid. The number of samples follows from the sample interval of the data, and any decimation applied using -D. The optional delay value sets the sweep start time, again in seconds. The y-dimension of the output grid is determined by sweep / sampleinterval / decimatey, where the sampleinterval is a parameter read with the seismic data.
-V
Normally, mbsegygrid prints out information regarding its controlling parameters during execution; the -V option causes the program to also print out statements indicating its progress.
-W
mode/start/end
This option can be used to limit the data being gridded to a particular time window in various ways. This option does not impact the definition of the overall grid bounds, but does restrict the data gridded to samples within particular times of interest. If mode = 1, then start and end are simply start and end times of good data in seconds. If mode = 2, then start and end are relative to the time of the bottom return. In this case start is often negative so that the grid shows data above the seafloor, and then down into the subsurface. Finally, if mode = 3, then start and end are relative to the time corresponding to the sonar depth.

 

EXAMPLES

Suppose that we have a Reson 7k format file (format 88) called 20040722_152111.s7k that contains subbottom profiler data. Further suppose that we have used mbextractsegy to extract the subbottom profiler data into a segy format file called 20040722_152111.s7k.segy. MBextractsegy also generates a "sinf" file containing statistics about the data in the segy file. In this case, 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

In order to generate a time vs. trace number grid of all traces in the segy file, with a column for each trace and a row for each time sample, one can simply invoke mbsegygrid without specifying a range of desired traces or the desired time sweep. The program automatically sizes the grid to include all traces and samples, taking into account trace start delays if necessary. The root of the output grid filename is specified with the -O option; if "SubbottomGrid" is specified then the output grid will be named SubbottomGrid.grd. The command is:
        mbsegygrid -I 20040722_152111.s7k.segy                  -O SubbottomGrid

and the output to the terminal looks like:


        MBsegygrid Parameters:

        Input segy file:         20040722_152111.s7k.segy

        Output fileroot:         SubbottomGrid

        Input Parameters:

             trace mode:         1

             trace start:        56

             trace end:          2582

             channel start:      1

             channel end:        1

             trace decimation:   1

             time sweep:         0.533120 seconds

             time delay:         0.000000 seconds

             sample interval:    0.000064 seconds

             sample decimation:  1

             window mode:        0

             window start:       0.000000 seconds

             window end:         0.000000 seconds

             gain mode:          0

             gain:               0.000000

        Output Parameters:

             grid filename:      SubbottomGrid.grd

             x grid dimension:   2527

             y grid dimension:   8331

             grid xmin:          55.500000

             grid xmax:          2582.500000

             grid ymin:          -0.533152

             grid ymax:          0.000032

             NaN values used to flag regions with no data

        PROCESS read:0 position:0 rp:56 channel:1 2004/204 15:20:37.029 samples:8330 interval:64 usec minmax: 0.000000 2425.784912

        PROCESS read:25 position:25 rp:81 channel:1 2004/204 15:20:51.068 samples:8330 interval:64 usec minmax: 0.000000 3832.087402

        PROCESS read:50 position:50 rp:106 channel:1 2004/204 15:21:05.106 samples:8330 interval:64 usec minmax: 0.000000 1590.149658

        ....................

        PROCESS read:2475 position:2475 rp:2531 channel:1 2004/204 15:43:46.800 samples:8330 interval:64 usec minmax: 0.000000 991.466064

        PROCESS read:2500 position:2500 rp:2556 channel:1 2004/204 15:44:00.838 samples:8330 interval:64 usec minmax: 0.000000 838.286926

        PROCESS read:2525 position:2525 rp:2581 channel:1 2004/204 15:44:14.877 samples:8330 interval:64 usec minmax: 0.000000 985.870667


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


        Plot generation shellscript <SubbottomGrid.grd.cmd> created.


        Instructions:

          Execute <SubbottomGrid.grd.cmd> to generate Postscript plot <SubbottomGrid.grd.ps>.

          Executing <SubbottomGrid.grd.cmd> also invokes gv to view the plot on the screen.


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

The size of the the output grid can be checked using the GMT program grdinfo. The results of the command:
        grdinfo SubbottomGrid.grd

look like:
        SubbottomGrid.grd: Title: Seismic Grid from 20040722_152111.s7k.segy

        SubbottomGrid.grd: Command:

        SubbottomGrid.grd: Remark:

                Projection: SeismicProfile

                Grid created by MBsegygrid

                MB-system Version 5.0.4

                Run by <caress> on <hess> at <Thu Sep 23 16:24:39 2004>

        SubbottomGrid.grd: Pixel node registration used

        SubbottomGrid.grd: grdfile format # 0

        SubbottomGrid.grd: x_min: 55.5 x_max: 2582.5 x_inc: 1 units: Trace Number nx: 2527

        SubbottomGrid.grd: y_min: -0.533152 y_max: 3.2e-05 y_inc: 6.4e-05 units: Time (seconds) ny: 8331

        SubbottomGrid.grd: z_min: 0 z_max: 2623.34 units: Trace Signal

        SubbottomGrid.grd: scale_factor: 1 add_offset: 0

MBsegygrid also uses the macro mbm_grdplot to generate a shellscript called SubbottomGrid.grd.cmd that, when executed, will use GMT commands to generate a Postscript plot of the grid.

In order to generate a grid of a subset of the subbottom data (for instance, shots 1500 - 2000 and the time sweep from 0.25 to 0.35 seconds), use the -S and -T options:
        mbsegygrid -I 20040722_152111.s7k.segy                  -O SubbottomGrid2               -S0/1500/2000 -T0.1/0.25

This time the grdinfo output looks like:
        SubbottomGrid2.grd: Title: Seismic Grid from 20040722_152111.s7k.segy

        SubbottomGrid2.grd: Command:

        SubbottomGrid2.grd: Remark:

                Projection: SeismicProfile

                Grid created by MBsegygrid

                MB-system Version 5.0.4

                Run by <caress> on <hess> at <Thu Sep 23 16:40:34 2004>

        SubbottomGrid2.grd: Pixel node registration used

        SubbottomGrid2.grd: grdfile format # 0

        SubbottomGrid2.grd: x_min: 1499.5 x_max: 2000.5 x_inc: 1 units: Trace Number nx: 501

        SubbottomGrid2.grd: y_min: -0.35 y_max: -0.249968 y_inc: 6.4e-05 units: Time (seconds) ny: 1563

        SubbottomGrid2.grd: z_min: 0 z_max: 558.42 units: Trace Signal

        SubbottomGrid2.grd: scale_factor: 1 add_offset: 0

 

SEE ALSO

mbsystem(1), mbm_grdplot(1), mbmosaic(1), mbm_grid(1)

 

BUGS

This tool isn't close to being complete...


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
MB-SYSTEM AUTHORSHIP
OPTIONS
EXAMPLES
SEE ALSO
BUGS


Last Updated: 12 October 2013