Loop3D / LoopStructural

LoopStructural is an open-source 3D structural geological modelling library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Applying a dataset with coordinates, Dip and Azimuth[Question]

mustaeenqazi opened this issue · comments

Hi,
For my work i need to use a data set which has two types of data, First one has XYZ coordinates of foliations/geological surfaces and their Dip and Azimuth and the second has surface points XYZ, without any directional information. I want to use this data for modelling with loopstructural 3D. How can i calculate the gradient norms nx,ny,nz , with my available data. Thanks

This problem is solved, for others who have similar issues see: LoopStructural/modelling/core/geological_model.py line 364-370, the dip and strike are converted to vectors.
##code:

if 'strike' in self.data and 'dip' in self.data:
logger.info('Converting strike and dip to vectors')
mask = np.all(~np.isnan(self.data.loc[:, ['strike', 'dip']]),
axis=1)
self.data.loc[mask, gradient_vec_names()] = strike_dip_vector(
self.data.loc[mask, 'strike'], self.data.loc[mask, 'dip'])
self.data.drop(['strike', 'dip'], axis=1, inplace=True)