colour.models.log_encoding_Log2#

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

Define the common Log2 encoding function.

Parameters:
  • lin (FloatingOrArrayLike) – Linear data to undergo encoding.

  • 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.floating or numpy.ndarray

Notes

  • 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