colour.adaptation.chromatic_adaptation_CMCCAT2000

colour.adaptation.chromatic_adaptation_CMCCAT2000(XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, surround=CMCCAT2000_InductionFactors(F=1), direction=u'Forward')[source]

Adapts given stimulus CIE XYZ tristimulus values using given viewing conditions.

This definition is a convenient wrapper around colour.adaptation.chromatic_adaptation_forward_CMCCAT2000() and colour.adaptation.chromatic_adaptation_reverse_CMCCAT2000().

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values of the stimulus to adapt.
  • XYZ_w (array_like) – Source viewing condition CIE XYZ tristimulus values of the whitepoint.
  • XYZ_wr (array_like) – Target viewing condition CIE XYZ tristimulus values of the whitepoint.
  • L_A1 (numeric or array_like) – Luminance of test adapting field \(L_{A1}\) in \(cd/m^2\).
  • L_A2 (numeric or array_like) – Luminance of reference adapting field \(L_{A2}\) in \(cd/m^2\).
  • surround (CMCCAT2000_InductionFactors, optional) – Surround viewing conditions induction factors.
  • direction (unicode, optional) – {‘Forward’, ‘Reverse’}, Chromatic adaptation direction.
Returns:

Adapted stimulus CIE XYZ tristimulus values.

Return type:

ndarray

Warning

The input domain and output range of that definition are non standard!

Notes

  • Input CIE XYZ, CIE XYZ_w and CIE XYZ_wr tristimulus values are in domain [0, 100].
  • Output CIE XYZ tristimulus values are in range [0, 100].

References

Examples

>>> XYZ = np.array([22.48, 22.74, 8.54])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> chromatic_adaptation_CMCCAT2000(
...     XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, direction='Forward')
... 
array([ 19.5269832...,  23.0683396...,  24.9717522...])

Using the CMCCAT2000 reverse model:

>>> XYZ = np.array([19.52698326, 23.06833960, 24.97175229])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> chromatic_adaptation_CMCCAT2000(
...     XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, direction='Reverse')
... 
array([ 22.48,  22.74,   8.54])