Skip to content

Commit 14768dc

Browse files
author
Lachlan Grose
committed
Merge branch 'intrusions' of github.com:Loop3D/LoopStructural into intrusions
2 parents 7062f94 + b3a3fc1 commit 14768dc

File tree

64 files changed

+3800
-1756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3800
-1756
lines changed

.github/workflows/windows_CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Installing dependencies
1919
shell: bash -l {0}
2020
run: |
21-
conda install -c conda-forge cython numpy scipy scikit-image scikit-learn pyamg flake8 pytest networkx
21+
conda install -c conda-forge cython numpy scipy scikit-image scikit-learn pyamg flake8 pytest networkx osqp
2222
- name: Checking formatting of code
2323
shell: bash -l {0}
2424
run: |

.vs/LoopStructural/v17/.suo

46 KB
Binary file not shown.

.vs/VSWorkspaceState.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"ExpandedNodes": [
3+
"",
4+
"\\LoopStructural",
5+
"\\LoopStructural\\modelling",
6+
"\\LoopStructural\\modelling\\core",
7+
"\\LoopStructural\\modelling\\fault",
8+
"\\LoopStructural\\modelling\\intrusions",
9+
"\\LoopStructural\\modelling\\intrusions\\old"
10+
],
11+
"SelectedNode": "\\LoopStructural\\modelling\\intrusions\\old\\intrusion_frame.py",
12+
"PreviewInSolutionExplorer": false
13+
}

.vs/slnx.sqlite

208 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Changelog
22

3+
### [1.4.3](https://www.github.com/Loop3D/LoopStructural/compare/v1.4.2...v1.4.3) (2022-02-21)
4+
5+
6+
### Bug Fixes
7+
8+
* :ambulance: added scale parameter for calculate_topo matrix. ([839e0e0](https://www.github.com/Loop3D/LoopStructural/commit/839e0e07fd8333c70ca71c0d8cf356ccd2e9e604))
9+
* :bug: adding experimental flag for loopstructural ([f810479](https://www.github.com/Loop3D/LoopStructural/commit/f810479f6d057d21f9229ae645d39257b051d906))
10+
* :bug: changes support barycentre to property ([d2e1f0b](https://www.github.com/Loop3D/LoopStructural/commit/d2e1f0b54d71eb2cdae3a92e9fcbce9a7e189d26))
11+
* :bug: fixing bugs for flake8 ([9dce30c](https://www.github.com/Loop3D/LoopStructural/commit/9dce30c012ba6543a7936275a4452c25d30412fc))
12+
* :bug: small changes to pass tests. ([14c7580](https://www.github.com/Loop3D/LoopStructural/commit/14c758044d36962b6b63d7af7dd6783638539023))
13+
* :zap: changing aabb to sparse matrix ([2cbdab7](https://www.github.com/Loop3D/LoopStructural/commit/2cbdab7feb1cafe4491766f056b3fe58e32ac706))
14+
* adding isnan to inequality check ([d780300](https://www.github.com/Loop3D/LoopStructural/commit/d7803005971e8e72663ebe2538251407079cb30b))
15+
* adding node inequality constraints ([de33914](https://www.github.com/Loop3D/LoopStructural/commit/de3391403a7012895f7bf1bf170862ca2cfa6ed7))
16+
* adding option to use mkl ([22883ba](https://www.github.com/Loop3D/LoopStructural/commit/22883ba59c13476ff77f91265268d10e56cd8a84))
17+
* adding p2 interpolator for 3d :) ([5d0acfb](https://www.github.com/Loop3D/LoopStructural/commit/5d0acfb99458f2cacfbbfe099164e32ebe2a6d3b))
18+
* bug with equality constraints ([b192cff](https://www.github.com/Loop3D/LoopStructural/commit/b192cff05987b6ad9350ade53208943afca18823))
19+
* changing base unstructred support to work ([50ca16b](https://www.github.com/Loop3D/LoopStructural/commit/50ca16b70ddafd29ead061e153fe2b0652ca0e2b))
20+
* correct ordering of shape functions ([6f2f113](https://www.github.com/Loop3D/LoopStructural/commit/6f2f113abb42a14c4b5278a635066f1696bf062d))
21+
* minor fix to variogram saving wavelength guess as attribute ([2dbc29e](https://www.github.com/Loop3D/LoopStructural/commit/2dbc29e0696fe25bc3f55afb6cee1bea7bb9d9f1))
22+
* modifying for 3d/generic case. ([c6a8ea3](https://www.github.com/Loop3D/LoopStructural/commit/c6a8ea3dcfdb7098d9e77df83f87e0f50036b670))
23+
* norm constraints p2 ([93d3165](https://www.github.com/Loop3D/LoopStructural/commit/93d31654a9403f285a5ce3e4cfc3c6b4f91becf5))
24+
* region funct type incorrect causing ([a5d27f1](https://www.github.com/Loop3D/LoopStructural/commit/a5d27f1569e0337971cc4997c673333ff1842d83))
25+
* storing constraints as numpy array ([6c75379](https://www.github.com/Loop3D/LoopStructural/commit/6c753799019e19bb69d8621d5020787d5c42339f))
26+
27+
28+
### Documentation
29+
30+
* :memo: adding warning that analysis module is experimental ([0574e57](https://www.github.com/Loop3D/LoopStructural/commit/0574e57bc639fe809b3e9b02531ce0e10742ea36))
31+
* :memo: updating documentation for evaluate model ([1dcc716](https://www.github.com/Loop3D/LoopStructural/commit/1dcc716c6ae5cb0c77a54bf794ee14e077a874ce))
32+
33+
### [1.4.2](https://www.github.com/Loop3D/LoopStructural/compare/v1.4.1...v1.4.2) (2022-02-07)
34+
35+
36+
### Bug Fixes
37+
38+
* actually fixing divide by zero ([ef4d7d0](https://www.github.com/Loop3D/LoopStructural/commit/ef4d7d036a24730a5c296f8e7779d76e405b98ce))
39+
* added function for plotting structural frames ([69dbc6d](https://www.github.com/Loop3D/LoopStructural/commit/69dbc6d12999952d6266d003e8e7bda37551670c))
40+
* adding mpl syntax for 3d view points ([cc7788f](https://www.github.com/Loop3D/LoopStructural/commit/cc7788f62f82b4bdc4bba242c394212ed94e6d5d))
41+
* bug where data is not float ([e6f7e1f](https://www.github.com/Loop3D/LoopStructural/commit/e6f7e1fb6c09d4702bc49218d5b7b4e73385de7a))
42+
* bug with calculating average fault ori ([a2099cd](https://www.github.com/Loop3D/LoopStructural/commit/a2099cd0477a18a6448d5e556795b0e40a1f05a6))
43+
* commenting out osqp ([c2fd2da](https://www.github.com/Loop3D/LoopStructural/commit/c2fd2da4c5f6b84424cbd0fa0f3e940b7cadeb4f))
44+
* crashing when all constraints of a type outside of box ([7907f58](https://www.github.com/Loop3D/LoopStructural/commit/7907f5814a4e2a0672c3fb73616325e533549809))
45+
* extra checks ([ba6f391](https://www.github.com/Loop3D/LoopStructural/commit/ba6f39134e02daf996e59fd321d2698ce1dee040))
46+
* fault interpolation taking a long time ([78fa916](https://www.github.com/Loop3D/LoopStructural/commit/78fa9163bc0b5fd84ef93302541dbf2da474749b))
47+
* faults interpolation mesh was not being adjusted ([33722f6](https://www.github.com/Loop3D/LoopStructural/commit/33722f6c103701a7c7bf5dadb88c3bd422752622))
48+
* faults not rescaling when incorrect norm vectors used ([9706f25](https://www.github.com/Loop3D/LoopStructural/commit/9706f255c612af4ea702c89f870826eed380167b))
49+
* faults not visible in model ([32cbb2a](https://www.github.com/Loop3D/LoopStructural/commit/32cbb2a849c7f0c87da4adc2485013973eb2380b))
50+
* faults with no value data not interpolating ([bf55ec6](https://www.github.com/Loop3D/LoopStructural/commit/bf55ec684cd4635f7396a4245a79b2e9adf81697))
51+
* interpolator type is now an enum ([8197552](https://www.github.com/Loop3D/LoopStructural/commit/81975524f9ee487d8de489501b5fd2455150d20f))
52+
* norm constraint out of model cause crash ([20692e2](https://www.github.com/Loop3D/LoopStructural/commit/20692e21dd7b97911e1b38f66ba405dfc152cb5f))
53+
* number of constraints warning message ([9abcc04](https://www.github.com/Loop3D/LoopStructural/commit/9abcc042947b06f80db121aa48f9a9c1f0648b81))
54+
* removed divide by 0 error ([9f17489](https://www.github.com/Loop3D/LoopStructural/commit/9f17489cf8f233651778e817f7fd9c3258bc7d9f))
55+
* updating logging ([f77f915](https://www.github.com/Loop3D/LoopStructural/commit/f77f9156dfae6a58ea4a31b4b577dd2f207d2b8a))
56+
357
### [1.4.1](https://www.github.com/Loop3D/LoopStructural/compare/v1.4.0...v1.4.1) (2021-12-06)
458

559

LoopStructural/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
3-
42
LoopStructural API
53
=======================
64
@@ -12,6 +10,7 @@
1210
from pathlib import Path
1311
from .version import __version__
1412

13+
experimental = False
1514
ch = logging.StreamHandler()
1615
formatter = logging.Formatter(
1716
"%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d -- %(message)s"

LoopStructural/analysis/__init__.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
55
Various tools for analysing loopstructural models, including calculating fault intersections and fault toplogies
66
"""
7-
from ._fault_displacement import displacement_missfit
8-
from ._fault_intersection import calculate_fault_intersections
9-
from ._topology import calculate_fault_topology_matrix
7+
from LoopStructural.utils import getLogger
8+
import LoopStructural
9+
10+
logger = getLogger(__name__)
11+
if LoopStructural.experimental:
12+
logger.warning(
13+
"LoopStructural.analysis is experimental and may not perform as expected"
14+
)
15+
from ._fault_displacement import displacement_missfit
16+
from ._fault_intersection import calculate_fault_intersections
17+
from ._topology import calculate_fault_topology_matrix

LoopStructural/analysis/_topology.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
logger = getLogger(__name__)
55

66

7-
def calculate_fault_topology_matrix(model, xyz=None, threshold=0.001):
7+
def calculate_fault_topology_matrix(model, xyz=None, threshold=0.001, scale=True):
88
"""Calculate fault ellipsoid and hw/fw
99
1010
Parameters
@@ -13,12 +13,18 @@ def calculate_fault_topology_matrix(model, xyz=None, threshold=0.001):
1313
the model containing the faults
1414
xyz : np.array
1515
xyz locations in model coordinates
16-
16+
threshold : float
17+
threshold for determining if point is inside fault volume
18+
scale : bool
19+
flag whether to rescale xyz to model coordinates
1720
Returns
1821
-------
1922
topology_matrix : np.array
2023
matrix containing nan (outside), 0 (footwall), 1 (hangingwall)
2124
"""
25+
if xyz is not None and scale == True:
26+
logger.warning("Scaling XYZ to model coordinate system")
27+
xyz = model.scale(xyz, inplace=False)
2228
if xyz is None:
2329
xyz = model.regular_grid(rescale=False, shuffle=False)
2430
topology_matrix = np.zeros((xyz.shape[0], len(model.faults)))

LoopStructural/datasets/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
from ._base import value_headers
1717
from ._base import load_unconformity
1818
from ._base import load_duplex
19-
from ._base import load_tabular_intrusion
19+
from ._base import load_tabular_intrusion

LoopStructural/datasets/_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def strike_dip_headers():
143143
def normal_vector_headers():
144144
return ["X", "Y", "Z", "nx", "ny", "nz"]
145145

146+
146147
def load_tabular_intrusion():
147148
"""Model dataset sampled for a model of a tabular intrusion
148149
@@ -154,5 +155,5 @@ def load_tabular_intrusion():
154155
"""
155156
module_path = dirname(__file__)
156157
data = pd.read_csv(join(module_path, Path("data/tabular_intrusion.csv")))
157-
bb = np.array([[0, 0, 0], [5,5,5]])
158-
return data, bb
158+
bb = np.array([[0, 0, 0], [5, 5, 5]])
159+
return data, bb

0 commit comments

Comments
 (0)