colour.models.log_encoding_NLog

colour.models.log_encoding_NLog(in_r, bit_depth=10, out_normalised_code_value=True, in_reflection=True, constants={'a': 0.635386119257087, 'b': 0.0075, 'c': 0.1466275659824047, 'cut1': 0.328, 'cut2': 0.4418377321603128, 'd': 0.6050830889540567})[source]

Defines the Nikon N-Log log encoding curve / opto-electronic transfer function.

Parameters
  • in_r (numeric or array_like) – Linear reflection data :math`in`.

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

  • out_normalised_code_value (bool, optional) – Whether the non-linear Nikon N-Log data \(out\) is encoded as normalised code values.

  • in_reflection (bool, optional) – Whether the light level :math`in` to a camera is reflection.

  • constants (Structure, optional) – Nikon N-Log constants.

Returns

Non-linear data \(out\).

Return type

numeric or ndarray

Notes

Domain

Scale - Reference

Scale - 1

in_r

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

out_r

[0, 1]

[0, 1]

References

[Nikon18]

Examples

>>> log_encoding_NLog(0.18)  
0.3636677...