colour.models.log_encoding_SLog2

colour.models.log_encoding_SLog2(x, bit_depth=10, out_legal=True, in_reflection=True)[source]

Defines the Sony S-Log2 log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Reflection or \(IRE / 100\) input light level \(x\) to a camera.
  • bit_depth (int, optional) – Bit depth used for conversion.
  • out_legal (bool, optional) – Whether the non-linear Sony S-Log2 data \(y\) is encoded in legal range.
  • in_reflection (bool, optional) – Whether the light level \(x\) to a camera is reflection.
Returns:

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

Return type:

numeric or ndarray

Notes

Domain Scale - Reference Scale - 1
x [0, 1] [0, 1]
Range Scale - Reference Scale - 1
y [0, 1] [0, 1]

References

[SonyCorporation12]

Examples

>>> log_encoding_SLog2(0.18)  # doctest: +ELLIPSIS
0.3395325...
>>> log_encoding_SLog2(0.18, out_legal=False)  # doctest: +ELLIPSIS
0.3234495...
>>> log_encoding_SLog2(0.18, in_reflection=False)  # doctest: +ELLIPSIS
0.3262865...