In [4]:
using Seismic,PyPlot

# Manipulation of data and binning (Fernanda Carozzi)

In [5]:
download("http://seismic.physics.ualberta.ca/data/prestack_section.su","section.su");


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 65.8M  100 65.8M    0     0  10.3M      0  0:00:06  0:00:06 --:--:-- 11.2M

In [6]:
SegyToSeis("section.su","section",format="su",input_type="ieee");


number of traces: 55476
number of samples per trace: 251

In [7]:
d,h,ext=SeisRead("section");

In [9]:
SeisPlotCoordinates(h,title="Acquisition geometry", xlabel="X(m)",ylabel="Y(m)")


Out[9]:
PyObject <matplotlib.collections.PathCollection object at 0x13206cf50>

In [23]:
# Plot subset of prestack volume

SeisPlot(d[:,1000:2000],xlabel="Trace",ylabel="Time(s)", dy=0.002,oy=0.3,title="Subset of data",ox=1500,wbox=10)


Out[23]:
PyObject <matplotlib.image.AxesImage object at 0x134cdc950>

In [14]:
# Set parameter for binned geometry

param1 = Dict( :dmx=>15, :dmy=>15, :dh=>30, :daz=>45 );
 
param2 = Dict(:style=>"mxmyhaz", :min_imx=>10,:max_imx=>100, :min_imy=>35, :max_imy=>45,
               :min_ih=>1, :max_ih=>6, :min_iaz=>0, :max_iaz=>7);

In [15]:
# add desired  binned geometry to headers without destroying s-r position of traces

SeisGeometry("section"; param1...)

In [16]:
#  Does the binning only on headers - prepares headers of binned data for qc if necessary 

SeisBinHeaders("section","section_bin"; param1..., param2...);


nt= 251
The final binned cube will have an approximate size of 0.048 Gb

In [18]:
# Does the actual binning

SeisBinData("section","section_bin"; param1..., param2...);

In [25]:
# Read binned volume 

db,hb,eb=SeisRead("section_bin");

In [28]:
# Check size of 5D prestack data tensor obtained by binning
# db = db[time, midpoint_x, midpoint_y, offset, Azimuth]
N =size(db)

# Plot one CMPx-CMPy bin with all offsets and azimuths


Out[28]:
(251, 91, 11, 6, 8)

In [39]:
SeisPlot(reshape(db[:,40,5,:,:], N[1],N[4]*N[5]), style="wiggles", title="CMPx-CMPy =40,5 all offets and azimuths")


Out[39]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x1381f4a90>