epyt-flow 0.7.3__py3-none-any.whl → 0.8.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.
@@ -58,7 +58,8 @@ class ScadaDataExport():
58
58
  """
59
59
  return self.__export_raw_data
60
60
 
61
- def create_global_sensor_config(self, scada_data: ScadaData) -> SensorConfig:
61
+ @staticmethod
62
+ def create_global_sensor_config(scada_data: ScadaData) -> SensorConfig:
62
63
  """
63
64
  Creates a global sensor configuration with sensors placed everywhere.
64
65
 
@@ -89,7 +90,8 @@ class ScadaDataExport():
89
90
 
90
91
  return sensor_config
91
92
 
92
- def create_column_desc(self, scada_data: ScadaData) -> np.ndarray:
93
+ @staticmethod
94
+ def create_column_desc(scada_data: ScadaData) -> np.ndarray:
93
95
  """
94
96
  Creates column descriptions -- i.e. sensor type and location for each column
95
97
 
@@ -101,9 +103,9 @@ class ScadaDataExport():
101
103
  Returns
102
104
  -------
103
105
  `numpy.ndarray`
104
- 2-dimensional array describing all columns of the sensor readings:
105
- The first dimension describes the sensor type, and the second dimension
106
- describes the sensor location.
106
+ 3-dimensional array describing all columns of the sensor readings:
107
+ The first dimension describes the sensor type, the second dimension
108
+ describes the sensor location, and the third one describes the measurement units.
107
109
  """
108
110
  sensor_readings = scada_data.get_data()
109
111
 
@@ -6,6 +6,7 @@ from copy import deepcopy
6
6
  import os
7
7
  import json
8
8
  import numpy as np
9
+ from pathlib import Path
9
10
 
10
11
  from ..uncertainty import AbsoluteGaussianUncertainty, RelativeGaussianUncertainty, \
11
12
  AbsoluteUniformUncertainty, RelativeUniformUncertainty, ModelUncertainty, \
@@ -220,7 +221,12 @@ class ScenarioConfig(Serializable):
220
221
  `str`
221
222
  Path to the .inp file.
222
223
  """
223
- return os.path.join(self._parent_path, self.__f_inp_in)
224
+ if Path(self.__f_inp_in).is_absolute():
225
+ return self.__f_inp_in
226
+ elif Path(self.__f_inp_in).name == self.__f_inp_in:
227
+ return os.path.join(self._parent_path, self.__f_inp_in)
228
+ else:
229
+ return self.__f_inp_in
224
230
 
225
231
  @property
226
232
  def f_msx_in(self) -> str:
@@ -235,7 +241,12 @@ class ScenarioConfig(Serializable):
235
241
  if self.__f_msx_in is None:
236
242
  return None
237
243
  else:
238
- return os.path.join(self._parent_path, self.__f_msx_in)
244
+ if Path(self.__f_msx_in).is_absolute():
245
+ return self.__f_msx_in
246
+ elif Path(self.__f_msx_in).name == self.__f_msx_in:
247
+ return os.path.join(self._parent_path, self.__f_msx_in)
248
+ else:
249
+ return self.__f_msx_in
239
250
 
240
251
  @property
241
252
  def general_params(self) -> dict: