color_matching_z#

colorsynth.color_matching_z(wavelength)[source]#

The CIE 1931 \(\overline{z}(\lambda)\) color matching function.

Linearly interpolated from the standard values [CIE, 2004], tabulated at 1 nm resolution by the Colour & Vision Research Laboratory, and zero outside the tabulated range of 360-830 nm.

Parameters:

wavelength (Quantity) – the wavelengths at which to evaluate the color-matching function

Return type:

ndarray

Examples

Plot \(\overline{z}(\lambda)\) over the entire human visible wavelength range

import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u
import astropy.visualization
import colorsynth

wavelength = np.linspace(380, 780, num=101) * u.nm
zbar = colorsynth.color_matching_z(wavelength)

with astropy.visualization.quantity_support():
    plt.figure()
    plt.plot(wavelength, zbar)
../_images/colorsynth.color_matching_z_0_0.png