How can I convert spectral distributions to dictionary structure? #1100
Answered
by
KelSolaar
barisduzenli
asked this question in
Q&A
-
Hello, I am trying to convert spectral distributions to dictionary structure. I simply tried SpectralDistribution_Dict = dict(map(reversed, SpectralDistribution)) and I got this error AttributeError: "SpectralDistribution.iter" object has been removed from the API. |
Beta Was this translation helpful? Give feedback.
Answered by
KelSolaar
Feb 2, 2023
Replies: 1 comment 1 reply
-
Hi @barisduzenli, It should be as simple as that: import colour
sd = colour.SDS_ILLUMINANTS["D65"]
print(dict(zip(sd.wavelengths, sd.values))) Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
barisduzenli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @barisduzenli,
It should be as simple as that:
Cheers,
Thomas