Calculating azimuth and dip #620
Unanswered
emurphy222000-jpg
asked this question in
Q&A
Replies: 4 comments
-
Hi @emurphy222000-jpg , not sure if your calculations are correct, but there is a function in GemPy called |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Jan. I will definitely look at that one. Seems I tried it once before and the my script did not recognize it, but will go back and try again. You have been a tremendous help.Ed
On Monday, June 14, 2021, 03:47:46 AM CDT, Jan von Harten ***@***.***> wrote:
Hi @emurphy222000-jpg ,
not sure if your calculations are correct, but there is a function in GemPy called create_orientation_from_surface_points, which might just do the trick for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi JanI get the following when I attempt to use create_orientation_from_surface_points. NameError: name 'create_orientation_from_surface_points' is not defined
perhaps I need a later installation of gempy. Which one would contain this function.Thank you,Ed
On Monday, June 14, 2021, 03:47:46 AM CDT, Jan von Harten ***@***.***> wrote:
Hi @emurphy222000-jpg ,
not sure if your calculations are correct, but there is a function in GemPy called create_orientation_from_surface_points, which might just do the trick for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Never mind on this one. I realize I have to create the Orientations class to use that routine.Ed
On Tuesday, June 15, 2021, 11:34:56 AM CDT, edward murphy ***@***.***> wrote:
Hi JanI get the following when I attempt to use create_orientation_from_surface_points. NameError: name 'create_orientation_from_surface_points' is not defined
perhaps I need a later installation of gempy. Which one would contain this function.Thank you,Ed
On Monday, June 14, 2021, 03:47:46 AM CDT, Jan von Harten ***@***.***> wrote:
Hi @emurphy222000-jpg ,
not sure if your calculations are correct, but there is a function in GemPy called create_orientation_from_surface_points, which might just do the trick for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to calculate dip and azimuth using two points in x,y,z space. I calculated the gradient at point one and from that I try to obtain the dip and azimuth. My code looks like this:
import gempy as gp
import numpy as np
import pandas as pd
import math
dfs=(pd.read_csv("C:\Users\17138\geoLOGIC\gridding\gempy\input_gempy.csv", sep=',', names=['X', 'Y', 'Z'],header=0))
xyz=dfs.values.tolist()
x1=xyz[0][0]
x2=xyz[1][0]
y1=xyz[0][1]
y2=xyz[1][1]
z1=xyz[0][2]
z2=xyz[1][2]
print ("x,y,z values of two distinct points: ",x1,x2,y1,y2,z1,z2)
seglen=math.sqrt((x2-x1)**2+(y2-y1)**2+(z2-z1)**2)
print (seglen)
agrad=(x2-x1)/seglen
bgrad=(y2-y1)/seglen
cgrad=(z2-z1)/seglen
print("gradient in x,y,z direction: ",agrad,bgrad,cgrad)
dip = np.degrees(np.arccos(cgrad)) % 360
azimuth = np.degrees(np.arctan2(agrad, bgrad)) % 360
print("dip: ",dip," azimuth:",azimuth)
Upon running I get the following output:
x,y,z values of two distinct points: 770919.216889751 766191.216889751 7033413.96520266 7034671.46849271 -1330.0 -1294.0
4892.503911545284 (segment length)
gradient in x,y,z direction: -0.9663763352018812 0.2570265272721167 0.007358195445699603
dip: 89.57840265164364 azimuth: 284.89411220637817
Is this the correct calculation or if not, what would you suggest?
Many thanks for your assistance.
Beta Was this translation helpful? Give feedback.
All reactions