colour.sd_gaussian#

colour.sd_gaussian(mu_peak_wavelength: float, sigma_fwhm: float, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, method: Literal['Normal', 'FWHM', 'Super-Gaussian Clamped'] | str = 'Normal', **kwargs: Any) SpectralDistribution[source]#

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

Parameters:
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]
np.float64(1.0)
>>> sd[530]
np.float64(0.6065306...)
>>> sd = sd_gaussian(555, 25, method="FWHM")
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[555]
np.float64(1.0)
>>> sd[530]
np.float64(0.062...)
>>> sd = sd_gaussian(600, 50, method="Super-Gaussian Clamped", clamp="right")
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> round(sd[600], 5)
np.float64(1.0)
>>> round(sd[700], 5)
np.float64(1.0)