Skip to content

How to multiply spectrum with an "emissive light spectrum"? #899

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

You must be logged in to vote

Hi @ademmler,

The warning you get is probably related to a different section of the code, it is coming from the colour.models.eotf_inverse_sRGB definition.

Multiplying two spectral distributions should be straightforward: You simply multiply one with the other! There is one important thing to consider though: Whether their spectral shapes are the same.

  • If the spectral shapes are differents, you will get NaNs where the bins do not match.
  • In that case, you can leverage the fact that the colour.SpectralDistribution is built on top of a continuous signal representation and thus evaluate that function on the wavelengths of interest.
  • Alternatively, you can align the spectral distributions toge…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by KelSolaar
Comment options

You must be logged in to vote
0 replies
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