colour.models.log_encoding_SLog3#

colour.models.log_encoding_SLog3(x: FloatingOrArrayLike, bit_depth: int = 10, out_normalised_code_value: bool = True, in_reflection: bool = True) FloatingOrNDArray[source]#

Define the Sony S-Log3 log encoding curve / opto-electronic transfer function.

Parameters
  • x (FloatingOrArrayLike) – Reflection or \(IRE / 100\) input light level \(x\) to a camera.

  • bit_depth (int) – Bit depth used for conversion.

  • out_normalised_code_value (bool) – Whether the non-linear Sony S-Log3 data \(y\) is encoded as normalised code values.

  • in_reflection (bool) – Whether the light level \(x\) to a camera is reflection.

Returns

Non-linear Sony S-Log3 data \(y\).

Return type

numpy.floating or numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

x

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

y

[0, 1]

[0, 1]

References

[SonyCorporationc]

Examples

>>> log_encoding_SLog3(0.18)  
0.4105571...

The values of S-Log3 10bit code values (18%, 90%) table in [SonyCorporationc] are obtained as follows:

>>> x = np.array([0, 18, 90]) / 100
>>> np.around(log_encoding_SLog3(x, 10, False) * 100).astype(np.int)
array([ 4, 41, 61])
>>> np.around(log_encoding_SLog3(x) * (2 ** 10 - 1)).astype(np.int)
array([ 95, 420, 598])