lbl-srg / EstimationPy

Python package for state and parameter estimation
Other
33 stars 15 forks source link

test_ukf #8

Open dhblum opened 4 years ago

dhblum commented 4 years ago

Running estimationpy/tests/test_ukf.py results in:

======================================================================
ERROR: test_chol_update (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 292, in test_chol_update
    self.set_first_order_model_input_outputs()
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_create_sigma_points (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 357, in test_create_sigma_points
    self.set_first_order_model_input_outputs()
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_instantiate_UKF (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 198, in test_instantiate_UKF
    self.set_first_order_model_input_outputs()
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_project_sigma_points (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 396, in test_project_sigma_points
    self.set_first_order_model_input_outputs(noisy = False)
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_ukf_filter_first_order (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 436, in test_ukf_filter_first_order
    self.set_first_order_model_input_outputs()
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_ukf_smoother_valve (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 505, in test_ukf_smoother_valve
    self.set_valve_model_input_outputs()
  File "test_ukf.py", line 109, in set_valve_model_input_outputs
    input.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_vector_and_matrix_operations (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 253, in test_vector_and_matrix_operations
    self.set_first_order_model_input_outputs()
  File "test_ukf.py", line 86, in set_first_order_model_input_outputs
    input_u.get_csv_reader().open_csv(csvPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

----------------------------------------------------------------------
Ran 7 tests in 0.277s

FAILED (errors=7)
dhblum commented 4 years ago

https://github.com/lbl-srg/EstimationPy/pull/3 reduces errors to:

======================================================================
ERROR: test_chol_update (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 341, in test_chol_update
    L = ukf_FMU.compute_S(Xpoints, Xtrue, sqrtQ, w = Weights)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/ukf/ukf_fmu.py", line 726, in compute_S
    if w == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

======================================================================
FAIL: test_ukf_smoother_valve (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ukf.py", line 572, in test_ukf_smoother_valve
    "The max error in the estimation of the opening by the smoother is larger than the filter")
AssertionError: The max error in the estimation of the opening by the smoother is larger than the filter

----------------------------------------------------------------------
Ran 7 tests in 15.631s

FAILED (failures=1, errors=1)