Closed KelSolaar closed 1 year ago
@KelSolaar This is still wrong:
from colour.colorimetry.generation import sd_gaussian_fwhm
from colour.colorimetry.spectrum import SPECTRAL_SHAPE_DEFAULT
from colour.plotting.colorimetry import plot_single_sd
from matplotlib import pyplot as plt
center = 500
fwhm = 10
spd = sd_gaussian_fwhm(center,fwhm,SPECTRAL_SHAPE_DEFAULT)
fig, ax = plot_single_sd(spd, standalone=False)
ax.set_xlim(450,550)
ax.set_xticks([center-fwhm, center-fwhm/2, center, center+fwhm/2, center+fwhm])
ax.set_yticks([0,.5,1])
ax.grid(visible=True)
plt.show()
The acronym FWHM is shorthand for "full width at half maximum" meaning at center + half the fwhm, the spd should have a value of 0.5
Ugh.... sorry. My mistake. My local pull to check this didn't go through.
I added a unit test to verify the width.
Summary
The
colour.colorimetry.sd_gaussian_fwhm
output was not correct as per #1171.Preflight
Code Style and Quality
colour
,colour.models
.Documentation