colour.msds_constant#
- colour.msds_constant(k: float, labels: Sequence, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, **kwargs: Any) MultiSpectralDistributions [source]#
Return the multi-spectral distributions with given labels and given spectral shape filled with constant \(k\) values.
- Parameters:
k (float) – Constant \(k\) to fill the multi-spectral distributions with.
labels (Sequence) – Names to use for the
colour.SpectralDistribution
class instances.shape (SpectralShape) – Spectral shape used to create the multi-spectral distributions.
kwargs (Any) – {
colour.MultiSpectralDistributions
}, See the documentation of the previously listed class.
- Returns:
Constant \(k\) filled multi-spectral distributions.
- Return type:
Notes
By default, the multi-spectral distributions will use the shape given by
colour.SPECTRAL_SHAPE_DEFAULT
attribute.The interpolator is set to
colour.LinearInterpolator
class.
Examples
>>> msds = msds_constant(100, labels=["a", "b", "c"]) >>> msds.shape SpectralShape(360.0, 780.0, 1.0) >>> msds[400] array([ 100., 100., 100.]) >>> msds.labels ['a', 'b', 'c']