Merged
Conversation
sungeunbae
reviewed
Nov 5, 2024
sungeunbae
reviewed
Nov 5, 2024
Contributor
AndrewRidden-Harper
left a comment
There was a problem hiding this comment.
Looks great. I just left one small text suggestion
Co-authored-by: AndrewRidden-Harper <52001209+AndrewRidden-Harper@users.noreply.github.com>
AndrewRidden-Harper
approved these changes
Nov 8, 2024
sungeunbae
approved these changes
Nov 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds the ability to read the New Zealand Community Fault Model, and provides a function to estimate the most likely nodal plane of a GCMT solution based on nearby faults in the community model.
An Example of the Solution Classification
Reading the Community Fault Model
The model is stored with the package as data, and can be loaded with
community_fault_model.get_community_fault_model(). This loads all 880 faults as an array and parses every field of the model into a list ofCommunityFaultobjects. All of the magic numbers in the fault model have been turned to into documented human-readable enumerations. The trace of the fault is turned into a shapely geometry and can be used to compute distances to points, etc. The nodal plane model makes use of this to select the closest points.Load as a GeoPandas Dataframe
Testing
The
test_community_fault_model.pyfile contains two tests: first to load the model and check it read all 880 faults, and the second to evaluate the model and ensure it correctly classifies at least 75 of the 99 nodal planes in the solution set. In practice, the model correctly classifies around 80.