kplot 1.1.29__tar.gz → 1.1.31__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kplot-1.1.29 → kplot-1.1.31}/PKG-INFO +1 -1
- {kplot-1.1.29 → kplot-1.1.31}/pyproject.toml +1 -1
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/cmaps.py +9 -7
- {kplot-1.1.29 → kplot-1.1.31}/README.md +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/__init__.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/axes.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/image.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/movie.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/plot.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/styles/example.mpl +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/styles/publication.mpl +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/threeD/__init__.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/threeD/slider_images.py +0 -0
- {kplot-1.1.29 → kplot-1.1.31}/src/kplot/utils.py +0 -0
|
@@ -48,7 +48,7 @@ default_cmap = cm.plasma
|
|
|
48
48
|
# >-|===|> Functions <|===|-<
|
|
49
49
|
# !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
|
|
50
50
|
def auto_norm(
|
|
51
|
-
norm: str,
|
|
51
|
+
norm: str,
|
|
52
52
|
frames: Optional[NDArray] = None,
|
|
53
53
|
vmin: Optional[Number] = None,
|
|
54
54
|
vcenter: Optional[Number] = None,
|
|
@@ -72,14 +72,16 @@ def auto_norm(
|
|
|
72
72
|
if type(norm) in Cmap.types: return norm
|
|
73
73
|
frames = frames[(-inf < frames)&(frames < inf)]
|
|
74
74
|
# set min/max
|
|
75
|
-
match (vmin, vmax, saturate):
|
|
76
|
-
case (
|
|
77
|
-
|
|
78
|
-
case (x1, x2,
|
|
75
|
+
match (frames, vmin, vmax, saturate):
|
|
76
|
+
# case (ScalarField(), *_):
|
|
77
|
+
# low, high = frames.extrema
|
|
78
|
+
case (_, x1, x2, _) if all([type(xi) in Number.types for xi in (x1, x2)]):
|
|
79
79
|
low, high = vmin, vmax
|
|
80
|
-
case (None, None,
|
|
80
|
+
case (ndarray(), None, None, None):
|
|
81
|
+
low, high = nanmin(frames), nanmax(frames)
|
|
82
|
+
case (ndarray(), None, None, x) if type(x) in Number.types:
|
|
81
83
|
low, high = nanquantile(frames, (1-saturate, saturate))
|
|
82
|
-
case (None, None, x) if type(x) in Array.types:
|
|
84
|
+
case (ndarray(), None, None, x) if type(x) in Array.types:
|
|
83
85
|
low, high = nanquantile(frames, (1-saturate[0], saturate[1]))
|
|
84
86
|
match norm.lower():
|
|
85
87
|
case "lognorm"|"log":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|