In [1]:
%pylab inline
from fatiando import gridder, vis
from fatiando.seismic import wavefd
In [2]:
# Make a wave source from a mexican hat wavelet
sources = [wavefd.MexHatSource(25, 25, 100, 0.5, delay=1.5)]
# Set the parameters of the finite difference grid
shape = (200, 200)
spacing = (250, 250)
area = (0, spacing[1]*shape[1], 0, spacing[0]*shape[0])
# Make a density and S wave velocity model
dens = 2700*ones(shape)
svel = 3000*ones(shape)
dt = 0.05
maxit = 400
In [3]:
%timeit -n 5 [u for u in wavefd.elastic_sh(spacing, shape, svel, dens, dt, maxit, sources, padding=0.5)]
In [4]:
def run():
for u in wavefd.elastic_sh(spacing, shape, svel, dens, dt, maxit, sources, padding=0.5):
continue
%prun -T seismic_wavefd.elastic_sh.profile run()
!cat seismic_wavefd.elastic_sh.profile
In [11]:
# Make a wave source from a mexican hat wavelet
sources = [wavefd.MexHatSource(25, 25, 100, 0.5, delay=1.5)]
# Set the parameters of the finite difference grid
shape = (100, 100)
spacing = (500, 500)
area = (0, spacing[1]*shape[1], 0, spacing[0]*shape[0])
# Make a density and S wave velocity model
dens = 2700*ones(shape)
svel = 3000*ones(shape)
pvel = 4000*ones(shape)
dt = 0.05
maxit = 300
In [12]:
%timeit -n 5 [u for u in wavefd.elastic_psv(spacing, shape, pvel, svel, dens, dt, maxit, sources, sources, padding=0.5)]
In [13]:
def run():
for u in wavefd.elastic_psv(spacing, shape, pvel, svel, dens, dt, maxit, sources, sources, padding=0.5):
continue
%prun -T seismic_wavefd.elastic_psv.profile run()
!cat seismic_wavefd.elastic_psv.profile
In [ ]: