From 023f64bff1b1fb9b1e763f8e061cec0b40f598fa Mon Sep 17 00:00:00 2001 From: AlexanderJuestel Date: Thu, 17 Oct 2024 13:36:04 +0200 Subject: [PATCH] FixAzimuthCalculation --- gemgis/postprocessing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gemgis/postprocessing.py b/gemgis/postprocessing.py index 4031cc8e..cdfe72e1 100644 --- a/gemgis/postprocessing.py +++ b/gemgis/postprocessing.py @@ -566,9 +566,12 @@ def calculate_dip_and_azimuth_from_mesh( # Calculating the azimuths azimuths = [ - np.rad2deg(np.arctan(mesh["Normals"][i][0] / mesh["Normals"][i][1])) + 180 + np.rad2deg(np.arctan2(mesh["Normals"][i][0], mesh["Normals"][i][1])) for i in range(len(mesh["Normals"])) ] + + # Shifting values + azimuths[azimuths < 0] += 360 # Assigning dips and azimuths to scalars mesh["Dips [°]"] = dips