Commit 9f17cf77 authored by Domanski, Marian M.'s avatar Domanski, Marian M.

correct record_result method of q r r

parent 3a4eab5b
......@@ -193,7 +193,7 @@ class QuantileResultsRecorder(ResultsRecorder):
super().__init__(simclock, particles, configuration, hydraulic_model)
self._quantiles = self.quantiles()
self._positions = np.tile(
np.nan, (simclock.number_of_times(), self._quantiles.shape[0], 3))
np.nan, (self._quantiles.shape[0], simclock.number_of_times(), 3))
@staticmethod
def quantiles():
......@@ -220,13 +220,13 @@ class QuantileResultsRecorder(ResultsRecorder):
normalized_positions = np.empty_like(current_position)
depth = hydraulic_results.depth()
width = hydraulic_results.width()
normalized_positions[time_index, :,
0] = current_position[:, 0] / self._domain_length
normalized_positions[time_index, :, 1] = current_position[:, 1] / width
normalized_positions[time_index, :, 2] = current_position[:, 2] / depth
normalized_positions[:, 0] = current_position[:,
0] / self._domain_length
normalized_positions[:, 1] = current_position[:, 1] / width
normalized_positions[:, 2] = current_position[:, 2] / depth
self._positions[time_index, :, :] = np.quantile(
normalized_positions, self._quantiles, axis=1)
self._positions[:, time_index, :] = np.quantile(
normalized_positions, self._quantiles, axis=0)
def results(self):
"""Returns quantile results
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment