colour.models.log_encoding_Log2#

colour.models.log_encoding_Log2(lin: ArrayLike, middle_grey: float = 0.18, min_exposure: float = -6.5, max_exposure: float = 6.5) NDArrayFloat[source]#

Apply the common Log2 log encoding opto-electronic transfer function (OETF).

Parameters:
  • lin (ArrayLike) – Linear Log2 decoded data.

  • middle_grey (float) – Middle Grey exposure value.

  • min_exposure (float) – Minimum exposure level.

  • max_exposure (float) – Maximum exposure level.

Returns:

Non-linear Log2 encoded data.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

lin

1

1

Range

Scale - Reference

Scale - 1

log_norm

1

1

  • The common Log2 encoding function can be used to build linear to logarithmic shapers in the ACES OCIO configuration.

  • A (48-nits OCIO) shaper having values in a linear domain, can be encoded to a logarithmic domain:

    Shaper Domain

    Shaper Range

    [0.002, 16.291]

    [0, 1]

References

[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommitteeb]

Examples

>>> log_encoding_Log2(0.18)
0.5