From 6026a10ee7ba9d2dd2b03d85939a525f8f33d892 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20J=C3=BCrges?= <jurges@astron.nl>
Date: Tue, 9 Oct 2018 07:33:56 +0000
Subject: [PATCH] Task SSB-43:  Renamed the function that computes the new
 array size

---
 CAL/CalibrationProcessing/lib/processing/averaging.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CAL/CalibrationProcessing/lib/processing/averaging.py b/CAL/CalibrationProcessing/lib/processing/averaging.py
index 791bdae16c5..8696ef5d6f1 100644
--- a/CAL/CalibrationProcessing/lib/processing/averaging.py
+++ b/CAL/CalibrationProcessing/lib/processing/averaging.py
@@ -20,7 +20,7 @@ def average_values_by_sample(data_array, window_size, field_name=None):
     :rtype: numpy.ndarray
     """
 
-    new_array_size = _round_up_size(len(data_array), window_size)
+    new_array_size = _compute_size_of_new_array(len(data_array), window_size)
 
     # select the right field
     if field_name is not None:
@@ -132,7 +132,7 @@ def average_datatable_by_sample(data_table_in, window_size):
     :return: the array with the averaged values and the array with the standard deviations
     :rtype: dict(str:numpy.ndarray)
     """
-    new_array_size = _round_up_size(len(data_table_in), window_size)
+    new_array_size = _compute_size_of_new_array(len(data_table_in), window_size)
     result = _average_datatable_with_function(data_table_in,
                                               window_size,
                                               new_array_size,
@@ -167,7 +167,7 @@ def average_datatable_by_time_interval(data_table_in, time_interval):
                        average_samples_dt)
         window_size = 1
     logging.debug('averaging with a sample size of %s', window_size)
-    new_array_size = _round_up_size(len(data_table_in), window_size)
+    new_array_size = _compute_size_of_new_array(len(data_table_in), window_size)
     result = _average_datatable_with_function(data_table_in,
                                               window_size,
                                               new_array_size,
@@ -299,7 +299,7 @@ def average_dataset_by_time(input_data_set, time_interval):
     return dataset
 
 
-def _round_up_size(array_size, window_size):
+def _compute_size_of_new_array(array_size, window_size):
     """
     Round up the array size given a window size.
     If array_size % window_size = 0 it returns array_size/window_size
-- 
GitLab