New image.py, added support for channels() to PG, Selector and all from GenericImage on

If you want I can modify the num_channels and commit, if you prefer the
behavior I wrote in my last comment?



On Thu, Jul 17, 2014 at 7:42 PM, Giacomo Spigler <spiglerg@gmail.com> wrote:

>
> Yes and no, I think we agreed to keep it temporarily?
> My code doesn't depend on this anyway, yet. Though I'm sure that some
> interesting code by Chris does! :)
>
>
>
> On Thu, Jul 17, 2014 at 7:41 PM, James A. Bednar <notifications@github.com
> > wrote:
>
>> In imagen/image.py:
>>
>> > +        """
>> > +        p = param.ParamOverrides(self,params)
>> > +
>> > +        params['xdensity']=p.xdensity
>> > +        params['ydensity']=p.ydensity
>> > +        params['bounds']=p.bounds
>> > +
>> > +        # (not **p)
>> > +        channels_dict = p.generator.channels(**params)
>> > +
>> > +        self.set_channel_values(p,params,channels_dict)
>> > +
>> > +
>> > +        if self.correlate_channels is not None:
>> > +            corr_to,corr_from,corr_amt = self.correlate_channels
>> > +            self._channel_data[corr_to] = corr_amt*self._channel_data[corr_from]+(1-corr_amt)*self._channel_data[corr_to]
>>
>> I'm having deja vu here -- wasn't this supposed to be made into a
>> ChannelTransform?
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/ioam/imagen/pull/31/files#r15075933>.
>>
>
>