From 3851d10d2da30d8e3d91a3a9672cd8e26c50009f Mon Sep 17 00:00:00 2001 From: Rigdon <arigdon@igskcicgltgm031.gs.doi.net> Date: Fri, 11 Aug 2017 10:09:04 -0600 Subject: [PATCH] Few comments and fixed self.outchannel initiation in configure --- geomagio/algorithm/AverageAlgorithm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/geomagio/algorithm/AverageAlgorithm.py b/geomagio/algorithm/AverageAlgorithm.py index f3d15737b..092bad2db 100644 --- a/geomagio/algorithm/AverageAlgorithm.py +++ b/geomagio/algorithm/AverageAlgorithm.py @@ -89,10 +89,11 @@ class AverageAlgorithm(Algorithm): """ # If outchannel is not initialized it defaults to the - # channel input channel + # input channel of the timeseries if not self.outchannel: self.outchannel = timeseries[0].stats.channel + # Run checks on input timeseries self.check_stream(timeseries) # initialize array for data to be appended @@ -174,10 +175,10 @@ class AverageAlgorithm(Algorithm): self.observatories = arguments.observatory if arguments.outchannels: - self.outchannel = arguments.outchannels - if len(self.outchannel) > 1: + if len(arguments.outchannels) > 1: raise AlgorithmException( 'Only 1 channel can be specified') + self.outchannel = arguments.outchannels[0] self.scales = arguments.average_observatory_scale if self.scales[0] is not None: -- GitLab