fatiando.seismic.ttime2d
)¶Calculate travel-times of seismic waves in 2D.
straight
: Calculate the travel-time of a
straight ray through a mesh of square cellsfatiando.seismic.ttime2d.
straight
(cells, prop, srcs, recs, velocity=None, par=False)[source]¶Calculate the travel times inside a mesh of square cells between source and receiver pairs assuming the rays are straight lines (no refraction or reflection).
Note
Don’t care about the units as long they are compatible.
For a homogeneous model, cells can be a list with only one big cell.
Parameters:
fatiando.mesher.Square
The velocity model to use to trace the straight rays. Cells must have
the physical property given in parameter prop. This will be used
as the velocity of each cell. (cells can also be a
SquareMesh
)
Which physical property of the cells to use as velocity.
Normaly one would choose 'vp'
or 'vs'
List with [x, y] coordinate pairs of the wave sources.
List with [x, y] coordinate pairs of the receivers sources
If not None, will use this value instead of the prop of cells as the velocity. Useful when building sensitivity matrices (use velocity = 1).
If True, will run the calculations in parallel using all the cores available. Not recommended for Jacobian matrix building!
srcs and recs are lists of source-receiver pairs. Each source in srcs is associated with the corresponding receiver in recs for a given travel time.
For example:
>>> # One source was recorded at 3 receivers.
>>> # The medium is homogeneous and can be
>>> # represented by a single Square
>>> from fatiando.mesher import Square
>>> cells = [Square([0, 10, 0, 10], {'vp':2})]
>>> src = (5, 0)
>>> srcs = [src, src, src]
>>> recs = [(0, 0), (5, 10), (10, 0)]
>>> print straight(cells, 'vp', srcs, recs)
[ 2.5 5. 2.5]
Returns:
The total times each ray took to get from a source to a receiver (in compatible units with prop)