pugh_torch.mappings package

Submodules

pugh_torch.mappings.color module

pugh_torch.mappings.color.get_palette(name)[source]
pugh_torch.mappings.color.turbo(x, min=None, max=None, alpha=False)[source]

Apply the colormap “turbo” to input data x :Parameters: * x (numpy.ndarray) – Array of any shape

  • min (float) – Lowest point in the colormap range. Values below this will be clipped. Defaults to x.min()

  • max (float) – Highest point in the colormap range. Values above this will be clipped. Defaults to x.max()

  • alpha (bool) – Return RGBA instead of RGB. Defaults to False.

Returns

Float output in range [0,1] with same shape as input, with an additional RGB dimension.

Return type

numpy.ndarray

Module contents