# segyz

Plot a SEGY file in 3-D

## Synopsis

gmt segyz SEGYfile -J parameters -J z|Z parameters -R west/east/south/north[/zmin/zmax][+r][+u unit] -D deviation -F[color] -W [ -C clip ] [ -I ] [ -L nsamp ] [ -M ntrace ] [ -N ] [ -Q b|i|u|x|y value ] [ -S header_x/header_y ] [ -U[stamp] ] [ -V[level] ] [ -X[a|c|f|r][xshift] ] [ -Y[a|c|f|r][yshift] ] [ -Z ] [ -p flags ] [ -t transp ] [ --PAR=value ]

## Description

Reads a native (IEEE) format SEGY file and produces a plot of the seismic data. The imagemask operator is used so that the seismic data are plotted as a 1-bit deep bitmap in a single (user-specified) color or gray shade, with a transparent background. The bitmap resolution is taken from the current GMT defaults. The seismic traces may be plotted at their true locations using information in the trace headers (in which case order of the traces in the file is not significant). Standard GMT geometry routines are used so that in principle any map projection may be used, however it is likely that the geographic projections will lead to unexpected results. Beware that a couple of the options for the 2-D plotter are not available in here.

Note that the order of operations before the seismic data are plotted is deviation*[clip]([bias]+[normalize](sample value)). Deviation determines how far in the plot coordinates a [normalized][biased][clipped] sample value of 1 plots from the trace location.

The SEGY file should be a disk image of the tape format (i.e., 3200 byte text header, which is ignored, 400 byte binary reel header, and 240 byte header for each trace) with samples as native real*4 (IEEE real on all the platforms to which I have access).

## Required Arguments

SEGYfile

  Seismic SEGY data set to be imaged.

-J parameters

  Specify the projection. (See full description) (See cookbook summary) (See projections table).

-R west/east/south/north[/zmin/zmax][+r][+u unit]

> Specify the region of interest.

> The region may be specified in one of several ways:

> 1. -R west/east/south/north. This is the standard way to specify geographic regions when using map projections where meridians and parallels are rectilinear. The coordinates may be specified in decimal degrees or in [±]dd:mm[:ss.xxx][W|E|S|N] format.

> 2. -R west/south/east/north+r. This form is useful for map projections that are oblique, making meridians and parallels poor choices for map boundaries. Here, we instead specify the lower left corner and upper right corner geographic coordinates, followed by the modifier +r. This form guarantees a rectangular map even though lines of equal longitude and latitude are not straight lines.

> 3. -Rg or -Rd. These forms can be used to quickly specify the global domain (0/360 for -Rg and -180/+180 for -Rd in longitude, with -90/+90 in latitude).

> 4. -R code1,code2,…[+e|r|R incs]. This indirectly supplies the region by consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more countries given by the codes. Simply append one or more comma-separated countries using either the two-character ISO 3166-1 alpha-2 convention (e.g., NO) or the full country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX), or the full state name (e.g., Texas). To specify a whole continent, spell out the full continent name (e.g., -RAfrica). Finally, append any DCW collection abbreviations or full names for the extent of the collection or named region. All names are case-insensitive. The following modifiers can be appended:

>    > - +r to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no adjustment]. For example, -R FR+r1 will select the national bounding box of France rounded to nearest integer degree, where inc can be positive to expand the region or negative to shrink the region.

>    > - +R to adjust the region by adding the amounts specified by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no extension], where inc can be positive to expand the region or negative to shrink the region.

>    > - +e to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc, while ensuring that the bounding box is adjusted by at least 0.25 times the increment [default is no adjustment], where inc can be positive to expand the region or negative to shrink the region.

> 5. -R xmin/xmax/ymin/ymax[+u unit] specifies a region in projected units (e.g., UTM meters) where xmin/xmax/ymin/ymax are Cartesian projected coordinates compatible with the chosen projection (-J) and unit is an allowable distance unit [e]; we inversely project to determine the actual rectangular geographic region. For projected regions centered on (0,0) you may use the short-hand -R halfwidth[/halfheight]+u unit, where halfheight defaults to halfwidth if not given. This short-hand requires the +u modifier.

> 6. -R justifylon0/lat0/nx/ny, where justify is a 2-character combination of L|C|R (for left, center, or right) and T|M|B (for top, middle, or bottom) (e.g., BL for lower left). The two character code justify indicates which point on a rectangular region region the lon0/lat0 coordinates refer to and the grid dimensions nx and ny are used with grid spacings given via -I to create the corresponding region. This method can be used when creating grids. For example, -RCM 25/25/50/50 specifies a 50x50 grid centered on 25,25.

> 7. -R gridfile. This will copy the domain settings found for the grid in specified file. Note that depending on the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see Grid registration: The -r option).

> 8. -Ra[uto] or -Re[xact]. Under modern mode, and for plotting modules only, you can automatically determine the region from the data used. You can either get the exact area using -Re [Default if no -R is given] or a slightly larger area sensibly rounded outwards to the next multiple of increments that depend on the data range using -Ra.

-D deviation

  gives the deviation in X units of the plot for 1.0 on the scaled trace, This may be a single number (applied equally in X and Y directions) or the pair devX/devY.

-F[color]

  Fill trace (variable area, defaults to filling positive). Specify the color with which the imagemask is filled.

-W

  Draw wiggle trace.

You must specify at least one of -W and -F.

## Optional Arguments

-A

  Flip the default byte-swap state (default assumes data have a bigendian byte-order).

-C clip

  Sample value at which to clip data (clipping is applied to both positive and negative values).

-I

  Fill negative rather than positive excursions.

-L nsamp

  Override number of samples per trace in reel header (program attempts to determine number of samples from each trace header if possible to allow for variable length traces).

-M ntrace

  Override number of traces specified in reel header. Program detects end of file (relatively) gracefully, but this parameter limits number of traces that the program attempts to read.

-N

  Normalize trace by dividing by rms amplitude over full trace length.

-Qb|i|u|x|y value
  Can be used to change 5 different settings depending on the directive (repeatable):

    -Qb bias to bias scaled traces (-Qb-0.1 subtracts 0.1 from values).

    -Qi dpi sets the dots-per-inch resolution of the image [300].

    -Qu redvel to apply reduction velocity (negative removes reduction already present).

    -Qx mult to multiply trace locations by mult.

    -Qy dy to override sample interval in reel header.

-S header_x/header_y

  Read trace locations from trace headers: headers is either c for CDP, o for offset, b num to read a long starting at byte num in the header (first byte corresponds to num=0), or a number to fix the location. First parameter for x, second for y. Default has X and Y given by trace number.

-U[label|+c][+j justify][+o dx[/dy]][+t text]

  Draw GMT time stamp logo on plot. (See full description) (See cookbook information).

-V[level]

  Select verbosity level [w]. (See full description) (See cookbook information).

-X[a|c|f|r][xshift]

  Shift plot origin. (See full description) (See cookbook information).

-Y[a|c|f|r][yshift]

  Shift plot origin. (See full description) (See cookbook information).

-Z

  Do not plot traces with zero rms amplitude.

-p[x|y|z]azim[/elev[/zlevel]][+w lon0/lat0[/z0]][+v x0/y0] (more …)

  Select perspective view.

-t transp[/transp2] (more …)

  Set transparency level(s) in percent.

-^ or just -

  Print a short message about the syntax of the command, then exit (Note: on Windows just use -).

-+ or just +

  Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exit.

-? or no arguments

  Print a complete usage (help) message, including the explanation of all options, then exit.

--PAR=value

  Temporarily override a GMT default setting; repeatable. See gmt.conf for parameters.

## Examples

Note: Since many GMT plot examples are very short (i.e., one module call between the gmt begin and gmt end commands), we will often present them using the quick modern mode GMT Modern Mode One-line Commands syntax, which simplifies such short scripts.

To plot the SEGY file wa1.segy with normalized traces plotted at true offset locations, clipped at ±3 and with wiggle trace and positive variable area shading in black, use

    gmt segyz wa1.segy -JX5i/-5i -D1 -Jz0.05i -E180/5 -R0/100/0/10/0/10 \
            -C3 -N -So -W -Fblack -pdf segy

## Bugs

Variable area involves filling four-sided figures of distressing generality. I know that some of the more complex degenerate cases are not dealt with correctly or at all; the incidence of such cases increases as viewing angles become more oblique, and particularly as the viewing elevation increases. Wiggle-trace plotting is not affected.

## See Also

gmt, segy, segy2grd