Skip to content
Snippets Groups Projects
Commit aae8838f authored by arigdon-usgs's avatar arigdon-usgs
Browse files

Added channel options to can_produce_data and get_stream_gaps so...

Added channel options to can_produce_data and get_stream_gaps so get_required_channels can be used for XYZAlgorithm functionality
parent cd1eb32a
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,9 @@ class Controller(object):
if not algorithm.can_produce_data(
starttime=output_gap[0],
endtime=output_gap[1],
stream=input_timeseries):
stream=input_timeseries,
channels = algorithm.get_required_channels() or \
input_channels):
continue
# check for fillable gap at start
if output_gap[0] == options.starttime:
......
......@@ -87,7 +87,7 @@ class Algorithm(object):
"""
return (start, end)
def can_produce_data(self, starttime, endtime, stream):
def can_produce_data(self, starttime, endtime, stream, channels = None):
"""Can Product data
Parameters
......@@ -100,7 +100,7 @@ class Algorithm(object):
The input stream we want to make certain has data for the algorithm
"""
input_gaps = TimeseriesUtility.get_merged_gaps(
TimeseriesUtility.get_stream_gaps(stream))
TimeseriesUtility.get_stream_gaps(stream,channels))
for input_gap in input_gaps:
# Check for gaps that include the entire range
if (starttime >= input_gap[0] and
......
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