colour.colorimetry.transformations Module — Colour 0.3.0 documentation

# colour.colorimetry.transformations Module

## Colour Matching Functions Transformations

Defines various educational objects for colour matching functions transformations:

- `RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs()`
- `RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs()`
- `RGB_10_degree_cmfs_to_LMS_10_degree_cmfs()`
- `LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs()`

See also

Colour Matching Functions IPython Notebook

`colour.colorimetry.transformations.` `RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs`(wavelength)

  Converts Wright & Guild 1931 2 Degree RGB CMFs colour matching functions into the CIE 1931 2 Degree Standard Observer colour matching functions.

  Parameters: | wavelength (numeric) – Wavelength \(\lambda\) in nm.
  Returns: | CIE 1931 2 Degree Standard Observer spectral tristimulus values.
  Return type: | ndarray, (3,)
  Raises: | `KeyError` – If wavelength \(\lambda\) is not available in the colour matching functions.

  See also

  `colour.colorimetry.dataset.cmfs.RGB_CMFS`

  Notes

  - Data for the CIE 1931 2 Degree Standard Observer already exists, this definition is intended for educational purpose.

  References

  [1] | Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Wiley Classics Library Edition, published 2000, ISBN-10: 0-471-39918-3, pages 138, 139.

  Examples

      >>> RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs(700)
      array([ 0.0113577...,  0.004102  ,  0.        ])

`colour.colorimetry.transformations.` `RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs`(wavelength)

  Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the CIE 1964 10 Degree Standard Observer colour matching functions.

  Parameters: | wavelength (numeric) – Wavelength \(\lambda\) in nm.
  Returns: | CIE 1964 10 Degree Standard Observer spectral tristimulus values.
  Return type: | ndarray, (3,)
  Raises: | `KeyError` – If wavelength \(\lambda\) is not available in the colour matching functions.

  See also

  `colour.colorimetry.dataset.cmfs.RGB_CMFS`

  Notes

  - Data for the CIE 1964 10 Degree Standard Observer already exists, this definition is intended for educational purpose.

  References

  [2] | Wyszecki & Stiles, Color Science - Concepts and Methods Data and Formulae - Second Edition, Wiley Classics Library Edition, published 2000, ISBN-10: 0-471-39918-3, page 141.

  Examples

      >>> RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs(700)
      array([  9.6432150...e-03,   3.7526317...e-03,  -4.1078830...e-06])

`colour.colorimetry.transformations.` `RGB_10_degree_cmfs_to_LMS_10_degree_cmfs`(wavelength)

  Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the Stockman & Sharpe 10 Degree Cone Fundamentals spectral sensitivity functions.

  Parameters: | wavelength (numeric) – Wavelength \(\lambda\) in nm.
  Returns: | Stockman & Sharpe 10 Degree Cone Fundamentals spectral tristimulus values.
  Return type: | ndarray, (3,)
  Raises: | `KeyError` – If wavelength \(\lambda\) is not available in the colour matching functions.

  Notes

  - Data for the Stockman & Sharpe 10 Degree Cone Fundamentals already exists, this definition is intended for educational purpose.

  References

  [3] | CIE 170-1:2006 Fundamental Chromaticity Diagram with Physiological Axes - Part 1

  Examples

      >>> RGB_10_degree_cmfs_to_LMS_10_degree_cmfs(700)
      array([ 0.0052860...,  0.0003252...,  0.        ])

`colour.colorimetry.transformations.` `LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs`(wavelength)

  Converts Stockman & Sharpe 2 Degree Cone Fundamentals colour matching functions into the CIE 2012 2 Degree Standard Observer colour matching functions.

  Parameters: | wavelength (numeric) – Wavelength \(\lambda\) in nm.
  Returns: | CIE 2012 2 Degree Standard Observer spectral tristimulus values.
  Return type: | ndarray, (3,)
  Raises: | `KeyError` – If wavelength \(\lambda\) is not available in the colour matching functions.

  Notes

  - Data for the CIE 2012 2 Degree Standard Observer already exists, this definition is intended for educational purpose.

  References

  [4] | http://www.cvrl.org/database/text/cienewxyz/cie2012xyz2.htm (Last accessed 25 June 2014)

  Examples

      >>> LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs(700)
      array([ 0.0109677...,  0.0041959...,  0.        ])