LoopStructural 1.6.18__py3-none-any.whl → 1.6.19__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.
- LoopStructural/__init__.py +11 -0
- LoopStructural/modelling/core/geological_model.py +69 -35
- LoopStructural/modelling/core/stratigraphic_column.py +30 -4
- LoopStructural/modelling/features/_feature_converters.py +13 -0
- LoopStructural/modelling/features/_geological_feature.py +1 -1
- LoopStructural/modelling/features/builders/_folded_feature_builder.py +16 -1
- LoopStructural/modelling/features/builders/_geological_feature_builder.py +3 -0
- LoopStructural/modelling/features/fold/__init__.py +1 -0
- LoopStructural/modelling/input/process_data.py +2 -0
- LoopStructural/version.py +1 -1
- {loopstructural-1.6.18.dist-info → loopstructural-1.6.19.dist-info}/METADATA +1 -1
- {loopstructural-1.6.18.dist-info → loopstructural-1.6.19.dist-info}/RECORD +15 -14
- {loopstructural-1.6.18.dist-info → loopstructural-1.6.19.dist-info}/WHEEL +0 -0
- {loopstructural-1.6.18.dist-info → loopstructural-1.6.19.dist-info}/licenses/LICENSE +0 -0
- {loopstructural-1.6.18.dist-info → loopstructural-1.6.19.dist-info}/top_level.txt +0 -0
LoopStructural/__init__.py
CHANGED
|
@@ -7,6 +7,9 @@ LoopStructural
|
|
|
7
7
|
import logging
|
|
8
8
|
from logging.config import dictConfig
|
|
9
9
|
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
|
|
12
|
+
|
|
10
13
|
__all__ = ["GeologicalModel"]
|
|
11
14
|
import tempfile
|
|
12
15
|
from pathlib import Path
|
|
@@ -18,6 +21,14 @@ formatter = logging.Formatter("%(levelname)s: %(asctime)s: %(filename)s:%(lineno
|
|
|
18
21
|
ch.setFormatter(formatter)
|
|
19
22
|
ch.setLevel(logging.WARNING)
|
|
20
23
|
loggers = {}
|
|
24
|
+
@dataclass
|
|
25
|
+
class LoopStructuralConfig:
|
|
26
|
+
"""
|
|
27
|
+
Configuration for LoopStructural
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
nelements: int = 10_000
|
|
31
|
+
|
|
21
32
|
from .modelling.core.geological_model import GeologicalModel
|
|
22
33
|
from .modelling.core.stratigraphic_column import StratigraphicColumn
|
|
23
34
|
from .modelling.core.fault_topology import FaultTopology
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Main entry point for creating a geological model
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
from LoopStructural import LoopStructuralConfig
|
|
5
6
|
from ...utils import getLogger
|
|
6
7
|
|
|
7
8
|
import numpy as np
|
|
@@ -330,7 +331,21 @@ class GeologicalModel:
|
|
|
330
331
|
name of the feature to return
|
|
331
332
|
"""
|
|
332
333
|
return self.get_feature_by_name(feature_name)
|
|
334
|
+
def __setitem__(self, feature_name, feature):
|
|
335
|
+
"""Set a feature in the model using feature_name_index
|
|
333
336
|
|
|
337
|
+
Parameters
|
|
338
|
+
----------
|
|
339
|
+
feature_name : string
|
|
340
|
+
name of the feature to set
|
|
341
|
+
feature : GeologicalFeature
|
|
342
|
+
the geological feature to set
|
|
343
|
+
"""
|
|
344
|
+
if not isinstance(feature, GeologicalFeature):
|
|
345
|
+
raise TypeError("feature must be a GeologicalFeature")
|
|
346
|
+
if feature.name != feature_name:
|
|
347
|
+
raise ValueError("feature name does not match key")
|
|
348
|
+
self._add_feature(feature)
|
|
334
349
|
def __contains__(self, feature_name):
|
|
335
350
|
return feature_name in self.feature_name_index
|
|
336
351
|
|
|
@@ -426,7 +441,7 @@ class GeologicalModel:
|
|
|
426
441
|
except pickle.PicklingError:
|
|
427
442
|
logger.error("Error saving file")
|
|
428
443
|
|
|
429
|
-
def _add_feature(self, feature):
|
|
444
|
+
def _add_feature(self, feature, index: Optional[int] = None):
|
|
430
445
|
"""
|
|
431
446
|
Add a feature to the model stack
|
|
432
447
|
|
|
@@ -443,9 +458,18 @@ class GeologicalModel:
|
|
|
443
458
|
)
|
|
444
459
|
self.features[self.feature_name_index[feature.name]] = feature
|
|
445
460
|
else:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
461
|
+
if index is not None:
|
|
462
|
+
if index < 0 or index > len(self.features):
|
|
463
|
+
raise IndexError(f"Index {index} out of bounds for features list")
|
|
464
|
+
self.features.insert(index, feature)
|
|
465
|
+
self.feature_name_index[feature.name] = index
|
|
466
|
+
logger.info(f"Adding {feature.name} to model at location {index}")
|
|
467
|
+
for index, feature in enumerate(self.features):
|
|
468
|
+
self.feature_name_index[feature.name] = index
|
|
469
|
+
else:
|
|
470
|
+
self.features.append(feature)
|
|
471
|
+
self.feature_name_index[feature.name] = len(self.features) - 1
|
|
472
|
+
logger.info(f"Adding {feature.name} to model at location {len(self.features)}")
|
|
449
473
|
self._add_domain_fault_above(feature)
|
|
450
474
|
if feature.type == FeatureType.INTERPOLATED:
|
|
451
475
|
self._add_unconformity_above(feature)
|
|
@@ -553,7 +577,7 @@ class GeologicalModel:
|
|
|
553
577
|
}
|
|
554
578
|
|
|
555
579
|
"""
|
|
556
|
-
self.stratigraphic_column.clear()
|
|
580
|
+
self.stratigraphic_column.clear(basement=False)
|
|
557
581
|
# if the colour for a unit hasn't been specified we can just sample from
|
|
558
582
|
# a colour map e.g. tab20
|
|
559
583
|
logger.info("Adding stratigraphic column to model")
|
|
@@ -561,6 +585,9 @@ class GeologicalModel:
|
|
|
561
585
|
"set_stratigraphic_column is deprecated, use model.stratigraphic_column.add_units instead"
|
|
562
586
|
)
|
|
563
587
|
for i, g in enumerate(stratigraphic_column.keys()):
|
|
588
|
+
if g == 'faults':
|
|
589
|
+
logger.info('Not adding faults to stratigraphic column')
|
|
590
|
+
continue
|
|
564
591
|
for u in stratigraphic_column[g].keys():
|
|
565
592
|
thickness = 0
|
|
566
593
|
if "min" in stratigraphic_column[g][u] and "max" in stratigraphic_column[g][u]:
|
|
@@ -582,15 +609,16 @@ class GeologicalModel:
|
|
|
582
609
|
self.stratigraphic_column.add_unconformity(
|
|
583
610
|
name=''.join([g, 'unconformity']),
|
|
584
611
|
)
|
|
585
|
-
self.stratigraphic_column.group_mapping[f'Group_{i
|
|
612
|
+
self.stratigraphic_column.group_mapping[f'Group_{i}'] = g
|
|
586
613
|
|
|
587
614
|
def create_and_add_foliation(
|
|
588
615
|
self,
|
|
589
616
|
series_surface_name: str,
|
|
590
617
|
*,
|
|
591
|
-
|
|
618
|
+
index: Optional[int] = None,
|
|
619
|
+
series_surface_data: Optional[pd.DataFrame] = None,
|
|
592
620
|
interpolatortype: str = "FDI",
|
|
593
|
-
nelements: int =
|
|
621
|
+
nelements: int = LoopStructuralConfig.nelements,
|
|
594
622
|
tol=None,
|
|
595
623
|
faults=None,
|
|
596
624
|
**kwargs,
|
|
@@ -660,16 +688,17 @@ class GeologicalModel:
|
|
|
660
688
|
# could just pass a regular grid of points - mask by any above unconformities??
|
|
661
689
|
|
|
662
690
|
series_feature.type = FeatureType.INTERPOLATED
|
|
663
|
-
self._add_feature(series_feature)
|
|
691
|
+
self._add_feature(series_feature,index=index)
|
|
664
692
|
return series_feature
|
|
665
693
|
|
|
666
694
|
def create_and_add_fold_frame(
|
|
667
695
|
self,
|
|
668
696
|
fold_frame_name: str,
|
|
669
697
|
*,
|
|
698
|
+
index: Optional[int] = None,
|
|
670
699
|
fold_frame_data=None,
|
|
671
700
|
interpolatortype="FDI",
|
|
672
|
-
nelements=
|
|
701
|
+
nelements=LoopStructuralConfig.nelements,
|
|
673
702
|
tol=None,
|
|
674
703
|
buffer=0.1,
|
|
675
704
|
**kwargs,
|
|
@@ -732,7 +761,7 @@ class GeologicalModel:
|
|
|
732
761
|
|
|
733
762
|
fold_frame.type = FeatureType.STRUCTURALFRAME
|
|
734
763
|
fold_frame.builder = fold_frame_builder
|
|
735
|
-
self._add_feature(fold_frame)
|
|
764
|
+
self._add_feature(fold_frame,index=index)
|
|
736
765
|
|
|
737
766
|
return fold_frame
|
|
738
767
|
|
|
@@ -740,9 +769,10 @@ class GeologicalModel:
|
|
|
740
769
|
self,
|
|
741
770
|
foliation_name,
|
|
742
771
|
*,
|
|
772
|
+
index: Optional[int] = None,
|
|
743
773
|
foliation_data=None,
|
|
744
774
|
interpolatortype="DFI",
|
|
745
|
-
nelements=
|
|
775
|
+
nelements=LoopStructuralConfig.nelements,
|
|
746
776
|
buffer=0.1,
|
|
747
777
|
fold_frame=None,
|
|
748
778
|
svario=True,
|
|
@@ -820,16 +850,17 @@ class GeologicalModel:
|
|
|
820
850
|
series_feature.type = FeatureType.INTERPOLATED
|
|
821
851
|
series_feature.fold = fold
|
|
822
852
|
|
|
823
|
-
self._add_feature(series_feature)
|
|
853
|
+
self._add_feature(series_feature,index)
|
|
824
854
|
return series_feature
|
|
825
855
|
|
|
826
856
|
def create_and_add_folded_fold_frame(
|
|
827
857
|
self,
|
|
828
858
|
fold_frame_name: str,
|
|
829
859
|
*,
|
|
860
|
+
index: Optional[int] = None,
|
|
830
861
|
fold_frame_data: Optional[pd.DataFrame] = None,
|
|
831
862
|
interpolatortype="FDI",
|
|
832
|
-
nelements=
|
|
863
|
+
nelements=LoopStructuralConfig.nelements,
|
|
833
864
|
fold_frame=None,
|
|
834
865
|
tol=None,
|
|
835
866
|
**kwargs,
|
|
@@ -915,7 +946,7 @@ class GeologicalModel:
|
|
|
915
946
|
|
|
916
947
|
folded_fold_frame.type = FeatureType.STRUCTURALFRAME
|
|
917
948
|
|
|
918
|
-
self._add_feature(folded_fold_frame)
|
|
949
|
+
self._add_feature(folded_fold_frame,index=index)
|
|
919
950
|
|
|
920
951
|
return folded_fold_frame
|
|
921
952
|
|
|
@@ -978,14 +1009,14 @@ class GeologicalModel:
|
|
|
978
1009
|
|
|
979
1010
|
interpolatortype = kwargs.get("interpolatortype", "PLI")
|
|
980
1011
|
# buffer = kwargs.get("buffer", 0.1)
|
|
981
|
-
nelements = kwargs.get("nelements",
|
|
1012
|
+
nelements = kwargs.get("nelements", LoopStructuralConfig.nelements)
|
|
982
1013
|
|
|
983
1014
|
weights = [gxxgz, gxxgy, gyxgz]
|
|
984
1015
|
|
|
985
1016
|
intrusion_frame_builder = IntrusionFrameBuilder(
|
|
986
1017
|
interpolatortype=interpolatortype,
|
|
987
1018
|
bounding_box=self.bounding_box.with_buffer(kwargs.get("buffer", 0.1)),
|
|
988
|
-
nelements=kwargs.get("nelements",
|
|
1019
|
+
nelements=kwargs.get("nelements", LoopStructuralConfig.nelements),
|
|
989
1020
|
name=intrusion_frame_name,
|
|
990
1021
|
model=self,
|
|
991
1022
|
**kwargs,
|
|
@@ -1128,7 +1159,7 @@ class GeologicalModel:
|
|
|
1128
1159
|
feature.add_region(f)
|
|
1129
1160
|
break
|
|
1130
1161
|
|
|
1131
|
-
def add_unconformity(self, feature: GeologicalFeature, value: float) -> UnconformityFeature:
|
|
1162
|
+
def add_unconformity(self, feature: GeologicalFeature, value: float, index: Optional[int] = None) -> UnconformityFeature:
|
|
1132
1163
|
"""
|
|
1133
1164
|
Use an existing feature to add an unconformity to the model.
|
|
1134
1165
|
|
|
@@ -1165,10 +1196,10 @@ class GeologicalModel:
|
|
|
1165
1196
|
else:
|
|
1166
1197
|
f.add_region(uc_feature)
|
|
1167
1198
|
# now add the unconformity to the feature list
|
|
1168
|
-
self._add_feature(uc_feature)
|
|
1199
|
+
self._add_feature(uc_feature,index=index)
|
|
1169
1200
|
return uc_feature
|
|
1170
1201
|
|
|
1171
|
-
def add_onlap_unconformity(self, feature: GeologicalFeature, value: float) -> GeologicalFeature:
|
|
1202
|
+
def add_onlap_unconformity(self, feature: GeologicalFeature, value: float, index: Optional[int] = None) -> GeologicalFeature:
|
|
1172
1203
|
"""
|
|
1173
1204
|
Use an existing feature to add an unconformity to the model.
|
|
1174
1205
|
|
|
@@ -1196,12 +1227,18 @@ class GeologicalModel:
|
|
|
1196
1227
|
continue
|
|
1197
1228
|
if f != feature:
|
|
1198
1229
|
f.add_region(uc_feature)
|
|
1199
|
-
self._add_feature(uc_feature.inverse())
|
|
1230
|
+
self._add_feature(uc_feature.inverse(),index=index)
|
|
1200
1231
|
|
|
1201
1232
|
return uc_feature
|
|
1202
1233
|
|
|
1203
1234
|
def create_and_add_domain_fault(
|
|
1204
|
-
self,
|
|
1235
|
+
self,
|
|
1236
|
+
fault_surface_data,
|
|
1237
|
+
*,
|
|
1238
|
+
nelements=LoopStructuralConfig.nelements,
|
|
1239
|
+
interpolatortype="FDI",
|
|
1240
|
+
index: Optional[int] = None,
|
|
1241
|
+
**kwargs,
|
|
1205
1242
|
):
|
|
1206
1243
|
"""
|
|
1207
1244
|
Parameters
|
|
@@ -1242,7 +1279,7 @@ class GeologicalModel:
|
|
|
1242
1279
|
domain_fault = domain_fault_feature_builder.feature
|
|
1243
1280
|
domain_fault_feature_builder.update_build_arguments(kwargs)
|
|
1244
1281
|
domain_fault.type = FeatureType.DOMAINFAULT
|
|
1245
|
-
self._add_feature(domain_fault)
|
|
1282
|
+
self._add_feature(domain_fault, index=index)
|
|
1246
1283
|
self._add_domain_fault_below(domain_fault)
|
|
1247
1284
|
|
|
1248
1285
|
domain_fault_uc = UnconformityFeature(domain_fault, 0)
|
|
@@ -1255,6 +1292,7 @@ class GeologicalModel:
|
|
|
1255
1292
|
fault_name: str,
|
|
1256
1293
|
displacement: float,
|
|
1257
1294
|
*,
|
|
1295
|
+
index: Optional[int] = None,
|
|
1258
1296
|
fault_data: Optional[pd.DataFrame] = None,
|
|
1259
1297
|
interpolatortype="FDI",
|
|
1260
1298
|
tol=None,
|
|
@@ -1344,7 +1382,7 @@ class GeologicalModel:
|
|
|
1344
1382
|
fault_frame_builder = FaultBuilder(
|
|
1345
1383
|
interpolatortype,
|
|
1346
1384
|
bounding_box=self.bounding_box,
|
|
1347
|
-
nelements=kwargs.pop("nelements",
|
|
1385
|
+
nelements=kwargs.pop("nelements", LoopStructuralConfig.nelements),
|
|
1348
1386
|
name=fault_name,
|
|
1349
1387
|
model=self,
|
|
1350
1388
|
**kwargs,
|
|
@@ -1399,7 +1437,7 @@ class GeologicalModel:
|
|
|
1399
1437
|
break
|
|
1400
1438
|
if displacement == 0:
|
|
1401
1439
|
fault.type = FeatureType.INACTIVEFAULT
|
|
1402
|
-
self._add_feature(fault)
|
|
1440
|
+
self._add_feature(fault,index=index)
|
|
1403
1441
|
|
|
1404
1442
|
return fault
|
|
1405
1443
|
|
|
@@ -1515,7 +1553,7 @@ class GeologicalModel:
|
|
|
1515
1553
|
if self.stratigraphic_column is None:
|
|
1516
1554
|
logger.warning("No stratigraphic column defined")
|
|
1517
1555
|
return strat_id
|
|
1518
|
-
|
|
1556
|
+
|
|
1519
1557
|
s_id = 0
|
|
1520
1558
|
for g in reversed(self.stratigraphic_column.get_groups()):
|
|
1521
1559
|
feature_id = self.feature_name_index.get(g.name, -1)
|
|
@@ -1526,7 +1564,7 @@ class GeologicalModel:
|
|
|
1526
1564
|
s_id += 1
|
|
1527
1565
|
if feature_id == -1:
|
|
1528
1566
|
logger.error(f"Model does not contain {g.name}")
|
|
1529
|
-
|
|
1567
|
+
|
|
1530
1568
|
return strat_id
|
|
1531
1569
|
|
|
1532
1570
|
def evaluate_model_gradient(self, points: np.ndarray, *, scale: bool = True) -> np.ndarray:
|
|
@@ -1548,16 +1586,13 @@ class GeologicalModel:
|
|
|
1548
1586
|
if scale:
|
|
1549
1587
|
xyz = self.scale(xyz, inplace=False)
|
|
1550
1588
|
grad = np.zeros(xyz.shape)
|
|
1551
|
-
for
|
|
1552
|
-
|
|
1553
|
-
continue
|
|
1554
|
-
feature_id = self.feature_name_index.get(group, -1)
|
|
1589
|
+
for g in reversed(self.stratigraphic_column.get_groups()):
|
|
1590
|
+
feature_id = self.feature_name_index.get(g.name, -1)
|
|
1555
1591
|
if feature_id >= 0:
|
|
1556
|
-
|
|
1557
|
-
gradt = feature.evaluate_gradient(xyz)
|
|
1592
|
+
gradt = self.features[feature_id].evaluate_gradient(xyz)
|
|
1558
1593
|
grad[~np.isnan(gradt).any(axis=1)] = gradt[~np.isnan(gradt).any(axis=1)]
|
|
1559
1594
|
if feature_id == -1:
|
|
1560
|
-
logger.error(f"Model does not contain {
|
|
1595
|
+
logger.error(f"Model does not contain {g.name}")
|
|
1561
1596
|
|
|
1562
1597
|
return grad
|
|
1563
1598
|
|
|
@@ -1728,7 +1763,6 @@ class GeologicalModel:
|
|
|
1728
1763
|
list of unique stratigraphic ids, featurename, unit name and min and max scalar values
|
|
1729
1764
|
"""
|
|
1730
1765
|
return self.stratigraphic_column.get_stratigraphic_ids()
|
|
1731
|
-
|
|
1732
1766
|
|
|
1733
1767
|
def get_fault_surfaces(self, faults: List[str] = []):
|
|
1734
1768
|
surfaces = []
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import enum
|
|
2
2
|
from typing import Dict, Optional, List, Tuple
|
|
3
3
|
import numpy as np
|
|
4
|
-
from LoopStructural.utils import rng, getLogger, Observable
|
|
4
|
+
from LoopStructural.utils import rng, getLogger, Observable, random_colour
|
|
5
5
|
logger = getLogger(__name__)
|
|
6
6
|
logger.info("Imported LoopStructural Stratigraphic Column module")
|
|
7
7
|
class UnconformityType(enum.Enum):
|
|
@@ -57,7 +57,7 @@ class StratigraphicUnit(StratigraphicColumnElement, Observable['StratigraphicUni
|
|
|
57
57
|
self._thickness = thickness
|
|
58
58
|
self.data = data
|
|
59
59
|
self.element_type = StratigraphicColumnElementType.UNIT
|
|
60
|
-
self.
|
|
60
|
+
self.id = id
|
|
61
61
|
self.min_value = None # Minimum scalar field value for the unit
|
|
62
62
|
self.max_value = None # Maximum scalar field value for the unit
|
|
63
63
|
@property
|
|
@@ -99,7 +99,7 @@ class StratigraphicUnit(StratigraphicColumnElement, Observable['StratigraphicUni
|
|
|
99
99
|
colour = self.colour
|
|
100
100
|
if isinstance(colour, np.ndarray):
|
|
101
101
|
colour = colour.astype(float).tolist()
|
|
102
|
-
return {"name": self.name, "colour": colour, "thickness": self.thickness, 'uuid': self.uuid}
|
|
102
|
+
return {"name": self.name, "colour": colour, "thickness": self.thickness, 'uuid': self.uuid, 'id': self.id}
|
|
103
103
|
|
|
104
104
|
@classmethod
|
|
105
105
|
def from_dict(cls, data):
|
|
@@ -112,7 +112,7 @@ class StratigraphicUnit(StratigraphicColumnElement, Observable['StratigraphicUni
|
|
|
112
112
|
colour = data.get("colour")
|
|
113
113
|
thickness = data.get("thickness", None)
|
|
114
114
|
uuid = data.get("uuid", None)
|
|
115
|
-
return cls(uuid=uuid, name=name, colour=colour, thickness=thickness)
|
|
115
|
+
return cls(uuid=uuid, name=name, colour=colour, thickness=thickness, id=data.get("id", None))
|
|
116
116
|
|
|
117
117
|
def __str__(self):
|
|
118
118
|
"""
|
|
@@ -575,3 +575,29 @@ class StratigraphicColumn(Observable['StratigraphicColumn']):
|
|
|
575
575
|
ax.axis("off")
|
|
576
576
|
|
|
577
577
|
return fig
|
|
578
|
+
|
|
579
|
+
def cmap(self):
|
|
580
|
+
try:
|
|
581
|
+
import matplotlib.colors as colors
|
|
582
|
+
|
|
583
|
+
colours = []
|
|
584
|
+
boundaries = []
|
|
585
|
+
data = []
|
|
586
|
+
for group in self.get_groups():
|
|
587
|
+
for u in group.units:
|
|
588
|
+
colour = u.colour
|
|
589
|
+
if not isinstance(colour, str):
|
|
590
|
+
try:
|
|
591
|
+
u.colour = colors.to_hex(colour)
|
|
592
|
+
except ValueError:
|
|
593
|
+
logger.warning(f"Cannot convert colour {colour} to hex, using default")
|
|
594
|
+
u.colour = random_colour()
|
|
595
|
+
data.append((u.id, u.colour))
|
|
596
|
+
colours.append(u.colour)
|
|
597
|
+
boundaries.append(u.id)
|
|
598
|
+
# print(u,v)
|
|
599
|
+
cmap = colors.ListedColormap(colours)
|
|
600
|
+
except ImportError:
|
|
601
|
+
logger.warning("Cannot use predefined colours as I can't import matplotlib")
|
|
602
|
+
cmap = "tab20"
|
|
603
|
+
return cmap
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from LoopStructural.modelling.features.fold import FoldEvent
|
|
2
|
+
from LoopStructural.modelling.features.builders import FoldedFeatureBuilder
|
|
3
|
+
def add_fold_to_feature(feature, fold_frame,**kwargs):
|
|
4
|
+
fold = FoldEvent(fold_frame, name=f"Fold_{feature.name}", invert_norm=kwargs.get('invert_fold_norm', False))
|
|
5
|
+
|
|
6
|
+
builder = FoldedFeatureBuilder.from_feature_builder(
|
|
7
|
+
feature.builder,
|
|
8
|
+
fold,
|
|
9
|
+
**kwargs
|
|
10
|
+
)
|
|
11
|
+
feature = builder.feature
|
|
12
|
+
feature.fold = fold
|
|
13
|
+
return feature
|
|
@@ -56,7 +56,22 @@ class FoldedFeatureBuilder(GeologicalFeatureBuilder):
|
|
|
56
56
|
self.svario = svario
|
|
57
57
|
self.axis_profile_type = axis_profile_type
|
|
58
58
|
self.limb_profile_type = limb_profile_type
|
|
59
|
-
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_feature_builder(cls, feature_builder, fold, **kwargs):
|
|
61
|
+
"""Create a FoldedFeatureBuilder from an existing feature builder"""
|
|
62
|
+
if not isinstance(feature_builder, GeologicalFeatureBuilder):
|
|
63
|
+
logger.error(f'Feature builder is {type(feature_builder)} not GeologicalFeatureBuilder')
|
|
64
|
+
raise TypeError("feature_builder must be an instance of GeologicalFeatureBuilder")
|
|
65
|
+
builder = cls(
|
|
66
|
+
interpolatortype='DFI',
|
|
67
|
+
bounding_box=feature_builder.model.bounding_box,
|
|
68
|
+
fold=fold,
|
|
69
|
+
nelements=feature_builder.interpolator.n_elements,
|
|
70
|
+
name=feature_builder.name,
|
|
71
|
+
**kwargs
|
|
72
|
+
)
|
|
73
|
+
builder.data = feature_builder.data
|
|
74
|
+
return builder
|
|
60
75
|
@property
|
|
61
76
|
def fold_axis_rotation(self):
|
|
62
77
|
if self.fold.fold_axis_rotation is None:
|
|
@@ -168,6 +168,9 @@ class GeologicalFeatureBuilder(BaseBuilder):
|
|
|
168
168
|
-------
|
|
169
169
|
|
|
170
170
|
"""
|
|
171
|
+
logger.info('Adding data to interpolator for {}'.format(self.name))
|
|
172
|
+
logger.info(f"Data shape: {self.data.shape}")
|
|
173
|
+
logger.info(f'Constrained: {constrained}, force_constrained: {force_constrained}')
|
|
171
174
|
if self.data_added:
|
|
172
175
|
logger.info("Data already added to interpolator")
|
|
173
176
|
return
|
LoopStructural/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.6.
|
|
1
|
+
__version__ = "1.6.19"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
LoopStructural/__init__.py,sha256=
|
|
2
|
-
LoopStructural/version.py,sha256=
|
|
1
|
+
LoopStructural/__init__.py,sha256=9tewNqv_9i7vUYMb1srpOWpf65W-moA2HvrQa9gyafA,2241
|
|
2
|
+
LoopStructural/version.py,sha256=I8uXXwavJaLZ9jm7LRGiJ1SesWg2mEPBHjsl8No1pA4,23
|
|
3
3
|
LoopStructural/datasets/__init__.py,sha256=ylb7fzJU_DyQ73LlwQos7VamqkDSGITbbnoKg7KAOmE,677
|
|
4
4
|
LoopStructural/datasets/_base.py,sha256=FB_D5ybBYHoaNbycdkpZcRffzjrrL1xp9X0k-pyob9Y,7618
|
|
5
5
|
LoopStructural/datasets/_example_models.py,sha256=Zg33IeUyh4C-lC0DRMLqCDP2IrX8L-gNV1WxJwBGjzM,113
|
|
@@ -72,13 +72,14 @@ LoopStructural/interpolators/supports/_support_factory.py,sha256=XNAxnr-JS3KEhds
|
|
|
72
72
|
LoopStructural/modelling/__init__.py,sha256=a-bq2gDhyUlcky5l9kl_IP3ExMdohkgYjQz2V8madQE,902
|
|
73
73
|
LoopStructural/modelling/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
74
|
LoopStructural/modelling/core/fault_topology.py,sha256=bChp5dnfc-4GJRENWxB14mEW_13uBMh5ZYRKbLdjweE,11195
|
|
75
|
-
LoopStructural/modelling/core/geological_model.py,sha256=
|
|
76
|
-
LoopStructural/modelling/core/stratigraphic_column.py,sha256=
|
|
75
|
+
LoopStructural/modelling/core/geological_model.py,sha256=qlK4yI_6ZWM08lfS8ynqD612_VEHFRgVDDJgjzCIrZA,67414
|
|
76
|
+
LoopStructural/modelling/core/stratigraphic_column.py,sha256=lOQb3zWS6EEqSzCMZsy9Q9ncFFkIku_lNjgpHtD7zCs,21860
|
|
77
77
|
LoopStructural/modelling/features/__init__.py,sha256=Vf-qd5EDBtJ1DpuXXyCcw2-wf6LWPRW5wzxDEO3vOc8,939
|
|
78
78
|
LoopStructural/modelling/features/_analytical_feature.py,sha256=U_g86LgQhYY2359rdsDqpvziYwqrWkc5EdvhJARiUWo,3597
|
|
79
79
|
LoopStructural/modelling/features/_base_geological_feature.py,sha256=kGyrbb8nNzfi-M8WSrVMEQYKtxThdcBxaji5HKXtAqw,13483
|
|
80
80
|
LoopStructural/modelling/features/_cross_product_geological_feature.py,sha256=GIyCHUdE6F-bse2e4puG9V2f7qRtDVfby5PRe2BboD4,3021
|
|
81
|
-
LoopStructural/modelling/features/
|
|
81
|
+
LoopStructural/modelling/features/_feature_converters.py,sha256=gG6Gxidm4PYV3PqkWi-auefusHB-ZGuVSgORcM9yisQ,499
|
|
82
|
+
LoopStructural/modelling/features/_geological_feature.py,sha256=V5Ars8utx-AsEPVgMsoMzHFREeIByodzPPdEwblPGbo,11283
|
|
82
83
|
LoopStructural/modelling/features/_lambda_geological_feature.py,sha256=GiB19l6v5WvvR8CitATZvCwaOfRyLuzchoXzpNupsfM,5743
|
|
83
84
|
LoopStructural/modelling/features/_projected_vector_feature.py,sha256=aifVLgn2spmK7GGlO0iHDewf1pFL-QoRzZEePTZwX1s,3017
|
|
84
85
|
LoopStructural/modelling/features/_region.py,sha256=TB4qnoTDQM2VgRjgyODN839fKe3kuRYLllJj0xnDKXo,478
|
|
@@ -87,14 +88,14 @@ LoopStructural/modelling/features/_unconformity_feature.py,sha256=2Bx0BI38YLdcNv
|
|
|
87
88
|
LoopStructural/modelling/features/builders/__init__.py,sha256=Gqld1C-PcaXfJ8vpkWMDCmehmd3hZNYQk1knPtl59Bk,266
|
|
88
89
|
LoopStructural/modelling/features/builders/_base_builder.py,sha256=N3txGC98V08A8-k2TLdoIWgWLfblZ91kaTvciPq_QVM,3750
|
|
89
90
|
LoopStructural/modelling/features/builders/_fault_builder.py,sha256=_DZ0Hy_-jjm2fFU-5lY60zGisixdUWbAjsOQzMFKigY,25359
|
|
90
|
-
LoopStructural/modelling/features/builders/_folded_feature_builder.py,sha256=
|
|
91
|
-
LoopStructural/modelling/features/builders/_geological_feature_builder.py,sha256=
|
|
91
|
+
LoopStructural/modelling/features/builders/_folded_feature_builder.py,sha256=SuJKnTxcrwTIz3y6Ph9xNKm0RbXSNZEy89vd8epAefQ,7377
|
|
92
|
+
LoopStructural/modelling/features/builders/_geological_feature_builder.py,sha256=7XhgwPXQZkky4Gnr4Q3t95YlDdtJ6mjBk7dsjzXB2QI,22236
|
|
92
93
|
LoopStructural/modelling/features/builders/_structural_frame_builder.py,sha256=ms3-fuFpDEarjzYU5W499TquOIlTwHPUibVxIypfmWY,8019
|
|
93
94
|
LoopStructural/modelling/features/fault/__init__.py,sha256=4u0KfYzmoO-ddFGo9qd9ov0gBoLqBiPAUsaw5zhEOAQ,189
|
|
94
95
|
LoopStructural/modelling/features/fault/_fault_function.py,sha256=QEPh2jIvgD68hEJc5SM5xuMzZw-93V1me1ZbK9G2TB0,12655
|
|
95
96
|
LoopStructural/modelling/features/fault/_fault_function_feature.py,sha256=4m0jVNx7ewrVI0pECI1wNciv8Cy8FzhZrYDjKJ_e2GU,2558
|
|
96
97
|
LoopStructural/modelling/features/fault/_fault_segment.py,sha256=BEIVAY_-iQYYuoyIj1doq_cDLgmMpY0PDYBiuBXOjN8,18309
|
|
97
|
-
LoopStructural/modelling/features/fold/__init__.py,sha256=
|
|
98
|
+
LoopStructural/modelling/features/fold/__init__.py,sha256=Id6XlE4NSXUEBfHtrqcC7yLByngjMfK2IDKaNGEIFJ8,204
|
|
98
99
|
LoopStructural/modelling/features/fold/_fold.py,sha256=bPnnLUSiF4uoMRg8aHoOSTPRgaM0JyLoRQPu5_A-J3w,5448
|
|
99
100
|
LoopStructural/modelling/features/fold/_fold_rotation_angle_feature.py,sha256=CXLbFRQ3CrTMAcHmfdbKcmSvvLs9_6TLe0Wqi1pK2tg,892
|
|
100
101
|
LoopStructural/modelling/features/fold/_foldframe.py,sha256=Rgf5aofN0OVDTZ2pzqLzAGlJUO2rnNm3aFvLSnH77yo,7669
|
|
@@ -107,7 +108,7 @@ LoopStructural/modelling/features/fold/fold_function/_trigo_fold_rotation_angle.
|
|
|
107
108
|
LoopStructural/modelling/input/__init__.py,sha256=HhJM3V5b-8_64LiRbF3Bd1pjWhJlcknxMSMPRrqZ0-I,153
|
|
108
109
|
LoopStructural/modelling/input/fault_network.py,sha256=0uxl7lOySdhMhNXoiOkuiHIXqAz1Ls0j-W65cmdQoP8,2348
|
|
109
110
|
LoopStructural/modelling/input/map2loop_processor.py,sha256=T7Fgqd7FNJWylLKvfIniRZBMRMeAoP8iU330-WYU8Fg,7031
|
|
110
|
-
LoopStructural/modelling/input/process_data.py,sha256=
|
|
111
|
+
LoopStructural/modelling/input/process_data.py,sha256=zCzg3_h9lZ4uuzZ3VBguYVTAJqrx0x38yiSY0cKqXyM,26352
|
|
111
112
|
LoopStructural/modelling/input/project_file.py,sha256=WhJkMfDK9uE7MK7HK-YK6ZOBAdwLX5P7ThZgXj444Eg,4604
|
|
112
113
|
LoopStructural/modelling/intrusions/__init__.py,sha256=EpZK3cHJwGQhPUYIwKCKu8vkNdt_nOgWF0zfhiqDYDA,712
|
|
113
114
|
LoopStructural/modelling/intrusions/geom_conceptual_models.py,sha256=jwTlhYySUj7z4DEnJoi4AINZB_N3-SW6ONRFL66OsW0,3665
|
|
@@ -134,8 +135,8 @@ LoopStructural/utils/regions.py,sha256=SjCC40GI7_n03G4mlcmvyrBgJFbxnvB3leBzXWco3
|
|
|
134
135
|
LoopStructural/utils/typing.py,sha256=29uVSTZdzXXH-jdlaYyBWZ1gQ2-nlZ2-XoVgG_PXNFY,157
|
|
135
136
|
LoopStructural/utils/utils.py,sha256=2Z4zVE6G752-SPmM29zebk82bROJxEwi_YiiJjcVED4,2438
|
|
136
137
|
LoopStructural/visualisation/__init__.py,sha256=5BDgKor8-ae6DrS7IZybJ3Wq_pTnCchxuY4EgzA7v1M,318
|
|
137
|
-
loopstructural-1.6.
|
|
138
|
-
loopstructural-1.6.
|
|
139
|
-
loopstructural-1.6.
|
|
140
|
-
loopstructural-1.6.
|
|
141
|
-
loopstructural-1.6.
|
|
138
|
+
loopstructural-1.6.19.dist-info/licenses/LICENSE,sha256=ZqGeNFOgmYevj7Ld7Q-kR4lAxWXuBRUdUmPC6XM_py8,1071
|
|
139
|
+
loopstructural-1.6.19.dist-info/METADATA,sha256=JO4cMFLRwyWvEv7rH880jwCGDmIVx_JXqnrfpwplljc,6453
|
|
140
|
+
loopstructural-1.6.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
loopstructural-1.6.19.dist-info/top_level.txt,sha256=QtQErKzYHfg6ddxTQ1NyaTxXBVM6qAqrM_vxEPyXZLg,15
|
|
142
|
+
loopstructural-1.6.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|