LoopStructural 1.6.1__py3-none-any.whl
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.
- LoopStructural/__init__.py +52 -0
- LoopStructural/datasets/__init__.py +23 -0
- LoopStructural/datasets/_base.py +301 -0
- LoopStructural/datasets/_example_models.py +10 -0
- LoopStructural/datasets/data/claudius.csv +21049 -0
- LoopStructural/datasets/data/claudiusbb.txt +2 -0
- LoopStructural/datasets/data/duplex.csv +126 -0
- LoopStructural/datasets/data/duplexbb.txt +2 -0
- LoopStructural/datasets/data/fault_trace/fault_trace.cpg +1 -0
- LoopStructural/datasets/data/fault_trace/fault_trace.dbf +0 -0
- LoopStructural/datasets/data/fault_trace/fault_trace.prj +1 -0
- LoopStructural/datasets/data/fault_trace/fault_trace.shp +0 -0
- LoopStructural/datasets/data/fault_trace/fault_trace.shx +0 -0
- LoopStructural/datasets/data/geological_map_data/bbox.csv +2 -0
- LoopStructural/datasets/data/geological_map_data/contacts.csv +657 -0
- LoopStructural/datasets/data/geological_map_data/fault_displacement.csv +7 -0
- LoopStructural/datasets/data/geological_map_data/fault_edges.txt +2 -0
- LoopStructural/datasets/data/geological_map_data/fault_locations.csv +79 -0
- LoopStructural/datasets/data/geological_map_data/fault_orientations.csv +19 -0
- LoopStructural/datasets/data/geological_map_data/stratigraphic_order.csv +13 -0
- LoopStructural/datasets/data/geological_map_data/stratigraphic_orientations.csv +207 -0
- LoopStructural/datasets/data/geological_map_data/stratigraphic_thickness.csv +13 -0
- LoopStructural/datasets/data/intrusion.csv +1017 -0
- LoopStructural/datasets/data/intrusionbb.txt +2 -0
- LoopStructural/datasets/data/onefoldbb.txt +2 -0
- LoopStructural/datasets/data/onefolddata.csv +2226 -0
- LoopStructural/datasets/data/refolded_bb.txt +2 -0
- LoopStructural/datasets/data/refolded_fold.csv +205 -0
- LoopStructural/datasets/data/tabular_intrusion.csv +23 -0
- LoopStructural/datatypes/__init__.py +4 -0
- LoopStructural/datatypes/_bounding_box.py +422 -0
- LoopStructural/datatypes/_point.py +166 -0
- LoopStructural/datatypes/_structured_grid.py +94 -0
- LoopStructural/datatypes/_surface.py +184 -0
- LoopStructural/export/exporters.py +554 -0
- LoopStructural/export/file_formats.py +15 -0
- LoopStructural/export/geoh5.py +100 -0
- LoopStructural/export/gocad.py +126 -0
- LoopStructural/export/omf_wrapper.py +88 -0
- LoopStructural/interpolators/__init__.py +105 -0
- LoopStructural/interpolators/_api.py +143 -0
- LoopStructural/interpolators/_builders.py +149 -0
- LoopStructural/interpolators/_cython/__init__.py +0 -0
- LoopStructural/interpolators/_discrete_fold_interpolator.py +183 -0
- LoopStructural/interpolators/_discrete_interpolator.py +692 -0
- LoopStructural/interpolators/_finite_difference_interpolator.py +470 -0
- LoopStructural/interpolators/_geological_interpolator.py +380 -0
- LoopStructural/interpolators/_interpolator_factory.py +89 -0
- LoopStructural/interpolators/_non_linear_discrete_interpolator.py +0 -0
- LoopStructural/interpolators/_operator.py +38 -0
- LoopStructural/interpolators/_p1interpolator.py +228 -0
- LoopStructural/interpolators/_p2interpolator.py +277 -0
- LoopStructural/interpolators/_surfe_wrapper.py +174 -0
- LoopStructural/interpolators/supports/_2d_base_unstructured.py +340 -0
- LoopStructural/interpolators/supports/_2d_p1_unstructured.py +68 -0
- LoopStructural/interpolators/supports/_2d_p2_unstructured.py +288 -0
- LoopStructural/interpolators/supports/_2d_structured_grid.py +462 -0
- LoopStructural/interpolators/supports/_2d_structured_tetra.py +0 -0
- LoopStructural/interpolators/supports/_3d_base_structured.py +467 -0
- LoopStructural/interpolators/supports/_3d_p2_tetra.py +331 -0
- LoopStructural/interpolators/supports/_3d_structured_grid.py +470 -0
- LoopStructural/interpolators/supports/_3d_structured_tetra.py +746 -0
- LoopStructural/interpolators/supports/_3d_unstructured_tetra.py +637 -0
- LoopStructural/interpolators/supports/__init__.py +55 -0
- LoopStructural/interpolators/supports/_aabb.py +77 -0
- LoopStructural/interpolators/supports/_base_support.py +114 -0
- LoopStructural/interpolators/supports/_face_table.py +70 -0
- LoopStructural/interpolators/supports/_support_factory.py +32 -0
- LoopStructural/modelling/__init__.py +29 -0
- LoopStructural/modelling/core/__init__.py +0 -0
- LoopStructural/modelling/core/geological_model.py +1867 -0
- LoopStructural/modelling/features/__init__.py +32 -0
- LoopStructural/modelling/features/_analytical_feature.py +79 -0
- LoopStructural/modelling/features/_base_geological_feature.py +364 -0
- LoopStructural/modelling/features/_cross_product_geological_feature.py +100 -0
- LoopStructural/modelling/features/_geological_feature.py +288 -0
- LoopStructural/modelling/features/_lambda_geological_feature.py +93 -0
- LoopStructural/modelling/features/_region.py +18 -0
- LoopStructural/modelling/features/_structural_frame.py +186 -0
- LoopStructural/modelling/features/_unconformity_feature.py +83 -0
- LoopStructural/modelling/features/builders/__init__.py +5 -0
- LoopStructural/modelling/features/builders/_base_builder.py +111 -0
- LoopStructural/modelling/features/builders/_fault_builder.py +590 -0
- LoopStructural/modelling/features/builders/_folded_feature_builder.py +129 -0
- LoopStructural/modelling/features/builders/_geological_feature_builder.py +543 -0
- LoopStructural/modelling/features/builders/_structural_frame_builder.py +237 -0
- LoopStructural/modelling/features/fault/__init__.py +3 -0
- LoopStructural/modelling/features/fault/_fault_function.py +444 -0
- LoopStructural/modelling/features/fault/_fault_function_feature.py +82 -0
- LoopStructural/modelling/features/fault/_fault_segment.py +505 -0
- LoopStructural/modelling/features/fold/__init__.py +9 -0
- LoopStructural/modelling/features/fold/_fold.py +167 -0
- LoopStructural/modelling/features/fold/_fold_rotation_angle.py +149 -0
- LoopStructural/modelling/features/fold/_fold_rotation_angle_feature.py +67 -0
- LoopStructural/modelling/features/fold/_foldframe.py +194 -0
- LoopStructural/modelling/features/fold/_svariogram.py +188 -0
- LoopStructural/modelling/input/__init__.py +2 -0
- LoopStructural/modelling/input/fault_network.py +80 -0
- LoopStructural/modelling/input/map2loop_processor.py +165 -0
- LoopStructural/modelling/input/process_data.py +650 -0
- LoopStructural/modelling/input/project_file.py +84 -0
- LoopStructural/modelling/intrusions/__init__.py +25 -0
- LoopStructural/modelling/intrusions/geom_conceptual_models.py +142 -0
- LoopStructural/modelling/intrusions/geometric_scaling_functions.py +123 -0
- LoopStructural/modelling/intrusions/intrusion_builder.py +672 -0
- LoopStructural/modelling/intrusions/intrusion_feature.py +410 -0
- LoopStructural/modelling/intrusions/intrusion_frame_builder.py +971 -0
- LoopStructural/modelling/intrusions/intrusion_support_functions.py +460 -0
- LoopStructural/utils/__init__.py +38 -0
- LoopStructural/utils/_surface.py +143 -0
- LoopStructural/utils/_transformation.py +76 -0
- LoopStructural/utils/config.py +18 -0
- LoopStructural/utils/dtm_creator.py +17 -0
- LoopStructural/utils/exceptions.py +31 -0
- LoopStructural/utils/helper.py +292 -0
- LoopStructural/utils/json_encoder.py +18 -0
- LoopStructural/utils/linalg.py +8 -0
- LoopStructural/utils/logging.py +79 -0
- LoopStructural/utils/maths.py +245 -0
- LoopStructural/utils/regions.py +103 -0
- LoopStructural/utils/typing.py +7 -0
- LoopStructural/utils/utils.py +68 -0
- LoopStructural/version.py +1 -0
- LoopStructural/visualisation/__init__.py +11 -0
- LoopStructural-1.6.1.dist-info/LICENSE +21 -0
- LoopStructural-1.6.1.dist-info/METADATA +81 -0
- LoopStructural-1.6.1.dist-info/RECORD +129 -0
- LoopStructural-1.6.1.dist-info/WHEEL +5 -0
- LoopStructural-1.6.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
LoopStructural
|
|
3
|
+
==============
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
from logging.config import dictConfig
|
|
9
|
+
|
|
10
|
+
__all__ = ["GeologicalModel"]
|
|
11
|
+
import tempfile
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from .version import __version__
|
|
14
|
+
|
|
15
|
+
experimental = False
|
|
16
|
+
ch = logging.StreamHandler()
|
|
17
|
+
formatter = logging.Formatter("%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d -- %(message)s")
|
|
18
|
+
ch.setFormatter(formatter)
|
|
19
|
+
ch.setLevel(logging.WARNING)
|
|
20
|
+
loggers = {}
|
|
21
|
+
from .modelling.core.geological_model import GeologicalModel
|
|
22
|
+
from .interpolators._api import LoopInterpolator
|
|
23
|
+
from .datatypes import BoundingBox
|
|
24
|
+
from .utils import log_to_console, log_to_file, getLogger, rng, get_levels
|
|
25
|
+
|
|
26
|
+
logger = getLogger(__name__)
|
|
27
|
+
logger.info("Imported LoopStructural")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def setLogging(level="info"):
|
|
31
|
+
"""
|
|
32
|
+
Set the logging parameters for log file
|
|
33
|
+
|
|
34
|
+
Parameters
|
|
35
|
+
----------
|
|
36
|
+
filename : string
|
|
37
|
+
name of file or path to file
|
|
38
|
+
level : str, optional
|
|
39
|
+
'info', 'warning', 'error', 'debug' mapped to logging levels, by default 'info'
|
|
40
|
+
"""
|
|
41
|
+
import LoopStructural
|
|
42
|
+
|
|
43
|
+
logger = getLogger(__name__)
|
|
44
|
+
|
|
45
|
+
levels = get_levels()
|
|
46
|
+
level = levels.get(level, logging.WARNING)
|
|
47
|
+
LoopStructural.ch.setLevel(level)
|
|
48
|
+
|
|
49
|
+
for name in LoopStructural.loggers:
|
|
50
|
+
logger = logging.getLogger(name)
|
|
51
|
+
logger.setLevel(level)
|
|
52
|
+
logger.info(f'Set logging to {level}')
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Demo Datasets
|
|
3
|
+
=============
|
|
4
|
+
|
|
5
|
+
Various datasets used for documentation and tutorials.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from ._base import load_claudius
|
|
9
|
+
from ._base import load_grose2017
|
|
10
|
+
from ._base import load_grose2018
|
|
11
|
+
from ._base import load_grose2019
|
|
12
|
+
from ._base import load_laurent2016
|
|
13
|
+
from ._base import load_noddy_single_fold
|
|
14
|
+
from ._base import load_intrusion
|
|
15
|
+
from ._base import normal_vector_headers
|
|
16
|
+
from ._base import strike_dip_headers
|
|
17
|
+
from ._base import value_headers
|
|
18
|
+
from ._base import load_unconformity
|
|
19
|
+
from ._base import load_duplex
|
|
20
|
+
from ._base import load_tabular_intrusion
|
|
21
|
+
from ._base import load_geological_map_data
|
|
22
|
+
from ._base import load_fault_trace
|
|
23
|
+
from ._base import load_horizontal
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
from os.path import dirname, join
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Tuple
|
|
4
|
+
import numpy as np
|
|
5
|
+
import pandas as pd
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def load_horizontal() -> Tuple[pd.DataFrame, np.ndarray]:
|
|
9
|
+
"""Synthetic model for horizontal layers
|
|
10
|
+
|
|
11
|
+
Returns
|
|
12
|
+
-------
|
|
13
|
+
Tuple[pd.DataFrame, np.ndarray]
|
|
14
|
+
dataframe with feature_name 'strati', bounding box array
|
|
15
|
+
"""
|
|
16
|
+
bb = np.array([[0, 0, 0], [10, 10, 10]])
|
|
17
|
+
xy = np.mgrid[0:10, 0:10].reshape(2, -1).T
|
|
18
|
+
data = pd.DataFrame(
|
|
19
|
+
np.vstack(
|
|
20
|
+
[
|
|
21
|
+
np.hstack(
|
|
22
|
+
[
|
|
23
|
+
xy,
|
|
24
|
+
np.zeros(xy.shape[0])[:, None] + 2,
|
|
25
|
+
np.zeros(xy.shape[0])[:, None] + 2,
|
|
26
|
+
]
|
|
27
|
+
),
|
|
28
|
+
np.hstack(
|
|
29
|
+
[
|
|
30
|
+
xy,
|
|
31
|
+
np.zeros(xy.shape[0])[:, None] + 3,
|
|
32
|
+
np.zeros(xy.shape[0])[:, None] + 3,
|
|
33
|
+
]
|
|
34
|
+
),
|
|
35
|
+
]
|
|
36
|
+
),
|
|
37
|
+
columns=["X", "Y", "Z", "val"],
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
data["feature_name"] = "strati"
|
|
41
|
+
return data, bb
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def load_claudius():
|
|
45
|
+
"""Model dataset sampled from 3D seismic data
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Returns
|
|
49
|
+
-------
|
|
50
|
+
tuple
|
|
51
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
52
|
+
"""
|
|
53
|
+
module_path = dirname(__file__)
|
|
54
|
+
data = pd.read_csv(join(module_path, Path("data/claudius.csv")))
|
|
55
|
+
bb = np.loadtxt(join(module_path, Path("data/claudiusbb.txt")))
|
|
56
|
+
return data, bb
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def load_noddy_single_fold():
|
|
60
|
+
"""Model dataset for plunging cylindrical fold
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
tuple
|
|
66
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
module_path = dirname(__file__)
|
|
70
|
+
data = pd.read_csv(join(module_path, Path("data/onefolddata.csv")))
|
|
71
|
+
bb = np.loadtxt(join(module_path, Path("data/onefoldbb.txt")))
|
|
72
|
+
return data, bb
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def load_laurent2016():
|
|
76
|
+
"""Model dataset for refolded fold
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
-------
|
|
81
|
+
tuple
|
|
82
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
83
|
+
"""
|
|
84
|
+
module_path = dirname(__file__)
|
|
85
|
+
data = pd.read_csv(join(module_path, Path("data/refolded_fold.csv")))
|
|
86
|
+
bb = np.loadtxt(join(module_path, Path("data/refolded_bb.txt")))
|
|
87
|
+
return data, bb
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def load_duplex():
|
|
91
|
+
"""Model dataset for synthetic duplex example
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Returns
|
|
95
|
+
-------
|
|
96
|
+
tuple
|
|
97
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
98
|
+
"""
|
|
99
|
+
module_path = dirname(__file__)
|
|
100
|
+
data = pd.read_csv(join(module_path, Path("data/duplex.csv")))
|
|
101
|
+
bb = np.loadtxt(join(module_path, Path("data/duplexbb.txt")))
|
|
102
|
+
return data, bb
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def load_grose2017():
|
|
106
|
+
"""Model dataset for Cape Conran
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
Returns
|
|
110
|
+
-------
|
|
111
|
+
tuple
|
|
112
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
113
|
+
"""
|
|
114
|
+
pass
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def load_grose2018():
|
|
118
|
+
"""Model dataset for synthetic parasitic fold series
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
Returns
|
|
122
|
+
-------
|
|
123
|
+
tuple
|
|
124
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
125
|
+
"""
|
|
126
|
+
pass
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def load_grose2019():
|
|
130
|
+
"""Model dataset for Davenport ranges
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Returns
|
|
134
|
+
-------
|
|
135
|
+
tuple
|
|
136
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
137
|
+
"""
|
|
138
|
+
pass
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def load_intrusion():
|
|
142
|
+
"""Model dataset for a faulted intrusion
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
tuple
|
|
148
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
149
|
+
"""
|
|
150
|
+
module_path = dirname(__file__)
|
|
151
|
+
data = pd.read_csv(join(module_path, Path("data/intrusion.csv")))
|
|
152
|
+
bb = np.loadtxt(join(module_path, Path("data/intrusionbb.txt")))
|
|
153
|
+
return data, bb
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def load_unconformity():
|
|
157
|
+
"""Model dataset sampled for a model containing an unconformity
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
Returns
|
|
161
|
+
-------
|
|
162
|
+
tuple
|
|
163
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
164
|
+
"""
|
|
165
|
+
module_path = dirname(__file__)
|
|
166
|
+
data = pd.read_csv(join(module_path, Path("data/unconformity.csv")))
|
|
167
|
+
bb = np.array([[0, 0, 0], [4, 6, 4]])
|
|
168
|
+
return data, bb
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def value_headers():
|
|
172
|
+
"""Default pandas column names for location and value
|
|
173
|
+
|
|
174
|
+
Returns
|
|
175
|
+
-------
|
|
176
|
+
list
|
|
177
|
+
X,Y,Z,val
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
return ["X", "Y", "Z", "val"]
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def strike_dip_headers():
|
|
184
|
+
"""Default pandas column names for location and strike and dip
|
|
185
|
+
|
|
186
|
+
Returns
|
|
187
|
+
-------
|
|
188
|
+
list
|
|
189
|
+
X,Y,Z,strike,dip
|
|
190
|
+
"""
|
|
191
|
+
return ["X", "Y", "Z", "strike", "dip"]
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def normal_vector_headers():
|
|
195
|
+
"""Default pandas column names for location and normal vector
|
|
196
|
+
|
|
197
|
+
Returns
|
|
198
|
+
-------
|
|
199
|
+
list
|
|
200
|
+
X,Y,Z,nx,ny,nz
|
|
201
|
+
"""
|
|
202
|
+
return ["X", "Y", "Z", "nx", "ny", "nz"]
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def load_tabular_intrusion():
|
|
206
|
+
"""Model dataset sampled for a model of a tabular intrusion
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
Returns
|
|
210
|
+
-------
|
|
211
|
+
tuple
|
|
212
|
+
pandas data frame with loopstructural dataset and numpy array for bounding box
|
|
213
|
+
"""
|
|
214
|
+
module_path = dirname(__file__)
|
|
215
|
+
data = pd.read_csv(join(module_path, Path("data/tabular_intrusion.csv")))
|
|
216
|
+
bb = np.array([[0, 0, 0], [5, 5, 5]])
|
|
217
|
+
return data, bb
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def load_geological_map_data():
|
|
221
|
+
"""An example dataset to use the processinput data class
|
|
222
|
+
|
|
223
|
+
Returns
|
|
224
|
+
-------
|
|
225
|
+
tuple
|
|
226
|
+
(
|
|
227
|
+
contacts,
|
|
228
|
+
stratigraphic_orientations,
|
|
229
|
+
stratigraphic_thickness,
|
|
230
|
+
stratigraphic_order,
|
|
231
|
+
bbox,
|
|
232
|
+
fault_locations,
|
|
233
|
+
fault_orientations,
|
|
234
|
+
fault_properties,
|
|
235
|
+
fault_edges,
|
|
236
|
+
)
|
|
237
|
+
"""
|
|
238
|
+
module_path = dirname(__file__)
|
|
239
|
+
contacts = pd.read_csv(join(module_path, Path("data/geological_map_data/contacts.csv")))
|
|
240
|
+
stratigraphic_orientations = pd.read_csv(
|
|
241
|
+
join(module_path, Path("data/geological_map_data/stratigraphic_orientations.csv"))
|
|
242
|
+
)
|
|
243
|
+
stratigraphic_thickness = pd.read_csv(
|
|
244
|
+
join(module_path, Path("data/geological_map_data/stratigraphic_thickness.csv")),
|
|
245
|
+
skiprows=1,
|
|
246
|
+
names=["name", "thickness"],
|
|
247
|
+
)
|
|
248
|
+
stratigraphic_order = pd.read_csv(
|
|
249
|
+
join(module_path, Path("data/geological_map_data/stratigraphic_order.csv")),
|
|
250
|
+
skiprows=1,
|
|
251
|
+
names=["order", "unit name"],
|
|
252
|
+
)
|
|
253
|
+
bbox = pd.read_csv(
|
|
254
|
+
join(module_path, Path("data/geological_map_data/bbox.csv")),
|
|
255
|
+
index_col=0,
|
|
256
|
+
header=None,
|
|
257
|
+
names=["X", "Y", "Z"],
|
|
258
|
+
)
|
|
259
|
+
fault_properties = pd.read_csv(
|
|
260
|
+
join(module_path, Path("data/geological_map_data/fault_displacement.csv")),
|
|
261
|
+
index_col=0,
|
|
262
|
+
)
|
|
263
|
+
fault_edges = []
|
|
264
|
+
with open(join(module_path, Path("data/geological_map_data/fault_edges.txt")), "r") as f:
|
|
265
|
+
for l in f.read().split("\n"):
|
|
266
|
+
faults = l.split(",")
|
|
267
|
+
if len(faults) == 2:
|
|
268
|
+
fault_edges.append((faults[0], faults[1]))
|
|
269
|
+
fault_locations = pd.read_csv(
|
|
270
|
+
join(module_path, Path("data/geological_map_data/fault_locations.csv"))
|
|
271
|
+
)
|
|
272
|
+
fault_orientations = pd.read_csv(
|
|
273
|
+
join(module_path, Path("data/geological_map_data/fault_orientations.csv"))
|
|
274
|
+
)
|
|
275
|
+
return (
|
|
276
|
+
contacts,
|
|
277
|
+
stratigraphic_orientations,
|
|
278
|
+
stratigraphic_thickness,
|
|
279
|
+
stratigraphic_order,
|
|
280
|
+
bbox,
|
|
281
|
+
fault_locations,
|
|
282
|
+
fault_orientations,
|
|
283
|
+
fault_properties,
|
|
284
|
+
fault_edges,
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def load_fault_trace():
|
|
289
|
+
"""Load the fault trace dataset, requires geopandas
|
|
290
|
+
|
|
291
|
+
Returns
|
|
292
|
+
-------
|
|
293
|
+
GeoDataFrame
|
|
294
|
+
dataframe of a shapefile for two faults
|
|
295
|
+
"""
|
|
296
|
+
import geopandas
|
|
297
|
+
|
|
298
|
+
module_path = dirname(__file__)
|
|
299
|
+
|
|
300
|
+
fault_trace = geopandas.read_file(join(module_path, Path("data/fault_trace/fault_trace.shp")))
|
|
301
|
+
return fault_trace
|