color_matching_y#

colorsynth.color_matching_y(wavelength)[source]#

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

Calculated using the piecewise Gaussian fit method described in Wyman et al. [2013]

Parameters:

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

Return type:

Quantity

Examples

Plot \(\overline{y}(\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
ybar = colorsynth.color_matching_y(wavelength)

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