gempy-project / gempy

GemPy is an open-source, Python-based 3-D structural geological modeling software, which allows the implicit (i.e. automatic) creation of complex geological models from interface and orientation data. It also offers support for stochastic modeling to address parameter and model uncertainties.
https://gempy.org
European Union Public License 1.2
965 stars 232 forks source link

FixOrientationdf #822

Closed AlexanderJuestel closed 1 year ago

AlexanderJuestel commented 1 year ago

Description

This PR adds the column 'surface' to the result of gp.get_data(geo_model, 'orientations', numeric=True). This way, it becomes easier to filter points by surfaces. If numeric=False, the dip and azimuth values are not provided.

image

A quick merge and patch release would be appreciated since I need this for my little hack for finite faults ;)

Relates to #821

Checklist

Japhiolite commented 1 year ago

Thing is...surface is not a numeric value but rather strings. numeric(bool): Return only the numerical values of the dataframe. This is much lighter database for storing traces

@Leguark any thoughts?

AlexanderJuestel commented 1 year ago

An alternative would be to do the following:

df1 = gp.get_data(geo_model, 'orientations', numeric=False)
df2 = gp.get_data(geo_model, 'orientations', numeric=True)
df1.merge(df2, how='inner')

This will give me the resulting DataFrame that I need.

Japhiolite commented 1 year ago

I'm not sure, what information you need...but, wouldn't geo_model.orientations.df be enough? That provides every single attribute of the orientations.

AlexanderJuestel commented 1 year ago

Yep, you are right, sorry for that