colour.sd_gaussian

colour.sd_gaussian(mu_peak_wavelength, sigma_fwhm, shape=SpectralShape(360, 780, 1), method='Normal')[source]

Returns a gaussian spectral distribution of given spectral shape using given method.

Parameters
  • mu_peak_wavelength (numeric) – Mean wavelength \(\mu\) the gaussian spectral distribution will peak at.

  • sigma_fwhm (numeric) – 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, optional) – Spectral shape used to create the spectral distribution.

  • method (unicode, optional) – {‘Normal’, ‘FWHM’}, Computation method.

Returns

Gaussian spectral distribution.

Return type

SpectralDistribution

Notes

Examples

>>> sd = sd_gaussian(555, 25)
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[555]  
1.0000000...
>>> 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.3678794...