segy
segy(cmd0::String="", arg1=nothing; kwargs...)Plot a SEGY file as a seismic data image.
(Warning: Manual translate by Claude. Needs revision)
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 also that some parameters have non-standard meanings.
Note that the order of operations before the seismic data are plotted is deviation*clip. 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 (passed as first argument or via cmd0).
J or proj or projection : – proj=
Select map projection. More at projR or region or limits : – limits=(xmin, xmax, ymin, ymax) | limits=(BB=(xmin, xmax, ymin, ymax),) | limits=(LLUR=(xmin, xmax, ymin, ymax),units=“unit”) | …more
Specify the region of interest. More at limits. For perspective view view, optionally add zmin,zmax. This option may be used to indicate the range used for the 3-D axes. You may ask for a larger w/e/s/n region to have more room between the image and the axes.D or dev or deviation : – deviation=val
Gives the deviation in X units of the plot for 1.0 on the scaled trace.F or fill or color : – fill=color | fill=true
Fill trace (variable area, defaults to filling positive). Specify the color with which the imagemask is filled.W or wiggle : – wiggle=true
Draw wiggle trace.
You must specify at least one of wiggle and fill.
Optional Arguments
A or byteswap or swap : – swap=true
Flip the default byte-swap state (default assumes data have a bigendian byte-order).C or clip : – clip=val
Sample value at which to clip data (clipping is applied to both positive and negative values).E or error : – error=val
Allow error difference between requested and actual trace locations when using tracefile option.I or negative or fillneg : – negative=true
Fill negative rather than positive excursions.L or nsamp or nsamples : – nsamples=val
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 or ntraces : – ntraces=val
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 or normalize or norm : – normalize=true
Normalize trace by dividing by rms amplitude over full trace length.Q or adjust : – adjust=(bias=val, dpi=val, redvel=val, xmult=val, dy=val)
Can be used to change 5 different settings:
bias (or b): bias scaled traces (e.g.,bias=-0.1subtracts 0.1 from values).
dpi (or i): sets the dots-per-inch resolution of the image [300].
redvel (or u): apply reduction velocity (negative value removes reduction already present).
xmult (or x): multiply trace locations by mult.
dy (or y): override sample interval in SEGY reel header.S or header or traceheader : – header=:c | header=:o | header=(byte=num,)
Read trace locations from trace headers: header is either :c (or :cdp) for CDP, :o (or :offset) for offset, or a NamedTuple with byte=num to read a long starting at byte num in the header (first byte corresponds to num = 0). Default has location given by trace number.T or tracelist or tracefile : – tracefile=filename
Plot only traces whose location corresponds to a list given in filename. Order in which traces are listed is not significant - the entire space is checked for each trace.Z or skipzero or nozero : – skipzero=true
Do not plot traces with zero rms amplitude.U or time_stamp : – time_stamp=true | time_stamp=(just=“code”, pos=(dx,dy), label=“label”, com=true)
Draw GMT time stamp logo on plot. More at timestampV or verbose : – verbose=true | verbose=level
Select verbosity level. More at verboseX or xshift or x_offset : xshift=true | xshift=x-shift | xshift=(shift=x-shift, mov=“a|c|f|r”)
Shift plot origin. More at xshiftY or yshift or y_offset : yshift=true | yshift=y-shift | yshift=(shift=y-shift, mov=“a|c|f|r”)
Shift plot origin. More at yshiftp or view or perspective : – view=(azim, elev)
Default is viewpoint from an azimuth of 200 and elevation of 30 degrees.
Specify the viewpoint in terms of azimuth and elevation. The azimuth is the horizontal rotation about the z-axis as measured in degrees from the positive y-axis. That is, from North. This option is not yet fully expanded. Current alternatives are:- view=??
A full GMT compact string with the full set of options. - view=(azim,elev)
A two elements tuple with azimuth and elevation - view=true
To propagate the viewpoint used in a previous module (makes sense only inbar3!) More at perspective
- view=??
t or transparency or alpha: – alpha=50
Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. Works only for the PDF and PNG formats.figname or savefig or name : – figname=
name.png
Save the figure with thefigname=name.extwhereextchooses the figure image format.
Examples
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
using GMT
segy("wa1.segy", proj="X5i/-5i", region=(0,100,0,10), deviation=1, clip=3,
normalize=true, header=:o, wiggle=true, fill=:black, figname="segy.pdf")To plot the SEGY file wa1.segy with traces plotted at true cdp*0.1, clipped at ±3, with bias -1 and negative variable area shaded red, use
using GMT
segy("wa1.segy", proj="X5i/-5i", region=(0,100,0,10), deviation=1, clip=3,
header=:c, adjust=(xmult=0.1, bias=-1), fill=:red, negative=true, figname="segy.pdf")Source Code
This function has multiple methods:
segy(cmd0::String; kwargs...)- segy.jl:6segy(; ...)- segy.jl:6segy(arg1; kwargs...)- segy.jl:7