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.

Hmm I can see your point, but I think it's still "internal" to the
end-user, isn't it?
Actually the end-user will never have to use the overridden function
either, as it's really used by the more advanced objects like ColorSpace
and FeatureColorConversion.


Ok




On Thu, Jul 10, 2014 at 4:16 PM, J.L Stevens <notifications@github.com>
wrote:

> In topo/base/generatorsheet.py:
>
> > +
> > +
> > +    def set_input_generator(self,new_ig,push_existing=False):
> > +        """Wrap new_ig in ExtendToNChannel if necessary."""
> > +
> > +        if hasattr(new_ig,'channel_data'):
> > +            self.src_ports = ['Activity']
> > +            self.channel_data = []
> > +
> > +            for i in range(len(new_ig.channel_data)):
> > +                self.src_ports.append( 'Activity'+str(i) )
> > +                self.channel_data.append(self.activity.copy())
> > +
> > +        else: # monochrome
> > +            print "WARNING: Using non-NChannel input generator with NChannelGeneratorSheet. This will behave like a simple (single-channel) GeneratorSheet."
> > +            self.src_ports = ['Activity']
>
> Ok.
>
> I'll leave the underscore issue to Jim. To me, it is no longer internal
> because you are using these underscores in a new file. I don't feel
> particularly strongly about this issue though.
>
> For the formatting of C code, that is a stylistic issue and I am not a C
> programmer. Given that the C code is in its own file, I'm happy for it to
> be left the way it is.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ioam/topographica/pull/569/files#r14772125>.
>