Public Documentation

Documentation for public SeisMain.jl public interface

Public interface

SeisMain.SegyToSeisFunction
SegyToSeis(filename_in,filename_out;<keyword arguments>)

Convert SEGY or SU data to seis format. The function needs input and output filenames.

Arguments

  • format="segy" : Options are segy or su
  • swap_bytes=true : If the flag equals true, the function swaps bytes
  • input_type="ibm" : Options are ibm or ieee

Credits: AS, 2015

source
SeisMain.SeisReadFunction
SeisRead(filename;<keyword arguments>)

Read seismic data from a given filename in seis format. The format is comprised of three elements:

  • a text file (data extent) with geometry information
  • a binary file containing data (@data@)
  • a binary file containing headers (@headers@)

Keyword arguments

  • group="all" : Options are all, some or gather
  • key=["imx","imy"]
  • itrace=1 : Number of trace where the function starts reading
  • ntrace=10000 : Total number of traces to read

Out

  • d: data as 2d array
  • h: headers as 1d array
  • extent: extent of the data (try fieldnames(Extent) to see the information this contains)

Example

d,h,ext = SeisRead(filename)

Credits: AS, 2015

source
SeisMain.SeisReadHeadersFunction
SeisReadHeaders(filename;<keyword arguments>)

Read the headers of a input file in seis format

Arguments

  • group="all" : Options are all, some or gather
  • key=[]
  • itrace=1 : Number of trace where the function starts reading
  • ntrace=100 : Total number of traces to read

Example

h = SeisRead(filename)

Credits: AS, 2015

source
SeisMain.SeisWriteFunction
SeisWrite(filename,d,h,extent;<keyword arguments>)

Write seismic data in seis format

Arguments

  • filename : Name of file to write/generate
  • d: seismic data
  • h::Array{Header,1}: headers as 1d array with elements of type Header
  • extent::Extent : extent of the data (try names(Extent) to see the information this contains)
  • itrace=1 : First trace number to write

Credits: AS, 2015

source
SeisMain.SeisWriteHeadersFunction
SeisWriteHeaders(filename,h;<keyword arguments>)

Write seismic headers in seis format

Arguments

  • itrace=1 : First trace number to write
  • update_tracenum=true

Credits: AS, 2015

source
SeisMain.SeisCopyFunction
SeisCopy(in,out)

Copy a seis input file to a seis output file. In and out should be of type AbstractString

Credits: AS, 2015

source
SeisMain.SeisHeaderInfoFunction
SeisHeaderInfo(filename;<keyword arguments>)

Print Seis header information to screen. The input is the name of the data file

Arguments

  • ntrace=nothing : Number of traces to analyze

Credits: AS, 2015

source
SeisMain.SeisToSegyFunction
SeisToSegy(filename_in,filename_out;<keyword arguments>)

Convert seis data to SU or SEGY format. The function needs input and output filenames.

Arguments

  • su=true : If the flag equals true, converts tu SU format, otherwise to SEGY format

Credits: AS, 2015

source
SeisMain.SeisRemoveFunction
SeisRemove(filename)

Delete a seis file (deletes the text file, binary data file, and binary header file if there is one)

Credits: AS, 2015

source
SeisMain.SeisWindowFunction
SeisWindow(in,out;<keyword arguments>)

Window a seis file using header words.

Arguments

  • in::String: filename of input
  • out::String: filename of output

Keyword arguments

  • key=[]
  • minval=[]
  • maxval=[]

note that windowing along the time axis is achieved by using the key "t".

Credits: AS, 2015

source
SeisMain.SeisWindowPatchFunction
SeisWindowPatch(in,out;<keyword arguments>)

Window a seis file using header words.

Arguments

  • in::String: filename of input
  • out::String: filename of output
  • key=[]: note that windowing along the time axis is achieved by using the key "t".
  • minval=[]
  • maxval=[]
  • it_nt=9e9

Credits: AS, FC, 2017

source
SeisMain.SeisPatchFunction
  SeisPatch(in,out;<keyword arguments>)

Creates overlapping 5d patches from a 5d volume

Arguments

  • in::String: input filename (data should have grid information in headers)
  • out::String: prefix for output filenames

Keyword arguments

  • style="sxsygxgy": bin style. Options: "mxmyhxhy","mxmyhaz","sxsyhxhy","gxgyhxhy","sxsyhaz","gxgyhaz"
  • min_isx=0,max_isx=0,min_isy=0,max_isy=0: grid extreme values for sources
  • min_igx=0,max_igx=0,min_igy=0,max_igy=0: grid extreme values for receivers
  • min_imx=0,max_imx=0,min_imy=0,max_imy=0: grid extreme values for midpoints
  • min_ihx=0,max_ihx=0,min_ihy=0,max_ihy=0: grid extreme values for offsets
  • min_ih=0,max_ih=0,min_iaz=0,max_iaz=0: grid extreme values for azimuth and offset
  • it_WL=9e9,it_WO=0 : length and overlapping samples in time patches
  • ix1_WL=9e9,ix1_WO=0:length and overlapping samples in first space dimension
  • ix2_WL=9e9,ix2_WO=0,ix3_WL=9e9,ix3_WO=0,ix4_WL=9e9,ix4_WO=0

Output

filename,npatch: String Array with the file name of the data patches, number of patches created

Credits: A. Stanton

source
SeisMain.SeisPatchProcessFunction
  SeisPatchProcess(in,out;<keyword arguments>)

Read data from disk, split into multidimensional overlapping patches, apply processes, merge patches with tapers, and write to disk.

Processing of patches can be done in parallel by running the code using (for example): julia -p 2 script_name.jl

Important Notice: You must make declare global variables f and fparam on every processor. You can do this in your main function by typing (for example): @everywhere global fparam = ["style"=>"mxmyhxhy", "Niter"=> 100, "alpha"=>1,"fmax"=>80] @everywhere global f = [SeisPOCS]

f is an array of functions that have the following syntax: d2, h2 = f(d1,h1,f_param), where param is a dictionary (Dict) of parameters for the function.

note that param should contain parameters for the patching and unpatching operations.

to execute the code type: julia -p 4 my_code.jl where 4 can be replaced with the number of processors you wish to use. Credits: A. Stanton

source
SeisMain.SeisUnPatchFunction
SeisUnPatch(in,out;<keyword arguments>)

Reconstruct a 5D data volume from a set of 5D data patches.

Arguments

  • in::Array{String,1}: array containing filename of patches
  • out::String: filename for reconstructed volume

Keyword arguments

  • style="sxsygxgy": bin style. Options: "mxmyhxhy","mxmyhaz","sxsyhxhy","gxgyhxhy","sxsyhaz","gxgyhaz"
  • min_isx=0,max_isx=0,min_isy=0,max_isy=0: grid extreme values for sources
  • min_igx=0,max_igx=0,min_igy=0,max_igy=0: grid extreme values for receivers
  • min_imx=0,max_imx=0,min_imy=0,max_imy=0: grid extreme values for midpoints
  • min_ihx=0,max_ihx=0,min_ihy=0,max_ihy=0: grid extreme values for offsets
  • min_ih=0,max_ih=0,min_iaz=0,max_iaz=0: grid extreme values for azimuth and offset
  • it_WL=9e9,it_WO=0 : length and overlapping samples in time patches
  • ix1_WL=9e9,ix1_WO=0:length and overlapping samples in first space dimension
  • ix2_WL=9e9,ix2_WO=0,ix3_WL=9e9,ix3_WO=0,ix4_WL=9e9,ix4_WO=0
  • nt=0: time samples of reconstructed cube
  • ang=90: inline direction measured in degrees CC from East
  • gamma=1: vp/vs ratio for PS Asymptotic Conversion Point gathers (use gamma=1 for PP data)
  • osx=0,osy=0,ogx=0,ogy=0 : origin for source and receiver coordinate system
  • omx=0,omy=0,ohx=0,ohy=0: origin for midpoint and offset coordinate system
  • oaz=0,oh=0 : origin for azimuth and offset coordinate system
  • dsx=1,dsy=1,dgx=1,dgy=1: source and receiver step-size
  • dmx=1,dmy=1,dhx=1,dhy=1: midpoint and offset step-size
  • dh=1,daz=1: offset and azimuth step-size

Output

In file out, the 5D reconstructed volume is created.

Credits: A. Stanton, F Carozzi, 2017

source
SeisMain.SeisGeometryFunction
SeisGeometry(in;<keyword arguments>)

Update headers with geometry information. Offsets and azimuths are calculated from source and receivers coordinates.

Arguments

  • in: input filename

Keyword arguments

  • ang=90: inline direction measured in degrees CC from East
  • gamma=1: vp/vs ratio for PS Asymptotic Conversion Point gathers (use gamma=1 for PP data)
  • osx=0,osy=0,ogx=0,ogy=0 : origin for source and receiver coordinate system
  • omx=0,omy=0,ohx=0,ohy=0: origin for midpoint and offset coordinate system
  • oaz=0,oh=0 : origin for azimuth and offset coordinate system
  • dsx=1,dsy=1,dgx=1,dgy=1: source and receiver step-size
  • dmx=1,dmy=1,dhx=1,dhy=1: midpoint and offset step-size
  • dh=1,daz=1: offset and azimuth step-size

Outputs

the @headers@ file is updated with the following information:

  • hx,hy,h,az,mx,my : calculated offset, azimuth and midpoint
  • isx,isy,igx,igy,imx,imy,ihx,ihy,ih,iaz: calculated grid nodes for source and receiver position and midpoint, offset and azimuth.

Credits: A. Stanton, 2017

source
SeisMain.SeisBinHeadersFunction
SeisBinHeaders(in,out; <keyword arguments>)

Sequentially bin seismic headers using the available grid information.

Keyword arguments should be consistent with SeisGeometry keyword arguments.

Arguments

  • in: filename of input, irregularly sampled data
  • out: filename of output, regularly sampled data

Keyword arguments

  • style="sxsygxgy": bin style. Options: "mxmyhxhy","mxmyhaz","sxsyhxhy","gxgyhxhy","sxsyhaz","gxgyhaz"
  • ang=90: inline direction measured in degrees CC from East
  • gamma=1: vp/vs ratio for PS Asymptotic Conversion Point gathers (use gamma=1 for PP data)
  • osx=0,osy=0,ogx=0,ogy=0 : origin for source and receiver coordinate system
  • omx=0,omy=0,ohx=0,ohy=0: origin for midpoint and offset coordinate system
  • oaz=0,oh=0 : origin for azimuth and offset coordinate system
  • dsx=1,dsy=1,dgx=1,dgy=1: source and receiver step-size
  • dmx=1,dmy=1,dhx=1,dhy=1: midpoint and offset step-size
  • dh=1,daz=1: offset and azimuth step-size
  • min_isx=0,max_isx=0,min_isy=0,max_isy=0: grid extreme values for sources
  • min_igx=0,max_igx=0,min_igy=0,max_igy=0: grid extreme values for receivers
  • min_imx=0,max_imx=0,min_imy=0,max_imy=0: grid extreme values for midpoints
  • min_ihx=0,max_ihx=0,min_ihy=0,max_ihy=0: grid extreme values for offsets
  • min_ih=0,max_ih=0,min_iaz=0,max_iaz=0: grid extreme values for azimuth and offset
  • ntrace=10000: maximum number of traces processed at a time

Output

In file out@headers@, binned headers are saved.

Credits: Aaron Stanton,2017

source
SeisMain.SeisBinDataFunction
SeisBinData(in,out; <keyword arguments>)

Sequentially bin seismic data using already binned trace headers. Input arguments should be consistent with SeisBinHeaders input arguments. See also: SeisBinHeaders

Arguments

  • in: filename of input, irregularly sampled data
  • out: filename of output, regularly sampled data

Keyword arguments

  • style="sxsygxgy": bin style. Options: "mxmyhxhy","mxmyhaz","sxsyhxhy","gxgyhxhy","sxsyhaz","gxgyhaz"
  • ang=90: inline direction measured in degrees CC from East
  • gamma=1: vp/vs ratio for PS Asymptotic Conversion Point gathers (use gamma=1 for PP data)
  • osx=0,osy=0,ogx=0,ogy=0 : origin for source and receiver coordinate system
  • omx=0,omy=0,ohx=0,ohy=0: origin for midpoint and offset coordinate system
  • oaz=0,oh=0 : origin for azimuth and offset coordinate system
  • dsx=1,dsy=1,dgx=1,dgy=1: source and receiver step-size
  • dmx=1,dmy=1,dhx=1,dhy=1: midpoint and offset step-size
  • dh=1,daz=1: offset and azimuth step-size
  • min_isx=0,max_isx=0,min_isy=0,max_isy=0: grid extreme values for sources
  • min_igx=0,max_igx=0,min_igy=0,max_igy=0: grid extreme values for receivers
  • min_imx=0,max_imx=0,min_imy=0,max_imy=0: grid extreme values for midpoints
  • min_ihx=0,max_ihx=0,min_ihy=0,max_ihy=0: grid extreme values for offsets
  • min_ih=0,max_ih=0,min_iaz=0,max_iaz=0: grid extreme values for azimuth and offset
  • ntrace=10000: maximum number of traces processed at a time

Output

In file out, the binned data is saved.

Credits: Aaron Stanton, 2017

source
SeisMain.SeisProcessFunction
  SeisProcess(in,out,operators,parameters;<keyword arguments>)

Run processing flows that read and write from disk

f is a function that has the following syntax: d2,h2 = f(d1,h1,e1,param), where param is list of keyword arguments for the function. Note that f can be a vector of functions. They will be executed sequentially on the same group of traces.

Arguments

  • in::String: input filename
  • out::String: output filenames
  • key=[]
source
SeisMain.SeisSortFunction
SeisSort(in, out;<keyword arguments>)

Sort a seis file using its header words

Arguments

  • in: input filename >> a text file with information about data extent, data and header file names; a binary file containing data and a binary file containing headers.
  • out: output filename

Keyword arguments

  • key=["imx","imy"]
  • rev=false : sort headers in decreasing order
  • ntrace=1000 : number of traces to read at a time

Output

file out is created with data sorted.

Credits: AS, 2015

source
SeisMain.ReadSegyHeaderFunction
ReadSegyHeader(filename;<keyword arguments>)

Read the headers of a input file in segy format

Arguments

  • group="all" : Options are all, some or gather
  • swap_bytes=true : If the flag equals true, the function swaps bytes
  • key=[]
  • minval=0
  • maxval=0
source
SeisMain.SegyHeaderInfoFunction
    SegyHeaderInfo(filename_in)

Print segy header information to screen. The input is the name of the headers file

source
SeisMain.download_if_neededFunction
download_if_needed(url::String, output::String, sha256sum::String)

Download the file from url to output if the file is not already present or if its SHA256 checksum does not match the sha256sum.

Arguments

  • url::String: The URL from which to download the file.
  • output::String: The path where the downloaded file will be saved.

Keyword arguments

  • sha256sum::String: The expected SHA256 checksum of the file to ensure its integrity.

Output

  • nothing: This function returns nothing. It performs the side effect of downloading a file and verifying its checksum. If the checksum does not match, the function raises an error and deletes the downloaded file.

Credits: Átila Saraiva Quintela Soares, 2024

source