fracspy.mtinversion.greensfunction.collect_source_angles#

fracspy.mtinversion.greensfunction.collect_source_angles(x, y, z, recs)[source]#

Angles between sources and receivers

Compute angles between sources in a regular 3-dimensional grid and receivers

Parameters:
xnumpy.ndarray

X-axis

ynumpy.ndarray

Y-axis

znumpy.ndarray

Z-axis

recsnumpy.ndarray

Receiver locations of size \(3 \times n_r\)

Returns:
cosine_sourceanglesnumpy.ndarray

Cosine source angles of size \(3 \times n_r \times n_x \times n_y \times n_z\)

distsnumpy.ndarray

Distances of size \(\times n_r \times n_x \times n_y \times n_z\)

Notes

This routine computes the cosine source angles and distances between any pair of sources and receivers.

Cosine source angles are defined as follows:

\[\begin{split}cos(\theta_x) = (x_s - x_r) / d \\ cos(\theta_y) = (y_s - y_r) / d \\ cos(\theta_z) = (z_s - z_r) / d \\\end{split}\]

where \(d=\sqrt{(x_s - x_r)^2+(y_s - y_r)^2+(z_s - z_r)^2+}\) are the distances.