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:
- x
numpy.ndarray
X-axis
- y
numpy.ndarray
Y-axis
- z
numpy.ndarray
Z-axis
- recs
numpy.ndarray
Receiver locations of size \(3 \times n_r\)
- x
- Returns:
- cosine_sourceangles
numpy.ndarray
Cosine source angles of size \(3 \times n_r \times n_x \times n_y \times n_z\)
- dists
numpy.ndarray
Distances of size \(\times n_r \times n_x \times n_y \times n_z\)
- cosine_sourceangles
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.