Skip to content

Now process inchannels, not outchannels

The original version of AverageAlgorithm.py seemed to be written to process the Controller's --outchannels. It "worked" for several years because --outchannels defaulted to --inchannels. But what we actually always wanted was to process --inchannels.

Mostly this was just a matter of semantics, but when I recently added the ability to average fewer than the full complement of inputs, it was also necessary to change the can_produce_data() method to check for "any" instead of "all" channels, which in turn required that the AverageAlgorithm class properly instantiate its _inchannels and _outchannels class variables, instead of just set them to None.

To briefly explain the different changes in this commit:

  • added Algorithm.__init__(self, inchannels=[channel]) to ensure that can_produce_data() would work when run via programmatic interface.
  • added Algorithm.configure(self, arguments) to AverageAlgorithm.configure() to ensure that can_produce_data() would work when run via Controller.py.
  • changed all variations of outchannel to inchannel
  • cleaned up where class variables were modified inside process() method

Merge request reports

Loading