kwave.utils.colormap module#

bone(m)[source]#

Returns an m-by-3 matrix containing a “bone” colormap.

Parameters:

m (int) – The number of rows in the colormap.

Returns:

An m-by-3 matrix containing the colormap.

Return type:

Float[ndarray, ‘N 3’]

get_color_map(num_colors=None)[source]#

Returns the default color map used for display and visualisation across the k-Wave Toolbox. Zero values are displayed as white, positive values are displayed as yellow through red to black, and negative values are displayed as light to dark blue-greys. If no value for num_colors is provided, cm will have 256 colors.

Parameters:

num_colors (int | None) – The number of colors in the color map (default is 256).

Returns:

A three-column color map matrix which can be applied using colormap.

Return type:

ListedColormap

gray(m)[source]#

Returns an M-by-3 matrix containing a grayscale colormap.

Parameters:

m (int) – The length of the colormap.

Returns:

An M-by-3 matrix containing the grayscale colormap.

Return type:

Float[ndarray, ‘N 3’]

hot(m)[source]#

Generate a hot colormap of length m. The colormap consists of a progression from black to red, yellow, and white.

Parameters:

m (int) – The length of the colormap.

Returns:

An m-by-3 array containing the hot colormap.

Return type:

Float[ndarray, ‘N 3’]