gobkinematics 0.1.0__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.
@@ -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