colour.utilities.to_domain_degrees¶
-
colour.utilities.
to_domain_degrees
(a, scale_factor=360, dtype=<class 'numpy.float64'>)[source]¶ Scales given array \(a\) to degrees domain. The behaviour is as follows:
- If Colour domain-range scale is ‘Reference’, the
definition is almost entirely by-passed and will just conveniently
convert array \(a\) to
np.ndarray
. - If Colour domain-range scale is ‘1’, array \(a\) is
multiplied by
scale_factor
, typically 360. - If Colour domain-range scale is ‘100’ (currently unsupported
private value only used for unit tests), array \(a\) is
multiplied by
scale_factor
/ 100, typically 360 / 100.
Parameters: - a (array_like) – \(a\) to scale to degrees domain.
- scale_factor (numeric or array_like, optional) – Scale factor, usually numeric but can be an array_like if some axis need different scaling to be brought to degrees domain.
- dtype (object, optional) – Data type used for the conversion to
np.ndarray
.
Returns: \(a\) scaled to degrees domain.
Return type: ndarray
Examples
With Colour domain-range scale set to ‘Reference’:
>>> with domain_range_scale('Reference'): ... to_domain_degrees(1) array(1.0)
With Colour domain-range scale set to ‘1’:
>>> with domain_range_scale('1'): ... to_domain_degrees(1) array(360.0)
With Colour domain-range scale set to ‘100’ (unsupported):
>>> with domain_range_scale('100'): ... to_domain_degrees(1) array(3.6)
- If Colour domain-range scale is ‘Reference’, the
definition is almost entirely by-passed and will just conveniently
convert array \(a\) to