Skip to content

Refactor: Remove sampler dependency on MapData (github issue #168) #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

noellehmcheng
Copy link

I have made the following changes to remove the Sampler class dependency on MapData class:

  1. Moved get_value_from_raster_df and __value_from_raster from MapData to utils.py and renamed them to set_z_values_from_raster_df and value_from_raster
  2. Modified Sampler class to take datasets directly instead of the entire MapData object
  3. Updated the corresponding code to accommodate these changes
  • extract_geology_contacts in project.py
  • calculate_fault_orientations in project.py
  • summarise_fault_data in project.py
  • sample in SamplerDecimator class
  • compute in InterpolatedStructure class

Validation
I ran the code in map2loop-notebooks/Example 3- Local Source Data.ipynb and compared the returned result from set_z_values_from_raster_df function inside extract_geology_contacts. The results from the current master branch and the refactored code are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant