Skip to content
Snippets Groups Projects
Commit d20c1df9 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Better way to create array of UTCDateTimes

parent 0dcdead5
No related branches found
No related tags found
1 merge request!196specify interval over which min_count is applied to AverageAlgorithm
...@@ -164,9 +164,7 @@ class AverageAlgorithm(Algorithm): ...@@ -164,9 +164,7 @@ class AverageAlgorithm(Algorithm):
# apply min_count_start and min_count_end # apply min_count_start and min_count_end
# NOTE: the logic here is not very intuitive, but it works as intended # NOTE: the logic here is not very intuitive, but it works as intended
utc_datetimes = numpy.array( utc_datetimes = timeseries[0].times(type="utcdatetime")
[timeseries[0].stats.starttime + t for t in timeseries[0].times()]
)
average_data[ average_data[
(count_data < timeseries.count()) & (utc_datetimes > self.min_count_end) (count_data < timeseries.count()) & (utc_datetimes > self.min_count_end)
] = numpy.nan ] = numpy.nan
......
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