Changeset 10076:6ced46705b1d in orange


Ignore:
Timestamp:
02/08/12 11:33:59 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

gammaFunc -> gamma_func

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/misc/render.py

    r9671 r10076  
    8282    def __init__(self, colors, gamma=None, overflow=(255, 255, 255), underflow=(255, 255, 255), unknown=(0, 0, 0)): 
    8383        self.colors = colors 
    84         self.gammaFunc = lambda x, gamma:((math.exp(gamma*math.log(2*x-1)) if x > 0.5 else -math.exp(gamma*math.log(-2*x+1)) if x!=0.5 else 0.0)+1)/2.0 
     84        self.gamma_func = lambda x, gamma:((math.exp(gamma*math.log(2*x-1)) if x > 0.5 else -math.exp(gamma*math.log(-2*x+1)) if x!=0.5 else 0.0)+1)/2.0 
    8585        self.gamma = gamma 
    8686        self.overflow = overflow 
     
    104104            x = val * (len(self.colors) - 1) - index 
    105105            if gamma is not None: 
    106                 x = self.gammaFunc(x, gamma) 
     106                x = self.gamma_func(x, gamma) 
    107107            return [(c2 - c1) * x + c1 for c1, c2 in [(red1, red2), (green1, green2), (blue1, blue2)]] 
    108108         
Note: See TracChangeset for help on using the changeset viewer.