The PyColorMap 2D Package¶
pycolormap_2d¶
The PyColorMap 2D package, mapping 2D coordinates to colors sampled from different 2D color maps.
- class pycolormap_2d.BaseColorMap2D(colormap_npy_loc: str, range_x: Tuple[Number, Number], range_y: Tuple[Number, Number])[source]¶
Abstract class providing the basic functionality of the 2D color map.
- Parameters:
colormap_npy_loc (str) – The location of the numpy file that contains the color map data.
range_x (Tuple[float, float]) – The range of input x-values. Used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Used to adapt the color map to un-normalized input data.
- abstract sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DBremm(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the Bremm color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DCubeDiagonal(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the CubeDiagonal color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DSchumann(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the Schumann color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DSteiger(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the Steiger color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DTeuling2(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the Teuling2 color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)
- class pycolormap_2d.ColorMap2DZiegler(range_x: Tuple[float, float] = (0.0, 1.0), range_y: Tuple[float, float] = (0.0, 1.0))[source]¶
ColorMap2D using the Ziegler color map.
- Parameters:
range_x (Tuple[float, float]) – The range of input x-values. Can be used to adapt the color map to un-normalized input data.
range_y (Tuple[float, float]) – The range of input y-values. Can be used to adapt the color map to un-normalized input data.
- sample(x: Number, y: Number) ndarray[Any, dtype[uint8]][source]¶
Get the color value at position (x, y).
- Parameters:
x (int or float) – The x-coordinate (in the x_range given in the constructor or [0, 1] otherwise).
y (int or float) – The y-coordinate (in the y_range given in the constructor or [0, 1] otherwise).
- Return type:
NDArray[np.uint8] with shape (3,)