Skip to content
Snippets Groups Projects
Commit 5b76f9f4 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler Committed by Wilbur, Spencer Franklin
Browse files

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
parent e9cb25aa
No related branches found
No related tags found
Loading
Loading
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