Added support for NChannelGeneratorSheet and optimized color conversion


Optimized colorconversion added to topo.optimized.color (new file) and topo.analysis.__init (overriding featuremapper.colorspaces default unoptimized functions).

NChannelGeneratorSheet added to topo.base.generatorsheet.

?

And the HACKATTACK is not mine. :D



On Thu, Jul 10, 2014 at 4:06 PM, J.L Stevens <notifications@github.com>
wrote:

> In topo/base/generatorsheet.py:
>
> > +
> > +    When a pattern is generated, a monochrome version (the average of the channels) is sent out on
> > +    the Activity port as usual for a GeneratorSheet, and channel activities are sent out on the Activity0,
> > +    Activity1, ..., ActivityN-1 ports.  Thus this class can be used
> > +    just like GeneratorSheet, but with optional color channels available, too.
> > +
> > +
> > +    If the input_generator is NChannel, this GeneratorSheet will handle the separate channels and create the specific output ports. If the input_generator is "monochrome" (ie, not NChannel) then this GeneratorSheet will behave as a normal non-NChannel (monochrome) GeneratorSheet.
> > +    """
> > +
> > +    src_ports = ['Activity'] # __init__ sets the other channels as required ['Activity','Activity0','Activity1',...,'ActivityN']
> > +
> > +    constant_mean_total_retina_output = param.Number(default=None,doc="""
> > +                         If set, the sheet will rescale its activity to achieve the target
> > +                         total activity average""")
> > +
>
> Seems like this should really be achieved with a default output function...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ioam/topographica/pull/569/files#r14771377>.
>