sarapy 2.1.1__tar.gz → 2.2.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.
Files changed (35) hide show
  1. {sarapy-2.1.1/sarapy.egg-info → sarapy-2.2.0}/PKG-INFO +5 -1
  2. {sarapy-2.1.1 → sarapy-2.2.0}/README.md +4 -0
  3. {sarapy-2.1.1 → sarapy-2.2.0}/pyproject.toml +1 -1
  4. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/dataProcessing/OpsProcessor.py +7 -4
  5. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/mlProcessors/PlantinFMCreator.py +8 -11
  6. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/preprocessing/TransformInputData.py +2 -2
  7. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/version.py +1 -1
  8. {sarapy-2.1.1 → sarapy-2.2.0/sarapy.egg-info}/PKG-INFO +5 -1
  9. {sarapy-2.1.1 → sarapy-2.2.0}/LICENCE +0 -0
  10. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/__init__.py +0 -0
  11. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/dataProcessing/GeoProcessor.py +0 -0
  12. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/dataProcessing/TLMSensorDataProcessor.py +0 -0
  13. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/dataProcessing/TimeSeriesProcessor.py +0 -0
  14. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/dataProcessing/__init__.py +0 -0
  15. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/mlProcessors/FertilizerFMCreator.py +0 -0
  16. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/mlProcessors/FertilizerTransformer.py +0 -0
  17. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/mlProcessors/PlantinClassifier.py +0 -0
  18. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/mlProcessors/__init__.py +0 -0
  19. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/preprocessing/DistancesImputer.py +0 -0
  20. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/preprocessing/FertilizerImputer.py +0 -0
  21. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/preprocessing/TransformToOutputData.py +0 -0
  22. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/preprocessing/__init__.py +0 -0
  23. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/stats/__init__.py +0 -0
  24. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/stats/stats.py +0 -0
  25. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/utils/__init__.py +0 -0
  26. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/utils/amg_decoder.py +0 -0
  27. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/utils/amg_ppk.py +0 -0
  28. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/utils/getRawOperations.py +0 -0
  29. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy/utils/plotting.py +0 -0
  30. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy.egg-info/SOURCES.txt +0 -0
  31. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy.egg-info/dependency_links.txt +0 -0
  32. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy.egg-info/requires.txt +0 -0
  33. {sarapy-2.1.1 → sarapy-2.2.0}/sarapy.egg-info/top_level.txt +0 -0
  34. {sarapy-2.1.1 → sarapy-2.2.0}/setup.cfg +0 -0
  35. {sarapy-2.1.1 → sarapy-2.2.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sarapy
3
- Version: 2.1.1
3
+ Version: 2.2.0
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,10 @@ Requires-Dist: geopy
19
19
 
20
20
  Library for processing SARAPICO project metadata of _AMG SA_.
21
21
 
22
+ #### Version 2.2.0
23
+
24
+ - Se agrega baseDeltaP en PlantinFMCreator para poder dividir el timestamp de la electrónica por 10, ya que se envía en décimas de segundo.
25
+
22
26
  #### Version 2.1.1
23
27
 
24
28
  - Se corrige error de tiepo en TransformToOutputData.
@@ -2,6 +2,10 @@
2
2
 
3
3
  Library for processing SARAPICO project metadata of _AMG SA_.
4
4
 
5
+ #### Version 2.2.0
6
+
7
+ - Se agrega baseDeltaP en PlantinFMCreator para poder dividir el timestamp de la electrónica por 10, ya que se envía en décimas de segundo.
8
+
5
9
  #### Version 2.1.1
6
10
 
7
11
  - Se corrige error de tiepo en TransformToOutputData.
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "sarapy"
3
3
 
4
- version = "2.1.1"
4
+ version = "2.2.0"
5
5
  authors = [
6
6
  {name = "Lucas Baldezzari", email = "lmbaldezzari@gmail.com"},]
7
7
  maintainers = [
@@ -305,7 +305,7 @@ if __name__ == "__main__":
305
305
  import logging
306
306
 
307
307
 
308
- historical_data_path = "examples/2025-06-21/UPM000N/historical-data.json"
308
+ historical_data_path = "examples\\2025-08-04 copy\\UPM008N\\historical-data.json"
309
309
  with open(historical_data_path, 'r') as file:
310
310
  samples = json.load(file)
311
311
 
@@ -313,6 +313,9 @@ if __name__ == "__main__":
313
313
 
314
314
  op = OpsProcessor(classifier_file='modelos\\pipeline_rf.pkl', imputeDistances = False,
315
315
  regresor_file='modelos\\regresor.pkl', poly_features_file='modelos\\poly_features.pkl')
316
-
317
- print(op.processOperations(samples[:20]))
318
- # op.processOperations(samples2)
316
+
317
+ ops_clasificadas = op.processOperations(samples)
318
+ df_ops_clasificadas = pd.DataFrame(ops_clasificadas)
319
+
320
+ print(df_ops_clasificadas.describe())
321
+
@@ -20,7 +20,7 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
20
20
 
21
21
  def __init__(self, imputeDistances = True, distanciaMedia:float = 1.8,
22
22
  umbral_precision:float = 0.3, dist_mismo_lugar = 0.0, max_dist = 100,
23
- umbral_ratio_dCdP:float = 0.5, deltaO_medio = 4):
23
+ umbral_ratio_dCdP:float = 0.5, deltaO_medio = 4, baseDeltaP = 10):
24
24
  """Inicializa la clase FMCreator.
25
25
 
26
26
  Args:
@@ -39,6 +39,7 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
39
39
  self.max_dist = max_dist
40
40
  self.umbral_ratio_dCdP = umbral_ratio_dCdP
41
41
  self.deltaO_medio = deltaO_medio
42
+ self.baseDeltaP = baseDeltaP
42
43
 
43
44
  ##creamos un diccionario para saber la posición de cada dato dentro del array devuelto por transform()
44
45
  self._dataPositions = {"DST_PT": 0, "deltaO": 2, "ratio_dCdP": 3, "distances": 4}
@@ -74,12 +75,12 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
74
75
 
75
76
 
76
77
  date_oprc = self.tlmDataProcessor["date_oprc",:] #datos de fecha y hora de operación
77
- time_ac = self.tlmDataProcessor["TIME_AC",:] #datos de fecha y hora de operación en formato timestamp
78
+ time_ac = self.tlmDataProcessor["TIME_AC",:]/self.baseDeltaP #datos de fecha y hora de operación en formato timestamp
78
79
  lats = self.tlmDataProcessor["latitud",:] #latitudes de las operaciones
79
80
  longs = self.tlmDataProcessor["longitud",:] #longitudes de las operaciones
80
81
  self.dst_pt = self.tlmDataProcessor["SC_PT",:] #distorsión del plantín
81
82
  self.inest_pt = self.tlmDataProcessor["INST_PT",:] #inest
82
- # precitions = X[:,4].astype(float) #precision del GPS
83
+
83
84
 
84
85
  ##***** OBTENEMOS LOS DATOS PARA FITEAR LOS OBJETOS Y ASÍ PROCESAR LA FM *****
85
86
 
@@ -87,7 +88,8 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
87
88
  timeData = np.hstack((date_oprc.reshape(-1,1),time_ac.reshape(-1, 1)))
88
89
 
89
90
  self._timeDeltas = timeProcessor.fit_transform(timeData)
90
-
91
+ # print(np.median(self._timeDeltas[:,tpDP["ratio_dCdP"]]))
92
+
91
93
  ##fitteamos geoprocessor con las latitudes y longitudes
92
94
  points = np.hstack((lats.reshape(-1,1),longs.reshape(-1,1)))
93
95
  self._distances = geoprocessor.fit_transform(points)
@@ -113,11 +115,6 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
113
115
  self.fit(X)
114
116
  return self.transform(X)
115
117
 
116
- # @property
117
- # def tlmExtracted(self):
118
- # """Devuelve los datos de telemetría extraídos."""
119
- # return self.tlmExtracted
120
-
121
118
  @property
122
119
  def tlmdeDP(self):
123
120
  """Devuelve el diccionario con la posición de los datos dentro del array devuelto por transform()."""
@@ -144,7 +141,7 @@ if __name__ == "__main__":
144
141
  import json
145
142
  from sarapy.preprocessing import TransformInputData
146
143
 
147
- historical_data_path = "examples/2025-06-21/UPM000N/historical-data.json"
144
+ historical_data_path = "examples\\2025-08-04\\UPM003N\\historical-data.json"
148
145
  with open(historical_data_path, 'r') as file:
149
146
  historical_data = json.load(file)
150
147
  df = pd.DataFrame(historical_data)
@@ -157,4 +154,4 @@ if __name__ == "__main__":
157
154
  fmcreator = PlantinFMCreator(imputeDistances=False)
158
155
 
159
156
  fm, dst_pt, inest_pt = fmcreator.fit_transform(X)
160
- print(fm.shape) # Debería ser (n_operaciones, 3)
157
+ print(np.median(fm,axis=0))
@@ -137,7 +137,7 @@ if __name__ == "__main__":
137
137
  import pandas as pd
138
138
  import json
139
139
 
140
- historical_data_path = "examples/2025-06-21/UPM000N/historical-data.json"
140
+ historical_data_path = "examples\\2025-08-04\\UPM006N\\historical-data.json"
141
141
  with open(historical_data_path, 'r') as file:
142
142
  historical_data = json.load(file)
143
143
  df = pd.DataFrame(historical_data)
@@ -146,4 +146,4 @@ if __name__ == "__main__":
146
146
  data_positions = json.load(open("sarapy/preprocessing/telemetriaDataPosition.json", 'r'))
147
147
  transform_input_data = TransformInputData()
148
148
  transformed_data = transform_input_data.transform(historical_data)
149
- print(transformed_data[-1])
149
+ print(transformed_data[:2])
@@ -1,2 +1,2 @@
1
1
  ## Version of the package
2
- __version__ = "2.1.1"
2
+ __version__ = "2.2.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sarapy
3
- Version: 2.1.1
3
+ Version: 2.2.0
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,10 @@ Requires-Dist: geopy
19
19
 
20
20
  Library for processing SARAPICO project metadata of _AMG SA_.
21
21
 
22
+ #### Version 2.2.0
23
+
24
+ - Se agrega baseDeltaP en PlantinFMCreator para poder dividir el timestamp de la electrónica por 10, ya que se envía en décimas de segundo.
25
+
22
26
  #### Version 2.1.1
23
27
 
24
28
  - Se corrige error de tiepo en TransformToOutputData.
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