colour.Kim2009_to_XYZ

colour.Kim2009_to_XYZ(specification: colour.appearance.kim2009.CAM_Specification_Kim2009, XYZ_w: ArrayLike, L_A: FloatingOrArrayLike, media: colour.appearance.kim2009.MediaParameters_Kim2009 = MEDIA_PARAMETERS_KIM2009['CRT Displays'], surround: colour.appearance.kim2009.InductionFactors_Kim2009 = VIEWING_CONDITIONS_KIM2009['Average'], discount_illuminant: bool = False, n_c: float = 0.57) numpy.ndarray[source]

Convert from Kim, Weyrich and Kautz (2009) specification to CIE XYZ tristimulus values.

Parameters
  • specification (colour.appearance.kim2009.CAM_Specification_Kim2009) – Kim, Weyrich and Kautz (2009) colour appearance model specification. Correlate of Lightness \(J\), correlate of chroma \(C\) or correlate of colourfulness \(M\) and hue angle \(h\) in degrees must be specified, e.g. \(JCh\) or \(JMh\).

  • XYZ_w (ArrayLike) – CIE XYZ tristimulus values of reference white.

  • L_A (FloatingOrArrayLike) – Adapting field luminance \(L_A\) in \(cd/m^2\), (often taken to be 20% of the luminance of a white object in the scene).

  • media (colour.appearance.kim2009.MediaParameters_Kim2009) – Media parameters.

  • surroundl – Surround viewing conditions induction factors.

  • discount_illuminant (bool) – Discount the illuminant.

  • n_c (float) – Cone response sigmoidal curve modulating factor \(n_c\).

  • surround (colour.appearance.kim2009.InductionFactors_Kim2009) –

Returns

CIE XYZ tristimulus values.

Return type

numpy.ndarray

Raises

ValueError – If neither C or M correlates have been defined in the CAM_Specification_Kim2009 argument.

Notes

Domain

Scale - Reference

Scale - 1

CAM_Specification_Kim2009.J

[0, 100]

[0, 1]

CAM_Specification_Kim2009.C

[0, 100]

[0, 1]

CAM_Specification_Kim2009.h

[0, 360]

[0, 1]

CAM_Specification_Kim2009.s

[0, 100]

[0, 1]

CAM_Specification_Kim2009.Q

[0, 100]

[0, 1]

CAM_Specification_Kim2009.M

[0, 100]

[0, 1]

CAM_Specification_Kim2009.H

[0, 360]

[0, 1]

XYZ_w

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

References

[KWK09]

Examples

>>> specification = CAM_Specification_Kim2009(J=28.861908975839647,
...                                           C=0.5592455924373706,
...                                           h=219.04806677662953)
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> media = MEDIA_PARAMETERS_KIM2009['CRT Displays']
>>> surround = VIEWING_CONDITIONS_KIM2009['Average']
>>> Kim2009_to_XYZ(specification, XYZ_w, L_A, media, surround)
... 
array([ 19.0099995...,  19.9999999...,  21.7800000...])