Skip to content
Snippets Groups Projects
Commit 6026a10e authored by Thomas Jürges's avatar Thomas Jürges
Browse files

Task SSB-43: Renamed the function that computes the new array size

parent 7132c4ed
No related branches found
No related tags found
1 merge request!44Merge back holography to master
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment