resqpy 4.8.1__py3-none-any.whl → 4.8.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- resqpy/__init__.py +1 -1
- resqpy/olio/triangulation.py +15 -6
- {resqpy-4.8.1.dist-info → resqpy-4.8.2.dist-info}/METADATA +1 -1
- {resqpy-4.8.1.dist-info → resqpy-4.8.2.dist-info}/RECORD +6 -6
- {resqpy-4.8.1.dist-info → resqpy-4.8.2.dist-info}/LICENSE +0 -0
- {resqpy-4.8.1.dist-info → resqpy-4.8.2.dist-info}/WHEEL +0 -0
resqpy/__init__.py
CHANGED
resqpy/olio/triangulation.py
CHANGED
@@ -726,7 +726,7 @@ def triangulated_polygons(p, v, centres = None):
|
|
726
726
|
return points, triangles
|
727
727
|
|
728
728
|
|
729
|
-
def reorient(points, rough = True, max_dip = None, use_linalg = True):
|
729
|
+
def reorient(points, rough = True, max_dip = None, use_linalg = True, sample = 500):
|
730
730
|
"""Returns a reoriented copy of a set of points, such that z axis is approximate normal to average plane of points.
|
731
731
|
|
732
732
|
arguments:
|
@@ -736,6 +736,7 @@ def reorient(points, rough = True, max_dip = None, use_linalg = True):
|
|
736
736
|
max_dip (float, optional): if present, the reorientation of perspective off vertical is
|
737
737
|
limited to this angle in degrees
|
738
738
|
use_linalg (bool, default True): if True, the numpy linear algebra svd function is used and rough is ignored
|
739
|
+
sample (int, default 500): downsample points to this number for the purposes of determining normal vector
|
739
740
|
|
740
741
|
returns:
|
741
742
|
numpy float array of the same shape as points, numpy xyz vector, numpy 3x3 matrix;
|
@@ -748,7 +749,9 @@ def reorient(points, rough = True, max_dip = None, use_linalg = True):
|
|
748
749
|
implicit xy & z units for points are assumed to be the same;
|
749
750
|
the function may typically be called prior to the Delauney triangulation, which uses an xy projection to
|
750
751
|
determine the triangulation;
|
751
|
-
the numpy linear algebra option seems to be memory intensive, not recommended
|
752
|
+
the numpy linear algebra option seems to be memory intensive, not recommended;
|
753
|
+
downsampling will occur (for normal vector determination) when the number of points exceeds double that
|
754
|
+
given in the sample argument; set sample to None to use all points for normal vector determination
|
752
755
|
"""
|
753
756
|
|
754
757
|
def best_angles(points, mid_x, mid_y, steps, d_theta):
|
@@ -780,8 +783,14 @@ def reorient(points, rough = True, max_dip = None, use_linalg = True):
|
|
780
783
|
|
781
784
|
assert points.ndim >= 2 and points.shape[-1] == 3
|
782
785
|
|
786
|
+
if sample is not None and len(points) > 2 * sample:
|
787
|
+
step = len(points) // sample
|
788
|
+
p = points[::step, :]
|
789
|
+
else:
|
790
|
+
p = points
|
791
|
+
|
783
792
|
if use_linalg:
|
784
|
-
normal_vector = linalg_normal_vector(
|
793
|
+
normal_vector = linalg_normal_vector(p)
|
785
794
|
incl = vec.inclination(normal_vector)
|
786
795
|
if incl == 0.0:
|
787
796
|
rotation_m = vec.no_rotation_matrix()
|
@@ -790,14 +799,14 @@ def reorient(points, rough = True, max_dip = None, use_linalg = True):
|
|
790
799
|
rotation_m = vec.tilt_3d_matrix(azi, incl)
|
791
800
|
else:
|
792
801
|
# coarse iteration trying a few different angles
|
793
|
-
best_x_rotation, best_y_rotation = best_angles(
|
802
|
+
best_x_rotation, best_y_rotation = best_angles(p, 0.0, 0.0, 7, 30.0)
|
794
803
|
|
795
804
|
# finer iteration searching around the best coarse rotation
|
796
|
-
best_x_rotation, best_y_rotation = best_angles(
|
805
|
+
best_x_rotation, best_y_rotation = best_angles(p, best_x_rotation, best_y_rotation, 5, 10.0)
|
797
806
|
|
798
807
|
if not rough:
|
799
808
|
# finer iteration searching around the best coarse rotation
|
800
|
-
best_x_rotation, best_y_rotation = best_angles(
|
809
|
+
best_x_rotation, best_y_rotation = best_angles(p, best_x_rotation, best_y_rotation, 7, 2.5)
|
801
810
|
|
802
811
|
rotation_m = vec.rotation_3d_matrix((best_x_rotation, 0.0, best_y_rotation))
|
803
812
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
resqpy/__init__.py,sha256=
|
1
|
+
resqpy/__init__.py,sha256=Zh3CSU4YDhZyyZNCbVFR7kXCGBKp7uGvRzZlXBy8xFk,555
|
2
2
|
resqpy/crs.py,sha256=iq0lO3aXzttmJBfuhUjS9IHlv8OV1wuByhFk0b4fvmI,24782
|
3
3
|
resqpy/derived_model/__init__.py,sha256=NFvMSOKI3cxmH7lAbddV43JjoUj-r2G7ExEfOqinD1I,1982
|
4
4
|
resqpy/derived_model/_add_edges_per_column_property_array.py,sha256=cpW3gwp6MSYIrtvFmCjoJXcyUsgGuCDbgmwlJCJebUs,6410
|
@@ -95,7 +95,7 @@ resqpy/olio/simple_lines.py,sha256=qaR11W5UPgRmtMeFQ-pXg0jOvkJZ_XPzSUpAXqeYtlc,1
|
|
95
95
|
resqpy/olio/time.py,sha256=LtoSIf1A6wunHSpDgKsSGEr0rbcSQyy35TgJvY37PrI,760
|
96
96
|
resqpy/olio/trademark.py,sha256=p_EWvUUnfalOA0RC94fSWMDgdGY9-FdZuGtAjg3wNcY,822
|
97
97
|
resqpy/olio/transmission.py,sha256=ojMRvzMOulb-S3FHnkR3ouIBTXA4knI0drDOt_WACso,61869
|
98
|
-
resqpy/olio/triangulation.py,sha256=
|
98
|
+
resqpy/olio/triangulation.py,sha256=i5jB342ub_7j6H4ft4q2iPTrnQa94hJ3jDHmdTzheFw,44768
|
99
99
|
resqpy/olio/uuid.py,sha256=JRMi-RZNeGm8tGNloIwTATzNtdj29lBQDV9OILboPRI,7324
|
100
100
|
resqpy/olio/vdb.py,sha256=lQYuK1kr1Wnucq2EoKgT6lrR7vloCemnCKZktzBcLUc,45231
|
101
101
|
resqpy/olio/vector_utilities.py,sha256=Oe5NGOnV_wNExlcevBnLdP30XbvTM-4YnLmbgM4bDDk,46253
|
@@ -192,7 +192,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
|
|
192
192
|
resqpy/well/blocked_well_frame.py,sha256=Lg7TgynfPv9WkklXTLt9VN6uBXWUqX1LI-Xmv_FBqYk,22555
|
193
193
|
resqpy/well/well_object_funcs.py,sha256=LdktgZ1X-ABQ2R-DArRxGK_Pf2OjrMr-bvH3dbXBFas,24743
|
194
194
|
resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
|
195
|
-
resqpy-4.8.
|
196
|
-
resqpy-4.8.
|
197
|
-
resqpy-4.8.
|
198
|
-
resqpy-4.8.
|
195
|
+
resqpy-4.8.2.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
|
196
|
+
resqpy-4.8.2.dist-info/METADATA,sha256=trapyc6jZxugi5SP-dSkBA_4n5L4gj-G4fIx4dJAmXk,4156
|
197
|
+
resqpy-4.8.2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
198
|
+
resqpy-4.8.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|