LoopStructural 1.6.13__tar.gz → 1.6.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of LoopStructural might be problematic. Click here for more details.

Files changed (143) hide show
  1. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datatypes/_bounding_box.py +1 -0
  2. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/__init__.py +10 -2
  3. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_finite_difference_interpolator.py +18 -12
  4. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_p1interpolator.py +1 -1
  5. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_3d_structured_grid.py +3 -2
  6. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/__init__.py +11 -3
  7. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/_geological_feature_builder.py +1 -1
  8. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fault/_fault_function.py +1 -1
  9. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/__init__.py +1 -0
  10. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/helper.py +1 -24
  11. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/maths.py +74 -17
  12. loopstructural-1.6.14/LoopStructural/version.py +1 -0
  13. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural.egg-info/PKG-INFO +1 -1
  14. {loopstructural-1.6.13 → loopstructural-1.6.14}/PKG-INFO +1 -1
  15. loopstructural-1.6.13/LoopStructural/version.py +0 -1
  16. {loopstructural-1.6.13 → loopstructural-1.6.14}/LICENSE +0 -0
  17. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/__init__.py +0 -0
  18. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/__init__.py +0 -0
  19. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/_base.py +0 -0
  20. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/_example_models.py +0 -0
  21. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/claudius.csv +0 -0
  22. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/claudiusbb.txt +0 -0
  23. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/duplex.csv +0 -0
  24. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/duplexbb.txt +0 -0
  25. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/fault_trace/fault_trace.cpg +0 -0
  26. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/fault_trace/fault_trace.dbf +0 -0
  27. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/fault_trace/fault_trace.prj +0 -0
  28. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/fault_trace/fault_trace.shp +0 -0
  29. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/fault_trace/fault_trace.shx +0 -0
  30. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/bbox.csv +0 -0
  31. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/contacts.csv +0 -0
  32. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/fault_displacement.csv +0 -0
  33. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/fault_edges.txt +0 -0
  34. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/fault_locations.csv +0 -0
  35. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/fault_orientations.csv +0 -0
  36. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/stratigraphic_order.csv +0 -0
  37. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/stratigraphic_orientations.csv +0 -0
  38. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/geological_map_data/stratigraphic_thickness.csv +0 -0
  39. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/intrusion.csv +0 -0
  40. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/intrusionbb.txt +0 -0
  41. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/onefoldbb.txt +0 -0
  42. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/onefolddata.csv +0 -0
  43. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/refolded_bb.txt +0 -0
  44. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/refolded_fold.csv +0 -0
  45. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datasets/data/tabular_intrusion.csv +0 -0
  46. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datatypes/__init__.py +0 -0
  47. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datatypes/_point.py +0 -0
  48. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datatypes/_structured_grid.py +0 -0
  49. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/datatypes/_surface.py +0 -0
  50. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/export/exporters.py +0 -0
  51. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/export/file_formats.py +0 -0
  52. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/export/geoh5.py +0 -0
  53. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/export/gocad.py +0 -0
  54. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/export/omf_wrapper.py +0 -0
  55. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_api.py +0 -0
  56. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_builders.py +0 -0
  57. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_cython/__init__.py +0 -0
  58. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_discrete_fold_interpolator.py +0 -0
  59. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_discrete_interpolator.py +0 -0
  60. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_geological_interpolator.py +0 -0
  61. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_interpolator_builder.py +0 -0
  62. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_interpolator_factory.py +0 -0
  63. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_operator.py +0 -0
  64. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_p2interpolator.py +0 -0
  65. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/_surfe_wrapper.py +0 -0
  66. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_2d_base_unstructured.py +0 -0
  67. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_2d_p1_unstructured.py +0 -0
  68. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_2d_p2_unstructured.py +0 -0
  69. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_2d_structured_grid.py +0 -0
  70. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_2d_structured_tetra.py +0 -0
  71. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_3d_base_structured.py +0 -0
  72. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_3d_p2_tetra.py +0 -0
  73. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_3d_structured_tetra.py +0 -0
  74. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_3d_unstructured_tetra.py +0 -0
  75. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/__init__.py +0 -0
  76. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_aabb.py +0 -0
  77. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_base_support.py +0 -0
  78. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_face_table.py +0 -0
  79. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/interpolators/supports/_support_factory.py +0 -0
  80. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/core/__init__.py +0 -0
  81. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/core/geological_model.py +0 -0
  82. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/__init__.py +0 -0
  83. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_analytical_feature.py +0 -0
  84. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_base_geological_feature.py +0 -0
  85. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_cross_product_geological_feature.py +0 -0
  86. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_geological_feature.py +0 -0
  87. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_lambda_geological_feature.py +0 -0
  88. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_projected_vector_feature.py +0 -0
  89. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_region.py +0 -0
  90. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_structural_frame.py +0 -0
  91. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/_unconformity_feature.py +0 -0
  92. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/__init__.py +0 -0
  93. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/_base_builder.py +0 -0
  94. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/_fault_builder.py +0 -0
  95. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/_folded_feature_builder.py +0 -0
  96. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/builders/_structural_frame_builder.py +0 -0
  97. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fault/__init__.py +0 -0
  98. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fault/_fault_function_feature.py +0 -0
  99. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fault/_fault_segment.py +0 -0
  100. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/__init__.py +0 -0
  101. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/_fold.py +0 -0
  102. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/_fold_rotation_angle_feature.py +0 -0
  103. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/_foldframe.py +0 -0
  104. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/_svariogram.py +0 -0
  105. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/fold_function/__init__.py +0 -0
  106. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/fold_function/_base_fold_rotation_angle.py +0 -0
  107. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/fold_function/_fourier_series_fold_rotation_angle.py +0 -0
  108. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/fold_function/_lambda_fold_rotation_angle.py +0 -0
  109. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/features/fold/fold_function/_trigo_fold_rotation_angle.py +0 -0
  110. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/input/__init__.py +0 -0
  111. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/input/fault_network.py +0 -0
  112. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/input/map2loop_processor.py +0 -0
  113. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/input/process_data.py +0 -0
  114. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/input/project_file.py +0 -0
  115. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/__init__.py +0 -0
  116. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/geom_conceptual_models.py +0 -0
  117. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/geometric_scaling_functions.py +0 -0
  118. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/intrusion_builder.py +0 -0
  119. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/intrusion_feature.py +0 -0
  120. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/intrusion_frame_builder.py +0 -0
  121. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/modelling/intrusions/intrusion_support_functions.py +0 -0
  122. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/_surface.py +0 -0
  123. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/_transformation.py +0 -0
  124. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/colours.py +0 -0
  125. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/config.py +0 -0
  126. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/dtm_creator.py +0 -0
  127. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/exceptions.py +0 -0
  128. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/features.py +0 -0
  129. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/json_encoder.py +0 -0
  130. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/linalg.py +0 -0
  131. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/logging.py +0 -0
  132. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/regions.py +0 -0
  133. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/typing.py +0 -0
  134. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/utils/utils.py +0 -0
  135. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural/visualisation/__init__.py +0 -0
  136. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural.egg-info/SOURCES.txt +0 -0
  137. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural.egg-info/dependency_links.txt +0 -0
  138. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural.egg-info/requires.txt +0 -0
  139. {loopstructural-1.6.13 → loopstructural-1.6.14}/LoopStructural.egg-info/top_level.txt +0 -0
  140. {loopstructural-1.6.13 → loopstructural-1.6.14}/README.md +0 -0
  141. {loopstructural-1.6.13 → loopstructural-1.6.14}/pyproject.toml +0 -0
  142. {loopstructural-1.6.13 → loopstructural-1.6.14}/setup.cfg +0 -0
  143. {loopstructural-1.6.13 → loopstructural-1.6.14}/setup.py +0 -0
@@ -281,6 +281,7 @@ class BoundingBox:
281
281
  origin=origin,
282
282
  maximum=maximum,
283
283
  global_origin=self.global_origin,
284
+ nsteps=self.nsteps,
284
285
  dimensions=self.dimensions,
285
286
  )
286
287
 
@@ -83,8 +83,16 @@ from ..interpolators._p1interpolator import P1Interpolator
83
83
  try:
84
84
  from ..interpolators._surfe_wrapper import SurfeRBFInterpolator
85
85
  except ImportError:
86
- logger.warning("Surfe is not installed, SurfeRBFInterpolator will not be available")
87
- SurfeRBFInterpolator = None
86
+ class SurfeRBFInterpolator(GeologicalInterpolator):
87
+ """
88
+ Dummy class to handle the case where Surfe is not installed.
89
+ This will raise a warning when used.
90
+ """
91
+
92
+ def __init__(self, *args, **kwargs):
93
+ raise ImportError(
94
+ "Surfe cannot be imported. Please install Surfe. pip install surfe/ conda install -c loop3d surfe"
95
+ )
88
96
  interpolator_map = {
89
97
  InterpolatorType.BASE: GeologicalInterpolator,
90
98
  InterpolatorType.BASE_DISCRETE: DiscreteInterpolator,
@@ -454,22 +454,28 @@ class FiniteDifferenceInterpolator(DiscreteInterpolator):
454
454
  )
455
455
  self.up_to_date = False
456
456
 
457
- def add_regularisation(self, operator, w=0.1):
458
- """
459
457
 
460
- Parameters
461
- ----------
462
- operator
463
- w
464
458
 
465
- Returns
466
- -------
459
+ # def assemble_borders(self, operator, w, name='regularisation'):
460
+ # """
461
+ # Adds a constraint to the border of the model to force the value to be equal to the value at the border
467
462
 
468
- """
469
- self.assemble_inner(operator, w)
470
- # self.assemble_borders()
463
+ # Parameters
464
+ # ----------
465
+ # operator : Operator
466
+ # operator to use for the regularisation
467
+ # w : double
468
+ # weight of the regularisation
469
+
470
+ # Returns
471
+ # -------
472
+
473
+ # """
474
+ # # First get the global indicies of the pairs of neighbours this should be an
475
+ # # Nx27 array for 3d and an Nx9 array for 2d
476
+
477
+ # global_indexes = self.support.neighbour_global_indexes()
471
478
 
472
- # def assemble_borders(self, operator, w):
473
479
 
474
480
  def assemble_inner(self, operator, w, name='regularisation'):
475
481
  """
@@ -146,7 +146,7 @@ class P1Interpolator(DiscreteInterpolator):
146
146
  self.reset()
147
147
  for key in kwargs:
148
148
  if "regularisation" in kwargs:
149
- self.interpolation_weights["cgw"] = 0.1 * kwargs["regularisation"]
149
+ self.interpolation_weights["cgw"] = kwargs["regularisation"]
150
150
  self.up_to_date = False
151
151
  self.interpolation_weights[key] = kwargs[key]
152
152
  if self.interpolation_weights["cgw"] > 0.0:
@@ -437,8 +437,9 @@ class StructuredGrid(BaseStructuredSupport):
437
437
  T[:, 2, 6] = (1 - local_coords[:, 0]) * local_coords[:, 1]
438
438
  T[:, 2, 3] = -local_coords[:, 0] * local_coords[:, 1]
439
439
  T[:, 2, 7] = local_coords[:, 0] * local_coords[:, 1]
440
- T /= self.step_vector[0]
441
-
440
+ T[:, 0, :] /= self.step_vector[None, 0]
441
+ T[:, 1, :] /= self.step_vector[None, 1]
442
+ T[:, 2, :] /= self.step_vector[None, 2]
442
443
  return vertices, T, elements, inside
443
444
 
444
445
  def get_element_for_location(self, pos: np.ndarray):
@@ -22,6 +22,14 @@ from ..modelling.input import (
22
22
  try:
23
23
  from ..modelling.input.project_file import LoopProjectfileProcessor
24
24
  except (LoopImportError, ImportError):
25
- logger.warning(
26
- "Cannot use LoopProjectfileProcessor: Loop project file cannot be imported, try installing LoopProjectFile"
27
- )
25
+ class LoopProjectfileProcessor(ProcessInputData):
26
+ """
27
+ Dummy class to handle the case where LoopProjectFile is not installed.
28
+ This will raise a warning when used.
29
+ """
30
+
31
+ def __init__(self, *args, **kwargs):
32
+ raise LoopImportError(
33
+ "LoopProjectFile cannot be imported. Please install LoopProjectFile."
34
+ )
35
+
@@ -86,7 +86,7 @@ class GeologicalFeatureBuilder(BaseBuilder):
86
86
  self._orthogonal_features = {}
87
87
  self._equality_constraints = {}
88
88
  # add default parameters
89
- self.update_build_arguments({'cpw':1.0,'npw':1.0,'regularisation':1.0,'nelements':self.interpolator.n_elements})
89
+ self.update_build_arguments({'cpw':1.0,'npw':1.0,'regularisation':.10,'nelements':self.interpolator.n_elements})
90
90
  def set_not_up_to_date(self, caller):
91
91
  logger.info(
92
92
  f"Setting {self.name} to not up to date from an instance of {caller.__class__.__name__}"
@@ -12,7 +12,7 @@ logger = getLogger(__name__)
12
12
  def smooth_peak(x):
13
13
  v = np.zeros(x.shape)
14
14
  mask = np.logical_and(x >= -1, x <= 1)
15
- v[mask] = 0.25 * x[mask] ** 2 + 0.5 * x[mask] ** 4 - 1.75 * x[mask] ** 2 + 1
15
+ v[mask] = x[mask] ** 4 - 2 * x[mask] ** 2 + 1
16
16
  return v
17
17
 
18
18
  class FaultProfileFunction(metaclass=ABCMeta):
@@ -23,6 +23,7 @@ from .maths import (
23
23
  get_strike_vector,
24
24
  get_vectors,
25
25
  strikedip2vector,
26
+ plungeazimuth2vector,
26
27
  azimuthplunge2vector,
27
28
  normal_vector_to_strike_and_dip,
28
29
  rotate,
@@ -107,30 +107,7 @@ def get_data_bounding_box(xyz, buffer):
107
107
  return bb, region
108
108
 
109
109
 
110
- # def azimuthplunge2vector(
111
- # plunge: Union[np.ndarray, list], plunge_dir: Union[np.ndarray, list]
112
- # ) -> np.ndarray:
113
- # """Convert plunge and plunge direction to a vector
114
-
115
- # Parameters
116
- # ----------
117
- # plunge : Union[np.ndarray, list]
118
- # array or array like of plunge values
119
- # plunge_dir : Union[np.ndarray, list]
120
- # array or array like of plunge direction values
121
-
122
- # Returns
123
- # -------
124
- # np.array
125
- # nx3 vector
126
- # """
127
- # plunge = np.deg2rad(plunge)
128
- # plunge_dir = np.deg2rad(plunge_dir)
129
- # vec = np.zeros(3)
130
- # vec[0] = np.sin(plunge_dir) * np.cos(plunge)
131
- # vec[1] = np.cos(plunge_dir) * np.cos(plunge)
132
- # vec[2] = -np.sin(plunge)
133
- # return vec
110
+
134
111
 
135
112
 
136
113
  def create_surface(bounding_box, nstep):
@@ -28,20 +28,28 @@ def strikedip2vector(strike: NumericInput, dip: NumericInput) -> np.ndarray:
28
28
  vec /= np.linalg.norm(vec, axis=1)[:, None]
29
29
  return vec
30
30
 
31
-
32
31
  def azimuthplunge2vector(
32
+ plunge: NumericInput,
33
+ azimuth: NumericInput,
34
+ degrees: bool = True,
35
+ ) -> np.ndarray:
36
+ raise DeprecationWarning(
37
+ "azimuthplunge2vector is deprecated, use plungeazimuth2vector instead"
38
+ )
39
+
40
+ def plungeazimuth2vector(
33
41
  plunge: NumericInput,
34
- plunge_dir: NumericInput,
42
+ azimuth: NumericInput,
35
43
  degrees: bool = True,
36
44
  ) -> np.ndarray:
37
45
  """Convert plunge and plunge direction to a vector
38
46
 
39
47
  Parameters
40
48
  ----------
49
+ azimuth : Union[np.ndarray, list]
50
+ array or array like of plunge direction values
41
51
  plunge : Union[np.ndarray, list]
42
52
  array or array like of plunge values
43
- plunge_dir : Union[np.ndarray, list]
44
- array or array like of plunge direction values
45
53
 
46
54
  Returns
47
55
  -------
@@ -52,16 +60,16 @@ def azimuthplunge2vector(
52
60
  plunge = np.array([plunge], dtype=float)
53
61
  else:
54
62
  plunge = np.array(plunge, dtype=float)
55
- if isinstance(plunge_dir, numbers.Number):
56
- plunge_dir = np.array([plunge_dir], dtype=float)
63
+ if isinstance(azimuth, numbers.Number):
64
+ azimuth = np.array([azimuth], dtype=float)
57
65
  else:
58
- plunge_dir = np.array(plunge_dir, dtype=float)
66
+ azimuth = np.array(azimuth, dtype=float)
59
67
  if degrees:
60
68
  plunge = np.deg2rad(plunge)
61
- plunge_dir = np.deg2rad(plunge_dir)
69
+ azimuth = np.deg2rad(azimuth)
62
70
  vec = np.zeros((len(plunge), 3))
63
- vec[:, 0] = np.sin(plunge_dir) * np.cos(plunge)
64
- vec[:, 1] = np.cos(plunge_dir) * np.cos(plunge)
71
+ vec[:, 0] = np.sin(azimuth) * np.cos(plunge)
72
+ vec[:, 1] = np.cos(azimuth) * np.cos(plunge)
65
73
  vec[:, 2] = -np.sin(plunge)
66
74
  return vec
67
75
 
@@ -204,19 +212,21 @@ def get_vectors(normal: NumericInput) -> Tuple[np.ndarray, np.ndarray]:
204
212
 
205
213
 
206
214
  def get_strike_vector(strike: NumericInput, degrees: bool = True) -> np.ndarray:
207
- """Return the vector aligned with the strike direction
215
+ """Return strike direction vector(s) from strike angle(s).
208
216
 
209
217
  Parameters
210
218
  ----------
211
- strike : np.ndarray
212
- strike direction
219
+ strike : NumericInput
220
+ Single strike angle or array-like of strike angles, measured clockwise from North.
213
221
  degrees : bool, optional
214
- whether to return in degrees or radians, by default True
222
+ Whether the input angles are in degrees. If False, angles are assumed to be in radians.
223
+ Default is True.
215
224
 
216
225
  Returns
217
226
  -------
218
227
  np.ndarray
219
- vector aligned with strike direction
228
+ Array of shape (3, n) where each column is a 3D unit vector (x, y, z) representing
229
+ the horizontal strike direction. The z-component is always 0.
220
230
 
221
231
  """
222
232
  if isinstance(strike, numbers.Number):
@@ -236,6 +246,21 @@ def get_strike_vector(strike: NumericInput, degrees: bool = True) -> np.ndarray:
236
246
 
237
247
 
238
248
  def get_dip_vector(strike, dip):
249
+ """Return the dip vector based on strike and dip angles.
250
+
251
+ Parameters
252
+ ----------
253
+ strike : float
254
+ Strike angle in degrees, measured clockwise from North.
255
+ dip : float
256
+ Dip angle in degrees, measured from the horizontal plane.
257
+
258
+ Returns
259
+ -------
260
+ np.ndarray
261
+ Unit vector (length 3) representing the dip direction in 3D space.
262
+
263
+ """
239
264
  v = np.array(
240
265
  [
241
266
  -np.cos(np.deg2rad(-strike)) * np.cos(-np.deg2rad(dip)),
@@ -247,6 +272,23 @@ def get_dip_vector(strike, dip):
247
272
 
248
273
 
249
274
  def regular_tetraherdron_for_points(xyz, scale_parameter):
275
+ """Generate regular tetrahedrons centered at given 3D points.
276
+
277
+ Parameters
278
+ ----------
279
+ xyz : np.ndarray
280
+ Array of shape (n, 3) representing the coordinates of n points in 3D space,
281
+ which will serve as the centers of the generated tetrahedrons.
282
+ scale_parameter : float
283
+ Scaling factor controlling the size of the regular tetrahedrons.
284
+
285
+ Returns
286
+ -------
287
+ np.ndarray
288
+ Array of shape (n, 4, 3) representing n regular tetrahedrons, where each
289
+ tetrahedron has 4 vertices in 3D space, positioned relative to the corresponding center point.
290
+
291
+ """
250
292
  regular_tetrahedron = np.array(
251
293
  [
252
294
  [np.sqrt(8 / 9), 0, -1 / 3],
@@ -264,8 +306,23 @@ def regular_tetraherdron_for_points(xyz, scale_parameter):
264
306
 
265
307
 
266
308
  def gradient_from_tetrahedron(tetrahedron, value):
267
- """
268
- Calculate the gradient from a tetrahedron
309
+ """Compute the gradient of values within tetrahedral elements
310
+
311
+ Parameters
312
+ ----------
313
+ tetrahedron : np.ndarray
314
+ Array of shape (n, 4, 3) representing the coordinates of tetrahedral elements,
315
+ where each tetrahedron is defined by 4 vertices in 3D space.
316
+ value : np.ndarray
317
+ Array of shape (n, 4) representing the scalar values at the 4 vertices
318
+ of each tetrahedron.
319
+
320
+ Returns
321
+ -------
322
+ np.ndarray
323
+ Array of shape (n, 3) representing the gradient vector of the scalar field
324
+ inside each tetrahedral element.
325
+
269
326
  """
270
327
  tetrahedron = tetrahedron.reshape(-1, 4, 3)
271
328
  m = np.array(
@@ -0,0 +1 @@
1
+ __version__ = "1.6.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LoopStructural
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: 3D geological modelling
5
5
  Author-email: Lachlan Grose <lachlan.grose@monash.edu>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LoopStructural
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: 3D geological modelling
5
5
  Author-email: Lachlan Grose <lachlan.grose@monash.edu>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "1.6.13"
File without changes