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]#

Generate a Gaussian spectral distribution with the specified spectral shape using the specified method.

Parameters:
  • mu_peak_wavelength (float) – Mean wavelength \(\mu\) at which the Gaussian spectral distribution will peak.

  • sigma_fwhm (float) – Standard deviation \(\sigma\) of the Gaussian spectral distribution or full width at half maximum (FWHM), i.e., the 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:

colour.SpectralDistribution

Notes

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.062...