sarapy 1.1.1__tar.gz → 1.1.3__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.
- {sarapy-1.1.1/sarapy.egg-info → sarapy-1.1.3}/PKG-INFO +9 -1
- {sarapy-1.1.1 → sarapy-1.1.3}/README.md +8 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/pyproject.toml +1 -1
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/dataProcessing/GeoProcessor.py +33 -2
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/dataProcessing/TimeSeriesProcessor.py +1 -1
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/version.py +1 -1
- {sarapy-1.1.1 → sarapy-1.1.3/sarapy.egg-info}/PKG-INFO +9 -1
- {sarapy-1.1.1 → sarapy-1.1.3}/LICENCE +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/__init__.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/dataProcessing/OpsProcessor.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/dataProcessing/TLMSensorDataProcessor.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/dataProcessing/__init__.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/mlProcessors/PlantinClassifier.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/mlProcessors/PlantinFMCreator.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/mlProcessors/__init__.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/preprocessing/DistancesImputer.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/preprocessing/FertilizerImputer.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/preprocessing/TransformInputData.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/preprocessing/TransformToOutputData.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/preprocessing/__init__.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/utils/__init__.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/utils/amg_decoder.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/utils/amg_ppk.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy/utils/getRawOperations.py +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy.egg-info/SOURCES.txt +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy.egg-info/dependency_links.txt +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy.egg-info/requires.txt +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/sarapy.egg-info/top_level.txt +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/setup.cfg +0 -0
- {sarapy-1.1.1 → sarapy-1.1.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sarapy
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Home-page: https://github.com/lucasbaldezzari/sarapy
|
|
5
5
|
Author: Lucas Baldezzari
|
|
6
6
|
Author-email: Lucas Baldezzari <lmbaldezzari@gmail.com>
|
|
@@ -19,6 +19,14 @@ Requires-Dist: geopy
|
|
|
19
19
|
|
|
20
20
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
21
21
|
|
|
22
|
+
#### Version 1.1.3
|
|
23
|
+
|
|
24
|
+
- Se modifica GeoProcessor para no tener problemas con valores de latitud y longitud fuera de rangos.
|
|
25
|
+
|
|
26
|
+
#### Version 1.1.2
|
|
27
|
+
|
|
28
|
+
- Se modifica TimeSeriesProcessor.transform() para poder usar la modificación realizada en 1.1.1.
|
|
29
|
+
|
|
22
30
|
#### Version 1.1.1
|
|
23
31
|
|
|
24
32
|
- Se modifica TimeSeriesProcessor.compute_ratio_dCdP() dado que la versión de vectorize al parecer no funcionaba correctamente en ciertos casos.
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
4
4
|
|
|
5
|
+
#### Version 1.1.3
|
|
6
|
+
|
|
7
|
+
- Se modifica GeoProcessor para no tener problemas con valores de latitud y longitud fuera de rangos.
|
|
8
|
+
|
|
9
|
+
#### Version 1.1.2
|
|
10
|
+
|
|
11
|
+
- Se modifica TimeSeriesProcessor.transform() para poder usar la modificación realizada en 1.1.1.
|
|
12
|
+
|
|
5
13
|
#### Version 1.1.1
|
|
6
14
|
|
|
7
15
|
- Se modifica TimeSeriesProcessor.compute_ratio_dCdP() dado que la versión de vectorize al parecer no funcionaba correctamente en ciertos casos.
|
|
@@ -39,8 +39,6 @@ class GeoProcessor(BaseEstimator, TransformerMixin):
|
|
|
39
39
|
assert isinstance(X, np.ndarray), "X debe ser un np.array"
|
|
40
40
|
##asserteamos que X tenga dos columnas
|
|
41
41
|
assert X.ndim == 2, "X debe ser de la forma (n, 2)"
|
|
42
|
-
# ##asserteamos que X no tenga valores nulos
|
|
43
|
-
# assert not np.isnan(X).any(), "X no debe tener valores nulos"
|
|
44
42
|
##chequeamos que X tenga una sola fila, si es así, enviamos un warning
|
|
45
43
|
if X.shape[0] == 1:
|
|
46
44
|
warnings.warn("En GeoProcesor.fit(): X tiene una sola fila, por lo tanto no se puede computar la distancia entre los puntos.\
|
|
@@ -79,8 +77,41 @@ class GeoProcessor(BaseEstimator, TransformerMixin):
|
|
|
79
77
|
Returns:
|
|
80
78
|
np.array: np.array con las distancias entre los dos puntos
|
|
81
79
|
"""
|
|
80
|
+
X = self.sanityCheck(X)
|
|
82
81
|
self.fit(X)
|
|
83
82
|
return self.transform(self.points)
|
|
83
|
+
|
|
84
|
+
def sanityCheck(self, X):
|
|
85
|
+
"""Chequea que los datos de latitud y lingitud estén en rangos válidos.
|
|
86
|
+
|
|
87
|
+
- Latitud: -90 a 90
|
|
88
|
+
- Longitud: -180 a 180
|
|
89
|
+
|
|
90
|
+
- X: array con los puntos de latitud y longitud. Shape (n, 2)
|
|
91
|
+
"""
|
|
92
|
+
##calculo los valores medios de latitud y longitud sin contar los valores de latitud fuera de rango (-90, 90)
|
|
93
|
+
##y los valores de longitud fuera de rango (-180, 180)
|
|
94
|
+
|
|
95
|
+
mask_lat = (X[:, 0] >= -90) & (X[:, 0] <= 90)
|
|
96
|
+
mask_lon = (X[:, 1] >= -180) & (X[:, 1] <= 180)
|
|
97
|
+
|
|
98
|
+
X_temp = X[mask_lat & mask_lon]
|
|
99
|
+
self.media_lat = np.mean(X_temp[:, 0])
|
|
100
|
+
self.media_lon = np.mean(X_temp[:, 1])
|
|
101
|
+
|
|
102
|
+
##mensaje de warning si hay valores de latitud fuera de rango
|
|
103
|
+
if not mask_lat.all():
|
|
104
|
+
warnings.warn("Hay valores de latitud fuera de rango. Se reemplazarán por el valor medio de latitud.")
|
|
105
|
+
|
|
106
|
+
##mensaje de warning si hay valores de longitud fuera de rango
|
|
107
|
+
if not mask_lon.all():
|
|
108
|
+
warnings.warn("Hay valores de longitud fuera de rango. Se reemplazarán por el valor medio de longitud.")
|
|
109
|
+
|
|
110
|
+
##reemplazo los valores de latitud y longitud fuera de rango por los valores medios
|
|
111
|
+
X[~mask_lat, 0] = self.media_lat
|
|
112
|
+
X[~mask_lon, 1] = self.media_lon
|
|
113
|
+
|
|
114
|
+
return X
|
|
84
115
|
|
|
85
116
|
@property
|
|
86
117
|
def points(self):
|
|
@@ -39,7 +39,7 @@ class TimeSeriesProcessor(BaseEstimator, TransformerMixin):
|
|
|
39
39
|
self._deltaO = np.insert(self._deltaO, 0, 0)
|
|
40
40
|
self._deltaC = np.insert(self._deltaC, 0, 0)
|
|
41
41
|
##computamos el ratio entre deltaC y deltaP. Usamos np.vectorize para que compute el ratio para cada elemento del array
|
|
42
|
-
self._ratio_dCdP =
|
|
42
|
+
self._ratio_dCdP = self.compute_ratio_dCdP(self._deltaC, self._deltaP)
|
|
43
43
|
##cambiamos primer valor de ratio_dCdP por 1
|
|
44
44
|
self._ratio_dCdP[0] = 1
|
|
45
45
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
## Version of the package
|
|
2
|
-
__version__ = "1.1.
|
|
2
|
+
__version__ = "1.1.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sarapy
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Home-page: https://github.com/lucasbaldezzari/sarapy
|
|
5
5
|
Author: Lucas Baldezzari
|
|
6
6
|
Author-email: Lucas Baldezzari <lmbaldezzari@gmail.com>
|
|
@@ -19,6 +19,14 @@ Requires-Dist: geopy
|
|
|
19
19
|
|
|
20
20
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
21
21
|
|
|
22
|
+
#### Version 1.1.3
|
|
23
|
+
|
|
24
|
+
- Se modifica GeoProcessor para no tener problemas con valores de latitud y longitud fuera de rangos.
|
|
25
|
+
|
|
26
|
+
#### Version 1.1.2
|
|
27
|
+
|
|
28
|
+
- Se modifica TimeSeriesProcessor.transform() para poder usar la modificación realizada en 1.1.1.
|
|
29
|
+
|
|
22
30
|
#### Version 1.1.1
|
|
23
31
|
|
|
24
32
|
- Se modifica TimeSeriesProcessor.compute_ratio_dCdP() dado que la versión de vectorize al parecer no funcionaba correctamente en ciertos casos.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|