colour.XYZ_to_hdr_IPT

colour.XYZ_to_hdr_IPT(XYZ, Y_s=0.2, Y_abs=100, method='Fairchild 2011')[source]

Converts from CIE XYZ tristimulus values to hdr-IPT colourspace.

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values.
  • Y_s (numeric or array_like) – Relative luminance \(Y_s\) of the surround.
  • Y_abs (numeric or array_like) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).
  • method (unicode, optional) – {‘Fairchild 2011’, ‘Fairchild 2010’}, Computation method.
Returns:

hdr-IPT colourspace array.

Return type:

ndarray

Notes

Domain Scale - Reference Scale - 1
XYZ [0, 1] [0, 1]
Y_s [0, 1] [0, 1]
Range Scale - Reference Scale - 1
IPT_hdr

I_hdr : [0, 100]

P_hdr : [-100, 100]

T_hdr : [-100, 100]

I_hdr : [0, 1]

P_hdr : [-1, 1]

T_hdr : [-1, 1]

  • Input CIE XYZ tristimulus values needs to be adapted for CIE Standard Illuminant D Series D65.

References

[Fairchild2010], [Fairchild2011]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_to_hdr_IPT(XYZ)  # doctest: +ELLIPSIS
array([ 48.3937634...,  42.4499020...,  22.0195403...])
>>> XYZ_to_hdr_IPT(XYZ, method='Fairchild 2010')  # doctest: +ELLIPSIS
array([ 30.0287314...,  83.9384506...,  34.9028738...])