Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
6026a10e
Commit
6026a10e
authored
6 years ago
by
Thomas Jürges
Browse files
Options
Downloads
Patches
Plain Diff
Task
SSB-43
: Renamed the function that computes the new array size
parent
7132c4ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!44
Merge back holography to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CAL/CalibrationProcessing/lib/processing/averaging.py
+4
-4
4 additions, 4 deletions
CAL/CalibrationProcessing/lib/processing/averaging.py
with
4 additions
and
4 deletions
CAL/CalibrationProcessing/lib/processing/averaging.py
+
4
−
4
View file @
6026a10e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment