LoopStructural 1.0.4__zip
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.
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/__init__.py +33 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/__init__.py +12 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/__pycache__/_base.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/_base.py +65 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/claudius.csv +21049 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/claudiusbb.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/duplex.csv +126 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/duplexbb.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/intrusion.csv +1017 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/intrusionbb.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/onefoldbb.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/onefolddata.csv +2226 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/refolded_bb.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/datasets/data/refolded_fold.csv +2126 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__init__.py +31 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_fold_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/discrete_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/finite_difference_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/geological_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/operator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/piecewiselinear_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_grid.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/structured_tetra.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/__pycache__/surfe_wrapper.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/__init__.py +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/dsi_helper.c +27782 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/cython/dsi_helper.cp37-win_amd64.pyd +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/discrete_fold_interpolator.py +171 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/discrete_interpolator.py +551 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/finite_difference_interpolator.py +342 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/geological_interpolator.py +190 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/operator.py +60 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/piecewiselinear_interpolator.py +348 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/structured_grid.py +466 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/structured_tetra.py +638 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/interpolators/surfe_wrapper.py +117 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/__init__.py +46 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__init__.py +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/__pycache__/geological_model.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/core/geological_model.py +1351 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__init__.py +3 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_function_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/__pycache__/fault_segment.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_function.py +187 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_function_feature.py +75 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fault/fault_segment.py +270 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__init__.py +7 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/cross_product_geological_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/geological_feature_builder.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/region_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/structural_frame_builder.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/__pycache__/unconformity_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/cross_product_geological_feature.py +77 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/geological_feature.py +286 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/geological_feature_builder.py +329 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/region_feature.py +34 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/structural_frame.py +116 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/structural_frame_builder.py +179 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/features/unconformity_feature.py +69 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__init__.py +8 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/fold_rotation_angle_feature.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/foldframe.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/__pycache__/svariogram.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold.py +135 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold_rotation_angle.py +132 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/fold_rotation_angle_feature.py +57 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/foldframe.py +192 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/fold/svariogram.py +179 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__init__.py +14 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/exceptions.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/helper.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/map2loop.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/__pycache__/utils.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/exceptions.py +9 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/helper.py +378 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/map2loop.py +314 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/utils/utils.py +120 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__init__.py +19 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/map_viewer.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_plotter.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/model_visualisation.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/rotation_angle_plotter.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/__pycache__/sphinx_scraper.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/map_viewer.py +307 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/model_plotter.py +16 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/model_visualisation.py +1012 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/rotation_angle_plotter.py +82 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural/visualisation/sphinx_scraper.py +34 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural-1.0.4-py3.7.egg-info/PKG-INFO +10 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural-1.0.4-py3.7.egg-info/SOURCES.txt +60 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural-1.0.4-py3.7.egg-info/dependency_links.txt +1 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural-1.0.4-py3.7.egg-info/requires.txt +8 -0
- Miniconda/envs/loop/Lib/site-packages/LoopStructural-1.0.4-py3.7.egg-info/top_level.txt +2 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__init__.py +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/__init__.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_faults.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_fold.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_interpolator.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/__pycache__/test_refolded.cpython-37.pyc +0 -0
- Miniconda/envs/loop/Lib/site-packages/tests/test_faults.py +17 -0
- Miniconda/envs/loop/Lib/site-packages/tests/test_fold.py +57 -0
- Miniconda/envs/loop/Lib/site-packages/tests/test_interpolator.py +88 -0
- Miniconda/envs/loop/Lib/site-packages/tests/test_refolded.py +22 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Wrapper for using surfepy
|
|
3
|
+
"""
|
|
4
|
+
import sys, os
|
|
5
|
+
|
|
6
|
+
from LoopStructural.utils.helper import get_vectors
|
|
7
|
+
from .geological_interpolator import GeologicalInterpolator
|
|
8
|
+
|
|
9
|
+
import logging
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
import surfepy
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SurfeRBFInterpolator(GeologicalInterpolator):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
def __init__(self, method='single_surface'):
|
|
23
|
+
GeologicalInterpolator.__init__(self)
|
|
24
|
+
self.surfe = None
|
|
25
|
+
if method == 'single_surface':
|
|
26
|
+
logger.info("Using single surface interpolator")
|
|
27
|
+
self.surfe = surfepy.Surfe_API(1)
|
|
28
|
+
if method == 'Laujaunie':
|
|
29
|
+
logger.info("Using Laujaunie method")
|
|
30
|
+
self.surfe = surfepy.Surfe_API(2)
|
|
31
|
+
if method == 'horizons':
|
|
32
|
+
logger.info("Using surfe horizon")
|
|
33
|
+
self.surfe = surfepy.Surfe_API(4)
|
|
34
|
+
|
|
35
|
+
def add_gradient_ctr_pts(self):
|
|
36
|
+
points = self.get_gradient_constraints()
|
|
37
|
+
if points.shape[0] > 0:
|
|
38
|
+
logger.info("Adding ")
|
|
39
|
+
strike_vector, dip_vector = get_vectors(points[:, 3:6])
|
|
40
|
+
|
|
41
|
+
strike_vector = np.hstack([points[:, :3], strike_vector.T])
|
|
42
|
+
dip_vector = np.hstack([points[:, :3], dip_vector.T])
|
|
43
|
+
self.surfe.SetTangentConstraints(strike_vector)
|
|
44
|
+
self.surfe.SetTangentConstraints(dip_vector)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def add_norm_ctr_pts(self):
|
|
48
|
+
points = self.get_norm_constraints()
|
|
49
|
+
if points.shape[0]>0:
|
|
50
|
+
self.surfe.SetPlanarConstraints(points[:, :6])
|
|
51
|
+
|
|
52
|
+
def add_ctr_pts(self):
|
|
53
|
+
|
|
54
|
+
points = self.get_value_constraints()
|
|
55
|
+
if points.shape[0]> 0:
|
|
56
|
+
# self.surfe.SetInterfaceConstraints(points[:,:4])
|
|
57
|
+
for i in range(points.shape[0]):
|
|
58
|
+
|
|
59
|
+
self.surfe.AddInterfaceConstraint(points[i, 0], points[i, 1], points[i, 2], points[i, 3], )
|
|
60
|
+
|
|
61
|
+
def add_tangent_ctr_pts(self):
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
def _solve(self, **kwargs):
|
|
65
|
+
self.surfe.ComputeInterpolant()
|
|
66
|
+
|
|
67
|
+
def _setup_interpolator(self, **kwargs):
|
|
68
|
+
self.add_gradient_ctr_pts()
|
|
69
|
+
self.add_norm_ctr_pts()
|
|
70
|
+
self.add_ctr_pts()
|
|
71
|
+
self.add_tangent_ctr_pts()
|
|
72
|
+
|
|
73
|
+
kernel = kwargs.get("kernel", 'r3')
|
|
74
|
+
logger.info("Setting surfe RBF kernel to %s" % kernel)
|
|
75
|
+
regression = kwargs.get("regression_smoothing", 0.)
|
|
76
|
+
if regression > 0:
|
|
77
|
+
logger.info("Using regression smoothing %f" % regression)
|
|
78
|
+
|
|
79
|
+
greedy = kwargs.get("greedy", (0, 0))
|
|
80
|
+
|
|
81
|
+
if greedy[0] > 0 or greedy[1] > 0:
|
|
82
|
+
logger.info("Using greedy algorithm: inferface %f and angular %f" %
|
|
83
|
+
(greedy[0], greedy[1]))
|
|
84
|
+
self.surfe.SetRegressionSmoothin(True, greedy[0], greedy[1])
|
|
85
|
+
poly_order = kwargs.get('poly_order',None)
|
|
86
|
+
if poly_order:
|
|
87
|
+
logger.info("Setting poly order to %i"%poly_order)
|
|
88
|
+
self.surfe.SetPolynomialOrder(poly_order)
|
|
89
|
+
global_anisotropy = kwargs.get("anisotropy", False)
|
|
90
|
+
if global_anisotropy:
|
|
91
|
+
logger.info("Using global anisotropy")
|
|
92
|
+
self.surfe.SetGlobalAnisotropy(global_anisotropy)
|
|
93
|
+
radius = kwargs.get("radius",False)
|
|
94
|
+
if radius:
|
|
95
|
+
logger.info("Setting RBF radius to %f"%radius)
|
|
96
|
+
self.surfe.SetRBFShapeParameter(radius)
|
|
97
|
+
|
|
98
|
+
def update(self):
|
|
99
|
+
return self.surfe.InterpolantComputed()
|
|
100
|
+
|
|
101
|
+
def evaluate_value(self, evaluation_points):
|
|
102
|
+
evaluation_points = np.array(evaluation_points)
|
|
103
|
+
evaluated = np.zeros(evaluation_points.shape[0])
|
|
104
|
+
mask = np.any(evaluation_points == np.nan, axis=1)
|
|
105
|
+
|
|
106
|
+
if evaluation_points[~mask, :].shape[0] > 0:
|
|
107
|
+
evaluated[~mask] = self.surfe.EvaluateInterpolantAtPoints(
|
|
108
|
+
evaluation_points[~mask])
|
|
109
|
+
return evaluated
|
|
110
|
+
def evaluate_gradient(self, evaluation_points):
|
|
111
|
+
evaluation_points = np.array(evaluation_points)
|
|
112
|
+
evaluated = np.zeros(evaluation_points.shape)
|
|
113
|
+
mask = np.any(evaluation_points == np.nan, axis=1)
|
|
114
|
+
if evaluation_points[~mask, :].shape[0] > 0:
|
|
115
|
+
evaluated[~mask,:] = self.surfe.EvaluateVectorInterpolantAtPoints(
|
|
116
|
+
evaluation_points[~mask])
|
|
117
|
+
return evaluated
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Geological modelling classes and functions
|
|
3
|
+
|
|
4
|
+
Main API for creating a GeologicalModel
|
|
5
|
+
=======================================
|
|
6
|
+
.. autosummary::
|
|
7
|
+
:toctree: _autosummary
|
|
8
|
+
|
|
9
|
+
core.geological_model
|
|
10
|
+
|
|
11
|
+
Geological Features
|
|
12
|
+
===================
|
|
13
|
+
.. autosummary::
|
|
14
|
+
:toctree: _autosummary
|
|
15
|
+
|
|
16
|
+
features.geological_feature
|
|
17
|
+
features.geological_feature_builder
|
|
18
|
+
features.region_feature
|
|
19
|
+
features.unconformity_feature
|
|
20
|
+
features.structural_frame
|
|
21
|
+
features.structural_frame_builder
|
|
22
|
+
|
|
23
|
+
Folding classes
|
|
24
|
+
===============
|
|
25
|
+
.. autosummary::
|
|
26
|
+
:toctree: _autosummary
|
|
27
|
+
|
|
28
|
+
fold.fold
|
|
29
|
+
fold.fold_rotation_angle
|
|
30
|
+
fold.fold_rotation_angle_feature
|
|
31
|
+
fold.foldframe
|
|
32
|
+
fold.svariogram
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Fault classes
|
|
36
|
+
===============
|
|
37
|
+
|
|
38
|
+
.. autosummary::
|
|
39
|
+
:toctree: _autosummary
|
|
40
|
+
|
|
41
|
+
fault.fault_segment
|
|
42
|
+
fault.fault_function
|
|
43
|
+
fault.fault_function_feature
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
|
Miniconda/envs/loop/Lib/site-packages/LoopStructural/modelling/__pycache__/__init__.cpython-37.pyc
ADDED
|
Binary file
|
|
File without changes
|
|
Binary file
|