diff --git a/geomagio/Controller.py b/geomagio/Controller.py index f6c92f67c8a85c9cc6352dacda46372afd76eb1a..346070be5cfc6a567f58a5df8923d9817700bfba 100644 --- a/geomagio/Controller.py +++ b/geomagio/Controller.py @@ -245,9 +245,7 @@ class Controller(object): if not algorithm.can_produce_data( starttime=output_gap[0], endtime=output_gap[1], - stream=input_timeseries, - channels=algorithm.get_required_channels() or - input_channels): + stream=input_timeseries): continue # check for fillable gap at start if output_gap[0] == options.starttime: diff --git a/geomagio/algorithm/Algorithm.py b/geomagio/algorithm/Algorithm.py index 40fd46f64ef02b7f544428106ba80a5e51d0d3ff..c7410f8d60a5c5b86a15ad4ad15f25bcadb1663e 100644 --- a/geomagio/algorithm/Algorithm.py +++ b/geomagio/algorithm/Algorithm.py @@ -87,7 +87,7 @@ class Algorithm(object): """ return (start, end) - def can_produce_data(self, starttime, endtime, stream, channels=None): + def can_produce_data(self, starttime, endtime, stream): """Can Product data Parameters @@ -100,7 +100,9 @@ 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, channels)) + TimeseriesUtility.get_stream_gaps( + stream=stream, + channels=self.get_required_channels())) for input_gap in input_gaps: # Check for gaps that include the entire range if (starttime >= input_gap[0] and diff --git a/geomagio/algorithm/XYZAlgorithm.py b/geomagio/algorithm/XYZAlgorithm.py index ab75c7b242ce4674a565fb92fe88117ae7573616..d1c4ba63c0f38f44b1097233e026d01169e6959d 100644 --- a/geomagio/algorithm/XYZAlgorithm.py +++ b/geomagio/algorithm/XYZAlgorithm.py @@ -140,15 +140,5 @@ class XYZAlgorithm(Algorithm): """ self._informat = arguments.xyz_from self._outformat = arguments.xyz_to - self._inchannels = arguments.inchannels or \ - CHANNELS[self._informat] - # Set outchannels to outchannel argument or inchannel designation - # if the inchannels do not have 'Z' or 'F' neither will the outchannel - if arguments.outchannels: - self._outchannels = arguments.outchannels - else: - self._outchannels = CHANNELS[self._outformat] - if 'Z' not in self._inchannels: - del self._outchannels[self._outchannels.index('Z')] - if 'F' not in self._inchannels: - del self._outchannels[self._outchannels.index('F')] + self._inchannels = CHANNELS[self._informat] + self._outchannels = CHANNELS[self._outformat]