ZtoRGBpy.remap¶
-
remap
(data, scale=None, profile=None, return_int=False, return_metadata=False, **kwargs)[source]¶ Converts an array of complex values to RGB triples
For 2d arrays of complex numbers the returned array is suitable for passing to
pyplot.imshow
from matplotlib.Parameters: - data (
array_like
[…]) – Complex input data. - scale ({
Scale
, ‘linear’, ‘log’}, optional, default:None
) –Use to define the magnitude scaling of the data. Data is transformed by this object to a interval of \([0.0, 1.0]\)
If passed an instance of
Scale
, then this instance is use to scale the data.If passed a subclass of
Scale
, an instance is then created of this subclass, asscale([min(abs(data)),] max(abs(data)), **kwargs)
.’linear’ or
None
are equivalent to passingLinearScale
, while ‘log’ is equivalent to passingLogScale
- profile ({
RGBColorProfile
, ‘srgb’, ‘srgb_high’, ‘srgb_low’}, optional, default:None
) –ColorProfile representing the RGB colorspace to convert the complex data to.
’srgb’ or
None
are equivalent to passingsRGB
, while ‘srgb_high’ or ‘srgb_low’ are respectively equivalent to passingsRGB_HIGH
orsRGB_LOW
. - return_int (
bool
, optional, default:False
) – If true, returns integers in the interval \([0, 255]\) rather than floats in the interval \([0.0, 1.0]\). - return_metadata (
bool
, optional, default:False
) – Return the scale and profile instance used to generate the mapping.
Other Parameters: **kwargs – These parameters are passed to the
scale
class when creating an automatic instance for scaling.Returns: rgb (
array
[data.shape
, 3]) – Array containing RGB color values with the last dimension representing the RGB triplets.If
return_int
isFalse
then the values are floating point in the interval \([0.0, 1.0]\).If
return_int
isTrue
then the values are integers in the interval \([0, 255]\).scale (
Scale
) – Present only ifreturn_metadata
=True
. The actualScale
instance used to generate the mapping.profile (
RGBColorProfile
) – Present only ifreturn_metadata
=True
. The actualRGBColorProfile
instance used to generate the mapping.
- data (