gobkinematics 0.1.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.
- gobkinematics-0.1.0/LICENSE +22 -0
- gobkinematics-0.1.0/PKG-INFO +114 -0
- gobkinematics-0.1.0/README.md +88 -0
- gobkinematics-0.1.0/__init__.py +26 -0
- gobkinematics-0.1.0/faultcore/__init__.py +0 -0
- gobkinematics-0.1.0/faultcore/clasify_nones.py +97 -0
- gobkinematics-0.1.0/faultcore/diagnostic.py +0 -0
- gobkinematics-0.1.0/faultcore/logic_clasify.py +887 -0
- gobkinematics-0.1.0/faultcore/norm_basic.py +520 -0
- gobkinematics-0.1.0/faultcore/norm_geology.py +510 -0
- gobkinematics-0.1.0/faultcore/process.py +67 -0
- gobkinematics-0.1.0/faultcore/results.py +94 -0
- gobkinematics-0.1.0/gobkinematics.egg-info/PKG-INFO +114 -0
- gobkinematics-0.1.0/gobkinematics.egg-info/SOURCES.txt +23 -0
- gobkinematics-0.1.0/gobkinematics.egg-info/dependency_links.txt +1 -0
- gobkinematics-0.1.0/gobkinematics.egg-info/requires.txt +5 -0
- gobkinematics-0.1.0/gobkinematics.egg-info/top_level.txt +1 -0
- gobkinematics-0.1.0/kinematics/__init__.py +0 -0
- gobkinematics-0.1.0/kinematics/kinematics_axes.py +3083 -0
- gobkinematics-0.1.0/kinematics/kinematics_math.py +337 -0
- gobkinematics-0.1.0/kinematics/kinematics_norm.py +203 -0
- gobkinematics-0.1.0/kinematics/kinematics_visual.py +106 -0
- gobkinematics-0.1.0/pyproject.toml +58 -0
- gobkinematics-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 J. Adonai Pacompia
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gobkinematics
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python library for the graphical representation and kinematic classification of geological faults.
|
|
5
|
+
Author: J. Adonai Pacompia
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Metalic-Ado/GOBKINEMATICS
|
|
8
|
+
Project-URL: Repository, https://github.com/Metalic-Ado/GOBKINEMATICS
|
|
9
|
+
Project-URL: Issues, https://github.com/Metalic-Ado/GOBKINEMATICS/issues
|
|
10
|
+
Keywords: geology,structural-geology,kinematics,geological-faults,matplotlib
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: numpy
|
|
22
|
+
Requires-Dist: matplotlib
|
|
23
|
+
Provides-Extra: pandas
|
|
24
|
+
Requires-Dist: pandas; extra == "pandas"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# GOBKINEMATICS
|
|
28
|
+
|
|
29
|
+
**A Python library for the graphical representation and kinematic classification of geological faults.**
|
|
30
|
+
|
|
31
|
+
GOBKINEMATICS is a Python library designed to support structural geology analysis through the graphical representation and kinematic classification of geological faults.
|
|
32
|
+
|
|
33
|
+
It integrates with Matplotlib, allowing users to create and customize geological fault representations using a dedicated plotting projection.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- Structural fault data representation.
|
|
38
|
+
- Kinematic classification and visualization.
|
|
39
|
+
- Complete and compact representation modes.
|
|
40
|
+
- Customization of STRIKE, FAULT, and AUX graphical elements.
|
|
41
|
+
- Optional connectors between STRIKE and FAULT.
|
|
42
|
+
- Integration with Matplotlib.
|
|
43
|
+
- Input normalization and validation.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
Once GOBKINEMATICS is published on PyPI, install it using:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install gobkinematics
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Requirements
|
|
54
|
+
|
|
55
|
+
- Python
|
|
56
|
+
- NumPy
|
|
57
|
+
- Matplotlib
|
|
58
|
+
|
|
59
|
+
Pandas is optional.
|
|
60
|
+
|
|
61
|
+
## Quick start
|
|
62
|
+
|
|
63
|
+
Import GOBKINEMATICS and Matplotlib:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
import matplotlib.pyplot as plt
|
|
67
|
+
import GOBKINEMATICS
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Create two plotting axes using the `kinematic` projection:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
fig, (ax1, ax2) = plt.subplots(
|
|
74
|
+
1, 2,
|
|
75
|
+
figsize=(16, 8),
|
|
76
|
+
subplot_kw={"projection": "kinematic"}
|
|
77
|
+
)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Plot geological faults using the complete and compact representation modes:
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
ax1.plot_general_faults(
|
|
84
|
+
strike, dip, rake, cine_1, cine_2, "complete"
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
ax2.plot_general_faults(
|
|
88
|
+
strike, dip, rake, cine_1, cine_2, "compact"
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
plt.show()
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The variables `strike`, `dip`, `rake`, `cine_1`, and `cine_2` represent the structural and kinematic input data.
|
|
95
|
+
|
|
96
|
+
## Development status
|
|
97
|
+
|
|
98
|
+
**Version:** 0.1.0
|
|
99
|
+
**Status:** Experimental prototype
|
|
100
|
+
**Language:** Python
|
|
101
|
+
|
|
102
|
+
GOBKINEMATICS is under active development. This initial experimental release is intended for evaluation by geologists, researchers, and developers working in structural geology.
|
|
103
|
+
|
|
104
|
+
Future releases may incorporate additional features, data import tools, annotations, and report generation.
|
|
105
|
+
|
|
106
|
+
## Feedback and contributions
|
|
107
|
+
|
|
108
|
+
Feedback, suggestions, bug reports, and recommendations are welcome.
|
|
109
|
+
|
|
110
|
+
Contributions from the structural geology and scientific programming communities are encouraged.
|
|
111
|
+
|
|
112
|
+
## Repository
|
|
113
|
+
|
|
114
|
+
[GitHub – Metalic-Ado/GOBKINEMATICS](https://github.com/Metalic-Ado/GOBKINEMATICS)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# GOBKINEMATICS
|
|
2
|
+
|
|
3
|
+
**A Python library for the graphical representation and kinematic classification of geological faults.**
|
|
4
|
+
|
|
5
|
+
GOBKINEMATICS is a Python library designed to support structural geology analysis through the graphical representation and kinematic classification of geological faults.
|
|
6
|
+
|
|
7
|
+
It integrates with Matplotlib, allowing users to create and customize geological fault representations using a dedicated plotting projection.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Structural fault data representation.
|
|
12
|
+
- Kinematic classification and visualization.
|
|
13
|
+
- Complete and compact representation modes.
|
|
14
|
+
- Customization of STRIKE, FAULT, and AUX graphical elements.
|
|
15
|
+
- Optional connectors between STRIKE and FAULT.
|
|
16
|
+
- Integration with Matplotlib.
|
|
17
|
+
- Input normalization and validation.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Once GOBKINEMATICS is published on PyPI, install it using:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install gobkinematics
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- Python
|
|
30
|
+
- NumPy
|
|
31
|
+
- Matplotlib
|
|
32
|
+
|
|
33
|
+
Pandas is optional.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
Import GOBKINEMATICS and Matplotlib:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import matplotlib.pyplot as plt
|
|
41
|
+
import GOBKINEMATICS
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Create two plotting axes using the `kinematic` projection:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
fig, (ax1, ax2) = plt.subplots(
|
|
48
|
+
1, 2,
|
|
49
|
+
figsize=(16, 8),
|
|
50
|
+
subplot_kw={"projection": "kinematic"}
|
|
51
|
+
)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Plot geological faults using the complete and compact representation modes:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
ax1.plot_general_faults(
|
|
58
|
+
strike, dip, rake, cine_1, cine_2, "complete"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
ax2.plot_general_faults(
|
|
62
|
+
strike, dip, rake, cine_1, cine_2, "compact"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
plt.show()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The variables `strike`, `dip`, `rake`, `cine_1`, and `cine_2` represent the structural and kinematic input data.
|
|
69
|
+
|
|
70
|
+
## Development status
|
|
71
|
+
|
|
72
|
+
**Version:** 0.1.0
|
|
73
|
+
**Status:** Experimental prototype
|
|
74
|
+
**Language:** Python
|
|
75
|
+
|
|
76
|
+
GOBKINEMATICS is under active development. This initial experimental release is intended for evaluation by geologists, researchers, and developers working in structural geology.
|
|
77
|
+
|
|
78
|
+
Future releases may incorporate additional features, data import tools, annotations, and report generation.
|
|
79
|
+
|
|
80
|
+
## Feedback and contributions
|
|
81
|
+
|
|
82
|
+
Feedback, suggestions, bug reports, and recommendations are welcome.
|
|
83
|
+
|
|
84
|
+
Contributions from the structural geology and scientific programming communities are encouraged.
|
|
85
|
+
|
|
86
|
+
## Repository
|
|
87
|
+
|
|
88
|
+
[GitHub – Metalic-Ado/GOBKINEMATICS](https://github.com/Metalic-Ado/GOBKINEMATICS)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ==================================================
|
|
2
|
+
# GOBKINEMATICS
|
|
3
|
+
# API PUBLICA
|
|
4
|
+
# ==================================================
|
|
5
|
+
|
|
6
|
+
from .kinematics.kinematics_axes import KinematicAxes
|
|
7
|
+
|
|
8
|
+
from .kinematics.kinematics_math import (
|
|
9
|
+
changes_magnitud_rake,
|
|
10
|
+
dip_rake_to_xy,
|
|
11
|
+
strike_to_xy
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
from .kinematics.kinematics_visual import half_circle_marker
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "0.1.0"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"KinematicAxes",
|
|
22
|
+
"changes_magnitud_rake",
|
|
23
|
+
"dip_rake_to_xy",
|
|
24
|
+
"strike_to_xy",
|
|
25
|
+
"half_circle_marker",
|
|
26
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
def clasify_for_items(strike, dip, rake, cine_1, cine_2):
|
|
3
|
+
"""
|
|
4
|
+
Clasifica cada registro según la cantidad de datos presentes.
|
|
5
|
+
|
|
6
|
+
N5: 5 datos presentes.
|
|
7
|
+
N4: 4 datos presentes.
|
|
8
|
+
N3: 3 datos presentes.
|
|
9
|
+
N2: 2 datos presentes.
|
|
10
|
+
N1: 1 dato presente.
|
|
11
|
+
INVALID0: ningún dato presente.
|
|
12
|
+
|
|
13
|
+
Recibe datos previamente normalizados por norm_basic.py.
|
|
14
|
+
|
|
15
|
+
Esta función:
|
|
16
|
+
- Cuenta los valores diferentes de None.
|
|
17
|
+
- Asigna la clasificación correspondiente.
|
|
18
|
+
- Identifica registros sin strike.
|
|
19
|
+
- Conserva los datos y el orden de los registros.
|
|
20
|
+
|
|
21
|
+
No normaliza, valida tipos, evalúa geometría,
|
|
22
|
+
evalúa cinemática ni modifica los datos.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
# 1. Organizar los campos recibidos
|
|
26
|
+
data = {
|
|
27
|
+
"strike": strike,
|
|
28
|
+
"dip": dip,
|
|
29
|
+
"rake": rake,
|
|
30
|
+
"cine_1": cine_1,
|
|
31
|
+
"cine_2": cine_2
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
campos = (
|
|
35
|
+
"strike",
|
|
36
|
+
"dip",
|
|
37
|
+
"rake",
|
|
38
|
+
"cine_1",
|
|
39
|
+
"cine_2"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
resultados = []
|
|
43
|
+
|
|
44
|
+
# 2. Recorrer los registros
|
|
45
|
+
n_registros = len(strike)
|
|
46
|
+
|
|
47
|
+
for i in range(n_registros):
|
|
48
|
+
|
|
49
|
+
registro_datos = {
|
|
50
|
+
campo: data[campo][i]
|
|
51
|
+
for campo in campos
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# 3. Contar datos presentes
|
|
55
|
+
n_valid = sum(
|
|
56
|
+
valor is not None
|
|
57
|
+
for valor in registro_datos.values()
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# 4. Asignar clasificación
|
|
61
|
+
if n_valid == 5:
|
|
62
|
+
clase = "N5"
|
|
63
|
+
|
|
64
|
+
elif n_valid == 4:
|
|
65
|
+
clase = "N4"
|
|
66
|
+
|
|
67
|
+
elif n_valid == 3:
|
|
68
|
+
clase = "N3"
|
|
69
|
+
|
|
70
|
+
elif n_valid == 2:
|
|
71
|
+
clase = "N2"
|
|
72
|
+
|
|
73
|
+
elif n_valid == 1:
|
|
74
|
+
clase = "N1"
|
|
75
|
+
|
|
76
|
+
else:
|
|
77
|
+
clase = "INVALID0"
|
|
78
|
+
|
|
79
|
+
# 5. Identificar ausencia de strike
|
|
80
|
+
if registro_datos["strike"] is None:
|
|
81
|
+
estado = "invalido"
|
|
82
|
+
motivo = "strike_ausente"
|
|
83
|
+
|
|
84
|
+
else:
|
|
85
|
+
estado = "sin_evaluar"
|
|
86
|
+
motivo = None
|
|
87
|
+
|
|
88
|
+
# 6. Guardar resultado
|
|
89
|
+
resultados.append({
|
|
90
|
+
"id": i + 1,
|
|
91
|
+
"clase": clase,
|
|
92
|
+
"datos": registro_datos,
|
|
93
|
+
"estado": estado,
|
|
94
|
+
"motivo": motivo
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
return resultados
|
|
File without changes
|