colour.models.exponent_function_basic#

colour.models.exponent_function_basic(x: ArrayLike, exponent: ArrayLike = 1, style: Literal['basicFwd', 'basicRev', 'basicMirrorFwd', 'basicMirrorRev', 'basicPassThruFwd', 'basicPassThruRev'] | str = 'basicFwd') NDArrayFloat[source]#

Define the basic exponent transfer function.

Parameters:
  • x (ArrayLike) – Data to undergo the basic exponent conversion.

  • exponent (ArrayLike) – Exponent value used for the conversion.

  • style (Literal['basicFwd', 'basicRev', 'basicMirrorFwd', 'basicMirrorRev', 'basicPassThruFwd', 'basicPassThruRev'] | str) –

    Defines the behaviour for the transfer function to operate:

    • basicFwd: Basic Forward exponential behaviour where the definition applies a basic power law using the exponent. Values less than zero are clamped.

    • basicRev: Basic Reverse exponential behaviour where the definition applies a basic power law using the exponent. Values less than zero are clamped.

    • basicMirrorFwd: Basic Mirror Forward exponential behaviour where the definition applies a basic power law using the exponent for values greater than or equal to zero and mirrors the function for values less than zero (i.e., rotationally symmetric around the origin).

    • basicMirrorRev: Basic Mirror Reverse exponential behaviour where the definition applies a basic power law using the exponent for values greater than or equal to zero and mirrors the function for values less than zero (i.e., rotationally symmetric around the origin).

    • basicPassThruFwd: Basic Pass Forward exponential behaviour where the definition applies a basic power law using the exponent for values greater than or equal to zero and passes values less than zero unchanged.

    • basicPassThruRev: Basic Pass Reverse exponential behaviour where the definition applies a basic power law using the exponent for values greater than or equal to zero and passes values less than zero unchanged.

Returns:

Exponentially converted data.

Return type:

numpy.ndarray

Examples

>>> exponent_function_basic(0.18, 2.2)  
0.0229932...
>>> exponent_function_basic(-0.18, 2.2)
0.0
>>> exponent_function_basic(0.18, 2.2, "basicRev")  
0.4586564...
>>> exponent_function_basic(-0.18, 2.2, "basicRev")
0.0
>>> exponent_function_basic(  
...     0.18, 2.2, "basicMirrorFwd"
... )
0.0229932...
>>> exponent_function_basic(  
...     -0.18, 2.2, "basicMirrorFwd"
... )
-0.0229932...
>>> exponent_function_basic(  
...     0.18, 2.2, "basicMirrorRev"
... )
0.4586564...
>>> exponent_function_basic(  
...     -0.18, 2.2, "basicMirrorRev"
... )
-0.4586564...
>>> exponent_function_basic(  
...     0.18, 2.2, "basicPassThruFwd"
... )
0.0229932...
>>> exponent_function_basic(  
...     -0.18, 2.2, "basicPassThruFwd"
... )
-0.1799999...
>>> exponent_function_basic(  
...     0.18, 2.2, "basicPassThruRev"
... )
0.4586564...
>>> exponent_function_basic(  
...     -0.18, 2.2, "basicPassThruRev"
... )
-0.1799999...