Skip to content

Commit 26b2fef

Browse files
committed
fix: rename azimuthplunge to plungeazimuth
1 parent d9c6c75 commit 26b2fef

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

LoopStructural/utils/maths.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ def strikedip2vector(strike: NumericInput, dip: NumericInput) -> np.ndarray:
2929
return vec
3030

3131

32-
def azimuthplunge2vector(
33-
plunge_dir: NumericInput,
32+
def plungeazimuth2vector(
3433
plunge: NumericInput,
34+
azimuth: NumericInput,
3535
degrees: bool = True,
3636
) -> np.ndarray:
3737
"""Convert plunge and plunge direction to a vector
3838
3939
Parameters
4040
----------
41-
plunge_dir : Union[np.ndarray, list]
41+
azimuth : Union[np.ndarray, list]
4242
array or array like of plunge direction values
4343
plunge : Union[np.ndarray, list]
4444
array or array like of plunge values
@@ -52,16 +52,16 @@ def azimuthplunge2vector(
5252
plunge = np.array([plunge], dtype=float)
5353
else:
5454
plunge = np.array(plunge, dtype=float)
55-
if isinstance(plunge_dir, numbers.Number):
56-
plunge_dir = np.array([plunge_dir], dtype=float)
55+
if isinstance(azimuth, numbers.Number):
56+
azimuth = np.array([azimuth], dtype=float)
5757
else:
58-
plunge_dir = np.array(plunge_dir, dtype=float)
58+
azimuth = np.array(azimuth, dtype=float)
5959
if degrees:
6060
plunge = np.deg2rad(plunge)
61-
plunge_dir = np.deg2rad(plunge_dir)
61+
azimuth = np.deg2rad(azimuth)
6262
vec = np.zeros((len(plunge), 3))
63-
vec[:, 0] = np.sin(plunge_dir) * np.cos(plunge)
64-
vec[:, 1] = np.cos(plunge_dir) * np.cos(plunge)
63+
vec[:, 0] = np.sin(azimuth) * np.cos(plunge)
64+
vec[:, 1] = np.cos(azimuth) * np.cos(plunge)
6565
vec[:, 2] = -np.sin(plunge)
6666
return vec
6767

0 commit comments

Comments
 (0)