Skip to content

How to convert the Spectral distribution of an LED to an illuminant? #783

Answered by KelSolaar
volkerjaenisch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @volkerjaenisch,

No such a thing as a stupid question! Assuming your data is tabulated, you would simply need to instantiate it with a colour.SpectralPowerDistribution class, for example:

import colour

data = {
    500: 0.0651,
    520: 0.0705,
    540: 0.0772,
    560: 0.0870,
    580: 0.1128,
    600: 0.1360
}
sd_illuminant = SpectralDistribution(data, interpolator=colour.LinearInterpolator)

The tutorial has some more info about this class: https://colour.readthedocs.io/en/develop/tutorial.html#from-spectral-distribution

When you have your illuminant spectral distribution, you can then use it with colour.sd_to_XYZ, e.g. colour.sd_to_XYZ(my_sd_reflectance, illuminant=sd_illuminant)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KelSolaar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants