colour.sd_constant

colour.sd_constant(k, shape=SpectralShape(360, 780, 1), dtype=None)[source]

Returns a spectral distribution of given spectral shape filled with constant \(k\) values.

Parameters
  • k (numeric) – Constant \(k\) to fill the spectral distribution with.

  • shape (SpectralShape, optional) – Spectral shape used to create the spectral distribution.

  • dtype (type) – Data type used for the spectral distribution.

Returns

Constant \(k\) to filled spectral distribution.

Return type

SpectralDistribution

Notes

Examples

>>> sd = sd_constant(100)
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[400]
100.0