Eikonal 2D#
- class fteikpy.Eikonal2D(grid, gridsize, origin=None)[source]#
2D Eikonal solver.
- Parameters:
grid (array_like) – Velocity model array.
gridsize (array_like) – Grid size (dz, dx).
origin (array_like or None, optional, default None) – Grid origin coordinates.
- __call__(points, fill_value=nan)#
Bilinear interpolation.
- 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).
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.TraveltimeGrid2D
or list offteikpy.TraveltimeGrid2D
- property xaxis#
Return grid X axis.
- property zaxis#
Return grid Z axis.