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
986 stars 235 forks source link

[ENH] Improve Error Handling when formation names are not identical #904

Open AlexanderJuestel opened 5 months ago

AlexanderJuestel commented 5 months ago

Is your feature request related to a problem? Please describe. I was working with a very small dataset and got a very cryptic error message when executing gp.create_geomodel(..).

My mistake was that I had misspelled a formation name in the orientations file (German, English) which could not be found in the name_id_map of the surface points. The only error I get back is a KeyError with the name of the misspelled formation.

Describe the solution you'd like A little helper function that checks if the formation names are identical in both the orientation file and the surface points file and returns a useful error message.

Describe alternatives you've considered Fixing the spelling mistake

Leguark commented 5 months ago

Hey Alex, can you jump in and capture the error and raise a better error exactly were it breaks? It is easier for you to make the changes that for me trying to reproduce it first.

Cheers