pykonal.solver.EikonalSolver

class pykonal.solver.EikonalSolver

The core class of PyKonal for solving the Eikonal equation.

import numpy as np
import pykonal

# Instantiate EikonalSolver object.
solver = pykonal.solver.EikonalSolver(coord_sys="cartesian")
# Initialize EikonalSolver object's velocity attribute.
solver.velocity.min_coords = 0, 0, 0
solver.velocity.node_intervals = 1, 1, 1
solver.velocity.npts = 16, 16, 16
solver.velocity.values = np.ones(solver.velocity.npts)
# Initialize the traveltime field with a source at node with
# index (0, 0, 0).
src_idx = (0, 0, 0)
# Remove source node from *Unknown*
solver.unknown[src_idx] = False
# Add source node to *Trial*.
solver.trial.push(*src_idx)
# Solve the system.
solver.solve()
# Extract the traveltime values.
tt = solver.traveltime.values
solve(self)

Solve the Eikonal equation using the FMM.

Returns

Returns True upon successful execution.

Return type

bool

trace_ray(self, end)

An alias to self.traveltime.trace_ray().

coord_sys

[Read only, str] Coordinate system of solver {“Cartesian”, “spherical”}.

known

[Read/Write, numpy.ndarray(shape=(N0,N1,N2), dtype=numpy.bool)] 3D array of booleans indicating whether nodes are in Known.

norm

Deprecated since version 0.3.2: Use self.velocity.norm or self.traveltime.velocity instead.

[Read-only, numpy.ndarray(shape=(N0,N1,N2,3), dtype=numpy.float)] 4D array of scaling factors for gradient operator.

step_size

Deprecated since version 0.3.2: Use self.velocity.step_size of self.traveltime.step_size instead.

[Read only, float] Step size used for ray tracing.

traveltime

[Read/Write, pykonal.fields.ScalarField3D] 3D array of traveltime values.

trial

[Read/Write, pykonal.heapq.Heap] Heap of node indices in Trial.

tt

[Read/Write, pykonal.fields.ScalarField3D] Alias for self.traveltime.

unknown

[Read/Write, numpy.ndarray(shape=(N0,N1,N2), dtype=numpy.bool)] 3D array of booleans indicating whether nodes are in Unknown.

velocity

[Read/Write, pykonal.fields.ScalarField3D] 3D array of velocity values.

vv

[Read/Write, pykonal.fields.ScalarField3D] Alias for self.velocity.