colour.sd_gaussian#
- colour.sd_gaussian(mu_peak_wavelength: float, sigma_fwhm: float, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Literal['Normal', 'FWHM'] | str = 'Normal', **kwargs: Any) SpectralDistribution [source]#
Return a gaussian spectral distribution of given spectral shape using given method.
- Parameters:
mu_peak_wavelength (float) – Mean wavelength \(\mu\) the gaussian spectral distribution will peak at.
sigma_fwhm (float) – Standard deviation \(sigma\) of the gaussian spectral distribution or full width at half maximum, i.e. width of the gaussian spectral distribution measured between those points on the y axis which are half the maximum amplitude.
shape (SpectralShape) – Spectral shape used to create the spectral distribution.
method (Literal['Normal', 'FWHM'] | str) – Computation method.
kwargs (Any) – {
colour.colorimetry.sd_gaussian_normal()
,colour.colorimetry.sd_gaussian_fwhm()
}, See the documentation of the previously listed definitions.
- Returns:
Gaussian spectral distribution.
- Return type:
Notes
By default, the spectral distribution will use the shape given by
colour.SPECTRAL_SHAPE_DEFAULT
attribute.
Examples
>>> sd = sd_gaussian(555, 25) >>> sd.shape SpectralShape(360.0, 780.0, 1.0) >>> sd[555] 1.0 >>> sd[530] 0.6065306... >>> sd = sd_gaussian(555, 25, method="FWHM") >>> sd.shape SpectralShape(360.0, 780.0, 1.0) >>> sd[555] 1.0 >>> sd[530] 0.0625