File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -347,17 +347,19 @@ class InvertedSymmetricalLogTransform(Transform):
347
347
348
348
def __init__ (self , base , linthresh , linscale ):
349
349
Transform .__init__ (self )
350
+ symlog = SymmetricalLogScale .SymmetricalLogTransform (base , linthresh , linscale )
350
351
self .base = base
351
352
self .linthresh = linthresh
353
+ self .invlinthresh = symlog .transform (linthresh )
352
354
self .linscale = linscale
353
355
self ._linscale_adj = (linscale / (1.0 - self .base ** - 1 ))
354
356
355
357
def transform (self , a ):
356
358
sign = np .sign (a )
357
- masked = ma .masked_inside (a , - self .linthresh , self .linthresh , copy = False )
359
+ masked = ma .masked_inside (a , - self .invlinthresh , self .invlinthresh , copy = False )
358
360
exp = sign * self .linthresh * (
359
- ma .power (self .base , sign * (masked / self .linthresh ))
360
- - self ._linscale_adj )
361
+ ma .power (self .base , ( sign * (masked / self .linthresh ))
362
+ - self ._linscale_adj ))
361
363
if masked .mask .any ():
362
364
return ma .where (masked .mask , a / self ._linscale_adj , exp )
363
365
else :
You can’t perform that action at this time.
0 commit comments