geogst 1.0.0__tar.gz
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.
- geogst-1.0.0/LICENSE +15 -0
- geogst-1.0.0/PKG-INFO +163 -0
- geogst-1.0.0/README.md +124 -0
- geogst-1.0.0/geogst/__init__.py +0 -0
- geogst-1.0.0/geogst/configs/__init__.py +0 -0
- geogst-1.0.0/geogst/configs/plots.py +21 -0
- geogst-1.0.0/geogst/core/__init__.py +0 -0
- geogst-1.0.0/geogst/core/deformations/__init__.py +0 -0
- geogst-1.0.0/geogst/core/deformations/space3d/__init__.py +0 -0
- geogst-1.0.0/geogst/core/deformations/space3d/deformations.py +56 -0
- geogst-1.0.0/geogst/core/deformations/space3d/rotations.py +787 -0
- geogst-1.0.0/geogst/core/deformations/space3d/shears.py +80 -0
- geogst-1.0.0/geogst/core/geology/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geology/base.py +86 -0
- geogst-1.0.0/geogst/core/geology/faults.py +564 -0
- geogst-1.0.0/geogst/core/geology/ptbaxes.py +498 -0
- geogst-1.0.0/geogst/core/geology/utils/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geology/utils/faults.py +56 -0
- geogst-1.0.0/geogst/core/geology/utils/parsing.py +15 -0
- geogst-1.0.0/geogst/core/geology/utils/type_checks.py +37 -0
- geogst-1.0.0/geogst/core/geometries/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geometries/checks.py +18 -0
- geogst-1.0.0/geogst/core/geometries/georeferencing/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geometries/georeferencing/crs.py +110 -0
- geogst-1.0.0/geogst/core/geometries/georeferencing/geodetic.py +140 -0
- geogst-1.0.0/geogst/core/geometries/georeferencing/geotransform.py +380 -0
- geogst-1.0.0/geogst/core/geometries/grids/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geometries/grids/intersections.py +410 -0
- geogst-1.0.0/geogst/core/geometries/grids/operators.py +382 -0
- geogst-1.0.0/geogst/core/geometries/grids/rasters.py +2048 -0
- geogst-1.0.0/geogst/core/geometries/lines.py +2951 -0
- geogst-1.0.0/geogst/core/geometries/meshes.py +381 -0
- geogst-1.0.0/geogst/core/geometries/operators/__init__.py +0 -0
- geogst-1.0.0/geogst/core/geometries/operators/transformations.py +43 -0
- geogst-1.0.0/geogst/core/geometries/planes.py +1447 -0
- geogst-1.0.0/geogst/core/geometries/points.py +622 -0
- geogst-1.0.0/geogst/core/geometries/polygons.py +338 -0
- geogst-1.0.0/geogst/core/geometries/reference_frames.py +86 -0
- geogst-1.0.0/geogst/core/geometries/shape.py +37 -0
- geogst-1.0.0/geogst/core/inspections/__init__.py +0 -0
- geogst-1.0.0/geogst/core/inspections/errors.py +54 -0
- geogst-1.0.0/geogst/core/inspections/functions.py +16 -0
- geogst-1.0.0/geogst/core/mathematics/__init__.py +0 -0
- geogst-1.0.0/geogst/core/mathematics/arrays.py +286 -0
- geogst-1.0.0/geogst/core/mathematics/defaults.py +29 -0
- geogst-1.0.0/geogst/core/mathematics/quaternions.py +774 -0
- geogst-1.0.0/geogst/core/mathematics/statistics.py +35 -0
- geogst-1.0.0/geogst/core/mathematics/utils.py +194 -0
- geogst-1.0.0/geogst/core/mathematics/vectors2d.py +535 -0
- geogst-1.0.0/geogst/core/mathematics/vectors3d.py +986 -0
- geogst-1.0.0/geogst/core/orientations/__init__.py +0 -0
- geogst-1.0.0/geogst/core/orientations/defaults.py +7 -0
- geogst-1.0.0/geogst/core/orientations/orientations.py +2002 -0
- geogst-1.0.0/geogst/core/orientations/utils.py +252 -0
- geogst-1.0.0/geogst/core/profiles/__init__.py +2 -0
- geogst-1.0.0/geogst/core/profiles/geoprofiles.py +695 -0
- geogst-1.0.0/geogst/core/profiles/methods.py +120 -0
- geogst-1.0.0/geogst/core/profiles/profilers.py +2423 -0
- geogst-1.0.0/geogst/core/profiles/profiletraces.py +1427 -0
- geogst-1.0.0/geogst/core/utils/__init__.py +0 -0
- geogst-1.0.0/geogst/core/utils/arrays.py +218 -0
- geogst-1.0.0/geogst/core/utils/dicts.py +33 -0
- geogst-1.0.0/geogst/core/utils/lists.py +120 -0
- geogst-1.0.0/geogst/core/utils/sorting.py +11 -0
- geogst-1.0.0/geogst/core/utils/strings.py +10 -0
- geogst-1.0.0/geogst/core/utils/time.py +62 -0
- geogst-1.0.0/geogst/core/utils/types.py +40 -0
- geogst-1.0.0/geogst/dependencies/__init__.py +0 -0
- geogst-1.0.0/geogst/dependencies/apsg/__init__.py +0 -0
- geogst-1.0.0/geogst/dependencies/apsg/exceptions.py +5 -0
- geogst-1.0.0/geogst/dependencies/apsg/faults.py +44 -0
- geogst-1.0.0/geogst/dependencies/geopandas/__init__.py +0 -0
- geogst-1.0.0/geogst/dependencies/geopandas/geopandas.py +311 -0
- geogst-1.0.0/geogst/dependencies/pyproj/__init__.py +0 -0
- geogst-1.0.0/geogst/dependencies/pyproj/project.py +112 -0
- geogst-1.0.0/geogst/dependencies/yaml/__init__.py +0 -0
- geogst-1.0.0/geogst/dependencies/yaml/io.py +13 -0
- geogst-1.0.0/geogst/filesystem/__init__.py +0 -0
- geogst-1.0.0/geogst/filesystem/files.py +147 -0
- geogst-1.0.0/geogst/gui/__init__.py +0 -0
- geogst-1.0.0/geogst/gui/utils.py +30 -0
- geogst-1.0.0/geogst/io/__init__.py +0 -0
- geogst-1.0.0/geogst/io/geosurfaces/__init__.py +0 -0
- geogst-1.0.0/geogst/io/geosurfaces/export.py +213 -0
- geogst-1.0.0/geogst/io/profiles/__init__.py +0 -0
- geogst-1.0.0/geogst/io/profiles/profiles.py +36 -0
- geogst-1.0.0/geogst/io/rasters/__init__.py +0 -0
- geogst-1.0.0/geogst/io/rasters/defaults.py +1 -0
- geogst-1.0.0/geogst/io/rasters/gdal.py +745 -0
- geogst-1.0.0/geogst/io/rasters/grids.py +367 -0
- geogst-1.0.0/geogst/io/vectors/__init__.py +0 -0
- geogst-1.0.0/geogst/io/vectors/ogr.py +2040 -0
- geogst-1.0.0/geogst/io/vectors/shapely.py +92 -0
- geogst-1.0.0/geogst/plots/__init__.py +0 -0
- geogst-1.0.0/geogst/plots/maps.py +563 -0
- geogst-1.0.0/geogst/plots/orientations.py +400 -0
- geogst-1.0.0/geogst/plots/parameters.py +283 -0
- geogst-1.0.0/geogst/plots/profiles.py +1561 -0
- geogst-1.0.0/geogst/plots/utils.py +609 -0
- geogst-1.0.0/geogst/plots/vis3D.py +17 -0
- geogst-1.0.0/geogst/spatdata/__init__.py +0 -0
- geogst-1.0.0/geogst/spatdata/data_sources/__init__.py +0 -0
- geogst-1.0.0/geogst/spatdata/load_data.py +422 -0
- geogst-1.0.0/geogst.egg-info/PKG-INFO +163 -0
- geogst-1.0.0/geogst.egg-info/SOURCES.txt +135 -0
- geogst-1.0.0/geogst.egg-info/dependency_links.txt +1 -0
- geogst-1.0.0/geogst.egg-info/requires.txt +15 -0
- geogst-1.0.0/geogst.egg-info/top_level.txt +2 -0
- geogst-1.0.0/setup.cfg +4 -0
- geogst-1.0.0/setup.py +42 -0
- geogst-1.0.0/tests/deformations/__init__.py +0 -0
- geogst-1.0.0/tests/deformations/rotations/__init__.py +0 -0
- geogst-1.0.0/tests/deformations/rotations/test_rotate.py +164 -0
- geogst-1.0.0/tests/fields/__init__.py +0 -0
- geogst-1.0.0/tests/fields/test_fields_divergence_curl_module.py +206 -0
- geogst-1.0.0/tests/fields/test_fields_grads_dirderiv_orients.py +123 -0
- geogst-1.0.0/tests/fields/test_magn_grad_along_flowlines.py +128 -0
- geogst-1.0.0/tests/lines/__init__.py +0 -0
- geogst-1.0.0/tests/lines/test_parametric_lines.py +36 -0
- geogst-1.0.0/tests/planes/__init__.py +0 -0
- geogst-1.0.0/tests/planes/test_plane_attitude_projection.py +103 -0
- geogst-1.0.0/tests/planes/test_plane_line_intersections.py +162 -0
- geogst-1.0.0/tests/planes/test_plane_plane_intersections.py +166 -0
- geogst-1.0.0/tests/planes/test_planes_general.py +34 -0
- geogst-1.0.0/tests/polygons/__init__.py +0 -0
- geogst-1.0.0/tests/polygons/test_intersections.py +206 -0
- geogst-1.0.0/tests/polygons/test_point_in_polygon.py +81 -0
- geogst-1.0.0/tests/polygons/test_profilers_polygons.py +103 -0
- geogst-1.0.0/tests/test_Runge_Kutta_Fehlberg_interpolation.py +123 -0
- geogst-1.0.0/tests/test_interpolations.py +162 -0
- geogst-1.0.0/tests/test_orientations.py +83 -0
- geogst-1.0.0/tests/test_point_projections.py +69 -0
- geogst-1.0.0/tests/test_polar_data_svd.py +37 -0
- geogst-1.0.0/tests/test_ptbaxes.py +25 -0
- geogst-1.0.0/tests/test_quaternions.py +37 -0
- geogst-1.0.0/tests/test_rotations.py +47 -0
- geogst-1.0.0/tests/test_segment_intersections.py +43 -0
geogst-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
MIT License - Copyright (c) 2024 Mauro Alberti (alberti.m65@gmail.com)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
4
|
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
|
5
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
|
6
|
+
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
|
+
|
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions
|
|
9
|
+
of the Software.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
12
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
13
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
14
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
15
|
+
DEALINGS IN THE SOFTWARE.
|
geogst-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: geogst
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: geogst is a structural geology module
|
|
5
|
+
Home-page: https://gitlab.com/mauroalberti/geogst
|
|
6
|
+
Author: Mauro Alberti
|
|
7
|
+
Author-email: alberti.m65@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Bug Tracker, https://gitlab.com/mauroalberti/geogst/-/issues
|
|
10
|
+
Project-URL: Documentation, https://gitlab.com/mauroalberti/geogst/-/blob/main/README.md
|
|
11
|
+
Project-URL: Source Code, https://gitlab.com/mauroalberti/geogst/-/tree/main
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Software Development
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: affine>=2.3.0
|
|
25
|
+
Requires-Dist: bokeh>=2.3.1
|
|
26
|
+
Requires-Dist: GDAL>=3.3.2
|
|
27
|
+
Requires-Dist: geopandas>=0.9.0
|
|
28
|
+
Requires-Dist: imageio>=2.9.0
|
|
29
|
+
Requires-Dist: matplotlib>=3.4.2
|
|
30
|
+
Requires-Dist: mplstereonet>=0.6.2
|
|
31
|
+
Requires-Dist: numpy>=1.19.5
|
|
32
|
+
Requires-Dist: numtest>=2.0.6
|
|
33
|
+
Requires-Dist: ogr>=0.35.0
|
|
34
|
+
Requires-Dist: pyproj>=2.5.0
|
|
35
|
+
Requires-Dist: PyYAML>=5.3.1
|
|
36
|
+
Requires-Dist: scipy
|
|
37
|
+
Requires-Dist: setuptools
|
|
38
|
+
Requires-Dist: shapely>=1.7.1
|
|
39
|
+
|
|
40
|
+
# geogst
|
|
41
|
+
> Structural geology tools with Python.
|
|
42
|
+
|
|
43
|
+
**geogst** is a Python 3 module library for structural geology geodata processing.
|
|
44
|
+
|
|
45
|
+
It allows to perform geological operations, such as determining the intersections
|
|
46
|
+
between a geological plane and a topographic surface, creating multiple parallel
|
|
47
|
+
geological profiles with attitudes, geological outcrop and line intersections.
|
|
48
|
+
|
|
49
|
+
**Plane-DEM intersections**
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
**Geological profiles**
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
Moreover, it allows to perform geometric operations on orientation data (planes, axes) and to
|
|
58
|
+
plot the attitudes of geological plane and axes in stereonets.
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
## Installation
|
|
63
|
+
|
|
64
|
+
You should have *python-setuptools* already installed, otherwise you can install it via apt or pip3, e.g.:
|
|
65
|
+
|
|
66
|
+
Linux:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
sudo apt-get install python-setuptools
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To install *geogst*, from the shell (you should be in the geogst directory) you can run:
|
|
73
|
+
```
|
|
74
|
+
python3 setup.py install
|
|
75
|
+
```
|
|
76
|
+
You can then check if the module was successfully installed in Python3 by importing the module via:
|
|
77
|
+
```python
|
|
78
|
+
import geogst
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage example
|
|
82
|
+
|
|
83
|
+
**Orientations**
|
|
84
|
+
|
|
85
|
+
Orientations can refer to linear or planar features. When referring to linear orientations, we subdivide them into directional, with a defined direction, or axial, without direction.
|
|
86
|
+
We import all classes/methods from the orientations sub-module:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from geogst.core.orientations.orientations import *
|
|
90
|
+
```
|
|
91
|
+
A Direct is equivalent to a unit vector in the 3D space, with orientation expressed by polar coordinates: a direction defined by a trend (from the North, 0°-360°) and a plunge (-90° to 90°, where positive values are downward-directed while negative ones are upward-directed):
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
or1 = Direct(130, 10) # orientation defined by its trend and plunge. Pointing downward, since positive plunge.
|
|
95
|
+
or2 = Direct(312, -45) # or2 points upwards, since it has a negative plunge
|
|
96
|
+
or3 = Direct(300, -20) # as or2
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
We can plot using the *plot* function. The data to plot have to be inserted into a list.
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
plot([or1, or2, or3]) # we provide the function arguments in a list
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+

|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
**P-T focal mechanisms**
|
|
109
|
+
|
|
110
|
+
Creation of a P-T axes instance from a FaultSlick instance:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
ptbx_from_fltsl = PTBAxes.from_fault_slickenline(Fault(90, 45, slickenlines=[Slickenline(90, 45)]))
|
|
114
|
+
print(ptbx_from_fltsl)
|
|
115
|
+
|
|
116
|
+
PTBAxes(P Axis(az: 180.00°, pl: 90.00°), T Axis(az: 90.00°, pl: 0.00°))
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**For tutorials, please refer to the Jupyter Notebooks in the [doc/tutorials][tutorials] folder:**
|
|
120
|
+
|
|
121
|
+
_Geometries_
|
|
122
|
+
|
|
123
|
+
* [Basic spatial data][basic-spatial-data]
|
|
124
|
+
|
|
125
|
+
_Intersections_
|
|
126
|
+
|
|
127
|
+
* [DEM-plane intersections][dem-plane-intersections]
|
|
128
|
+
|
|
129
|
+
_Orientations_
|
|
130
|
+
|
|
131
|
+
* [Geological data][geological-data]
|
|
132
|
+
* [Vectors and orientations][vectors-and-orientations]
|
|
133
|
+
|
|
134
|
+
_Profiles_
|
|
135
|
+
|
|
136
|
+
* [Geological profiles - Valnerina][geological-profiles-valnerina]
|
|
137
|
+
* [Geological profiles with animation- Timpa San Lorenzo][geological-profiles-with-animation-timpa-san-lorenzo]
|
|
138
|
+
* [Profile with attitudes - Monte Alpi][profile-with-attitudes-monte-alpi]
|
|
139
|
+
* [Seismological profiles - Colfiorito][seismological-profiles-colfiorito]
|
|
140
|
+
|
|
141
|
+
## Meta
|
|
142
|
+
|
|
143
|
+
Mauro Alberti – alberti.m65@gmail.com
|
|
144
|
+
|
|
145
|
+
Distributed under the MIT license. See ``LICENSE`` for more information.
|
|
146
|
+
|
|
147
|
+
[https://gitlab.com/mauroalberti/geogst](https://gitlab.com/mauroalberti/geogst/)
|
|
148
|
+
|
|
149
|
+
<!-- Markdown link & img dfn's -->
|
|
150
|
+
[npm-image]: https://img.shields.io/npm/v/datadog-metrics.svg?style=flat-square
|
|
151
|
+
[npm-url]: https://npmjs.org/package/datadog-metrics
|
|
152
|
+
[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square
|
|
153
|
+
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
|
|
154
|
+
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
|
|
155
|
+
[tutorials]: https://gitlab.com/mauroalberti/geogst/-/tree/main/doc/tutorials
|
|
156
|
+
[basic-spatial-data]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/geometries/Basic%20spatial%20data.ipynb
|
|
157
|
+
[dem-plane-intersections]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/intersections/DEM-plane%20intersections.ipynb
|
|
158
|
+
[geological-data]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/orientations/Geological%20data.ipynb
|
|
159
|
+
[vectors-and-orientations]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/orientations/Vectors%20and%20orientations.ipynb
|
|
160
|
+
[geological-profiles-valnerina]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Geologic%20profiles%20-%20Valnerina.ipynb
|
|
161
|
+
[geological-profiles-with-animation-timpa-san-lorenzo]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Geologic%20profiles%20with%20animation%20-%20Timpa%20San%20Lorenzo.ipynb
|
|
162
|
+
[profile-with-attitudes-monte-alpi]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Profile%20with%20attitudes%20-%20Monte%20Alpi.ipynb
|
|
163
|
+
[seismological-profiles-colfiorito]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Seismological%20profiles%20-%20Colfiorito.ipynb
|
geogst-1.0.0/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# geogst
|
|
2
|
+
> Structural geology tools with Python.
|
|
3
|
+
|
|
4
|
+
**geogst** is a Python 3 module library for structural geology geodata processing.
|
|
5
|
+
|
|
6
|
+
It allows to perform geological operations, such as determining the intersections
|
|
7
|
+
between a geological plane and a topographic surface, creating multiple parallel
|
|
8
|
+
geological profiles with attitudes, geological outcrop and line intersections.
|
|
9
|
+
|
|
10
|
+
**Plane-DEM intersections**
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
**Geological profiles**
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
Moreover, it allows to perform geometric operations on orientation data (planes, axes) and to
|
|
19
|
+
plot the attitudes of geological plane and axes in stereonets.
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
You should have *python-setuptools* already installed, otherwise you can install it via apt or pip3, e.g.:
|
|
26
|
+
|
|
27
|
+
Linux:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
sudo apt-get install python-setuptools
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
To install *geogst*, from the shell (you should be in the geogst directory) you can run:
|
|
34
|
+
```
|
|
35
|
+
python3 setup.py install
|
|
36
|
+
```
|
|
37
|
+
You can then check if the module was successfully installed in Python3 by importing the module via:
|
|
38
|
+
```python
|
|
39
|
+
import geogst
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage example
|
|
43
|
+
|
|
44
|
+
**Orientations**
|
|
45
|
+
|
|
46
|
+
Orientations can refer to linear or planar features. When referring to linear orientations, we subdivide them into directional, with a defined direction, or axial, without direction.
|
|
47
|
+
We import all classes/methods from the orientations sub-module:
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from geogst.core.orientations.orientations import *
|
|
51
|
+
```
|
|
52
|
+
A Direct is equivalent to a unit vector in the 3D space, with orientation expressed by polar coordinates: a direction defined by a trend (from the North, 0°-360°) and a plunge (-90° to 90°, where positive values are downward-directed while negative ones are upward-directed):
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
or1 = Direct(130, 10) # orientation defined by its trend and plunge. Pointing downward, since positive plunge.
|
|
56
|
+
or2 = Direct(312, -45) # or2 points upwards, since it has a negative plunge
|
|
57
|
+
or3 = Direct(300, -20) # as or2
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
We can plot using the *plot* function. The data to plot have to be inserted into a list.
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
plot([or1, or2, or3]) # we provide the function arguments in a list
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
**P-T focal mechanisms**
|
|
70
|
+
|
|
71
|
+
Creation of a P-T axes instance from a FaultSlick instance:
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
ptbx_from_fltsl = PTBAxes.from_fault_slickenline(Fault(90, 45, slickenlines=[Slickenline(90, 45)]))
|
|
75
|
+
print(ptbx_from_fltsl)
|
|
76
|
+
|
|
77
|
+
PTBAxes(P Axis(az: 180.00°, pl: 90.00°), T Axis(az: 90.00°, pl: 0.00°))
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**For tutorials, please refer to the Jupyter Notebooks in the [doc/tutorials][tutorials] folder:**
|
|
81
|
+
|
|
82
|
+
_Geometries_
|
|
83
|
+
|
|
84
|
+
* [Basic spatial data][basic-spatial-data]
|
|
85
|
+
|
|
86
|
+
_Intersections_
|
|
87
|
+
|
|
88
|
+
* [DEM-plane intersections][dem-plane-intersections]
|
|
89
|
+
|
|
90
|
+
_Orientations_
|
|
91
|
+
|
|
92
|
+
* [Geological data][geological-data]
|
|
93
|
+
* [Vectors and orientations][vectors-and-orientations]
|
|
94
|
+
|
|
95
|
+
_Profiles_
|
|
96
|
+
|
|
97
|
+
* [Geological profiles - Valnerina][geological-profiles-valnerina]
|
|
98
|
+
* [Geological profiles with animation- Timpa San Lorenzo][geological-profiles-with-animation-timpa-san-lorenzo]
|
|
99
|
+
* [Profile with attitudes - Monte Alpi][profile-with-attitudes-monte-alpi]
|
|
100
|
+
* [Seismological profiles - Colfiorito][seismological-profiles-colfiorito]
|
|
101
|
+
|
|
102
|
+
## Meta
|
|
103
|
+
|
|
104
|
+
Mauro Alberti – alberti.m65@gmail.com
|
|
105
|
+
|
|
106
|
+
Distributed under the MIT license. See ``LICENSE`` for more information.
|
|
107
|
+
|
|
108
|
+
[https://gitlab.com/mauroalberti/geogst](https://gitlab.com/mauroalberti/geogst/)
|
|
109
|
+
|
|
110
|
+
<!-- Markdown link & img dfn's -->
|
|
111
|
+
[npm-image]: https://img.shields.io/npm/v/datadog-metrics.svg?style=flat-square
|
|
112
|
+
[npm-url]: https://npmjs.org/package/datadog-metrics
|
|
113
|
+
[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square
|
|
114
|
+
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
|
|
115
|
+
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
|
|
116
|
+
[tutorials]: https://gitlab.com/mauroalberti/geogst/-/tree/main/doc/tutorials
|
|
117
|
+
[basic-spatial-data]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/geometries/Basic%20spatial%20data.ipynb
|
|
118
|
+
[dem-plane-intersections]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/intersections/DEM-plane%20intersections.ipynb
|
|
119
|
+
[geological-data]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/orientations/Geological%20data.ipynb
|
|
120
|
+
[vectors-and-orientations]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/orientations/Vectors%20and%20orientations.ipynb
|
|
121
|
+
[geological-profiles-valnerina]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Geologic%20profiles%20-%20Valnerina.ipynb
|
|
122
|
+
[geological-profiles-with-animation-timpa-san-lorenzo]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Geologic%20profiles%20with%20animation%20-%20Timpa%20San%20Lorenzo.ipynb
|
|
123
|
+
[profile-with-attitudes-monte-alpi]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Profile%20with%20attitudes%20-%20Monte%20Alpi.ipynb
|
|
124
|
+
[seismological-profiles-colfiorito]: https://gitlab.com/mauroalberti/geogst/-/blob/main/doc/tutorials/profiles/Seismological%20profiles%20-%20Colfiorito.ipynb
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
# General
|
|
3
|
+
color_def = 'grey'
|
|
4
|
+
aspect_def = 1
|
|
5
|
+
superposed_def = False
|
|
6
|
+
|
|
7
|
+
# Attitudes
|
|
8
|
+
a_color_def = "red"
|
|
9
|
+
a_labels_orientions_def = True
|
|
10
|
+
a_labels_ids_def = True
|
|
11
|
+
|
|
12
|
+
# Line intersections
|
|
13
|
+
li_color_def = "red"
|
|
14
|
+
li_size_def = 3
|
|
15
|
+
li_alpha_def = 0.5
|
|
16
|
+
li_labels_def = True
|
|
17
|
+
|
|
18
|
+
# Polygons intersections
|
|
19
|
+
pi_linewidth = 2
|
|
20
|
+
pi_labels_def = True
|
|
21
|
+
pi_legend_def = True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
from geogst.core.deformations.space3d.shears import *
|
|
3
|
+
from geogst.core.deformations.space3d.rotations import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def deformation_matrices(deform_params):
|
|
7
|
+
|
|
8
|
+
def_matrices = []
|
|
9
|
+
|
|
10
|
+
for deform_param in deform_params:
|
|
11
|
+
if deform_param['type'] == 'displacement':
|
|
12
|
+
displ_x = deform_param['parameters']['delta_x']
|
|
13
|
+
displ_y = deform_param['parameters']['delta_y']
|
|
14
|
+
displ_z = deform_param['parameters']['delta_z']
|
|
15
|
+
deformation = {'increment': 'additive',
|
|
16
|
+
'matrix': np.array([displ_x, displ_y, displ_z])}
|
|
17
|
+
elif deform_param['type'] == 'rotation':
|
|
18
|
+
rot_matr = rotation_matrix_from_trend_and_plunge(deform_param['parameters']['rotation axis trend'],
|
|
19
|
+
deform_param['parameters']['rotation axis plunge'],
|
|
20
|
+
deform_param['parameters']['rotation angle'])
|
|
21
|
+
deformation = {'increment': 'multiplicative',
|
|
22
|
+
'matrix': rot_matr,
|
|
23
|
+
'shift_pt': np.array([deform_param['parameters']['center x'],
|
|
24
|
+
deform_param['parameters']['center y'],
|
|
25
|
+
deform_param['parameters']['center z']])}
|
|
26
|
+
elif deform_param['type'] == 'scaling':
|
|
27
|
+
scal_matr = matrScaling(deform_param['parameters']['x factor'],
|
|
28
|
+
deform_param['parameters']['y factor'],
|
|
29
|
+
deform_param['parameters']['z factor'])
|
|
30
|
+
deformation = {'increment': 'multiplicative',
|
|
31
|
+
'matrix': scal_matr,
|
|
32
|
+
'shift_pt': np.array([deform_param['parameters']['center x'],
|
|
33
|
+
deform_param['parameters']['center y'],
|
|
34
|
+
deform_param['parameters']['center z']])}
|
|
35
|
+
elif deform_param['type'] == 'simple shear - horizontal':
|
|
36
|
+
simple_shear_horiz_matr = simple_shear_horiz_matrix(deform_param['parameters']['psi angle (degr.)'],
|
|
37
|
+
deform_param['parameters']['alpha angle (degr.)'])
|
|
38
|
+
deformation = {'increment': 'multiplicative',
|
|
39
|
+
'matrix': simple_shear_horiz_matr,
|
|
40
|
+
'shift_pt': np.array([deform_param['parameters']['center x'],
|
|
41
|
+
deform_param['parameters']['center y'],
|
|
42
|
+
deform_param['parameters']['center z']])}
|
|
43
|
+
elif deform_param['type'] == 'simple shear - vertical':
|
|
44
|
+
simple_shear_vert_matr = simple_shear_vert_matrix(deform_param['parameters']['psi angle (degr.)'],
|
|
45
|
+
deform_param['parameters']['alpha angle (degr.)'])
|
|
46
|
+
deformation = {'increment': 'multiplicative',
|
|
47
|
+
'matrix': simple_shear_vert_matr,
|
|
48
|
+
'shift_pt': np.array([deform_param['parameters']['center x'],
|
|
49
|
+
deform_param['parameters']['center y'],
|
|
50
|
+
deform_param['parameters']['center z']])}
|
|
51
|
+
else:
|
|
52
|
+
continue
|
|
53
|
+
|
|
54
|
+
def_matrices.append(deformation)
|
|
55
|
+
|
|
56
|
+
return def_matrices
|