colour.sd_gaussian#

colour.sd_gaussian(mu_peak_wavelength: float, sigma_fwhm: float, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Union[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 (Union[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:

colour.SpectralDistribution

Notes

Examples

>>> sd = sd_gaussian(555, 25)
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[555]  
1...
>>> sd[530]  
0.6065306...
>>> sd = sd_gaussian(555, 25, method='FWHM')
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[555]  
1...
>>> sd[530]  
0.3678794...