Eikonal 3D#

class fteikpy.Eikonal3D(grid, gridsize, origin=None)[source]#

3D Eikonal solver.

Parameters:
  • grid (array_like) – Velocity model array.

  • gridsize (array_like) – Grid size (dz, dx, dy).

  • origin (array_like or None, optional, default None) – Grid origin coordinates.

__call__(points, fill_value=nan)#

Trilinear interpolaton.

Parameters:
  • points (array_like) – Query point coordinates or list of point coordinates.

  • fill_value (scalar, optional, default nan) – Returned value for out-of-bound query points.

Returns:

Interpolated value(s).

Return type:

scalar or np.ndarray

property grid#

Return grid.

property gridsize#

Return grid size.

property ndim#

Return grid number of dimensions.

property origin#

Return grid origin coordinates.

resample(new_shape, method='linear')#

Resample grid.

Parameters:
  • new_shape (array_like) – New grid shape (nz, nx, ny).

  • method (str ('linear' or 'nearest'), optional, default 'linear') – Interpolation method.

property shape#

Return grid shape.

property size#

Return grid size.

smooth(sigma)#

Smooth grid.

Parameters:

sigma (scalar or array_like) – Standard deviation in meters for Gaussian kernel.

solve(sources, nsweep=2, return_gradient=False)[source]#

Solve Eikonal for given sources.

Parameters:
  • sources (array_like) – Source coordinates or list of source coordinates.

  • nsweep (int, optional, default 2) – Number of sweeps.

  • return_gradient (bool, optional, default False) – If True, directions of gradient are computed at runtime. However, this option uses more memory as the gradient grid is saved. Gradient grids are required for a posteriori ray-tracing.

Returns:

Traveltime grid or list of traveltime grids.

Return type:

fteikpy.TraveltimeGrid3D or list of fteikpy.TraveltimeGrid3D

property xaxis#

Return grid X axis.

property yaxis#

Return grid Y axis.

property zaxis#

Return grid Z axis.