Module diskchef.engine.other
Classes
class LogNormMaxOrders (vmin=None, vmax=None, clip=False, maxdepth: float = 1000000.0)-
Expand source code
class LogNormMaxOrders(matplotlib.colors.LogNorm): """`matplotlib.colors.LogNorm` subclass with maximal range""" def __init__(self, vmin=None, vmax=None, clip=False, maxdepth: float = 1e6): self.maxdepth = maxdepth super().__init__(vmin, vmax, clip) def autoscale_None(self, A): super().autoscale_None(A) self.vmin = max([self.vmin, self.vmax / self.maxdepth])matplotlib.colors.LogNormsubclass with maximal rangeParameters
vmin,vmax:floatorNone- If vmin and/or vmax is not given, they are initialized from the
minimum and maximum value, respectively, of the first input
processed; i.e.,
__call__(A)callsautoscale_None(A). clip:bool, default: False-
If
Truevalues falling outside the range[vmin, vmax], are mapped to 0 or 1, whichever is closer, and masked values are set to 1. IfFalsemasked values remain masked.Clipping silently defeats the purpose of setting the over, under, and masked colors in a colormap, so it is likely to lead to surprises; therefore the default is
clip=False.
Notes
Returns 0 if
vmin == vmax.Ancestors
- matplotlib.colors.LogNorm
- matplotlib.colors.Normalize
Methods
def autoscale_None(self, A)-
Expand source code
def autoscale_None(self, A): super().autoscale_None(A) self.vmin = max([self.vmin, self.vmax / self.maxdepth])If vmin or vmax are not set, use the min/max of A to set them.
class unsorted_interp2d (**kwds)-
Expand source code
class unsorted_interp2d(scipy.interpolate.interp2d): """interp2d subclass that remembers original order of data points""" def __call__(self, x, y, dx=0, dy=0, assume_sorted=None): unsorted_idxs = np.argsort(np.argsort(x)) return scipy.interpolate.interp2d.__call__(self, x, y, dx=dx, dy=dy)[unsorted_idxs]interp2d subclass that remembers original order of data points
interp2dis deprecated!interp2dis deprecated in SciPy 1.10 and will be removed in SciPy 1.12.0.For legacy code, nearly bug-for-bug compatible replacements are
RectBivariateSplineon regular grids, andbisplrep/bisplevfor scattered 2D data.In new code, for regular grids use
RegularGridInterpolatorinstead. For scattered data, preferLinearNDInterpolatororCloughTocher2DInterpolator.For more details see
https://gist.github.com/ev-br/8544371b40f414b7eaf3fe6217209bffAncestors
- scipy.interpolate._interpolate.interp2d