-
With a weird shape like this (below), the "shape" property doesn't seem to be useful or accurate. I'm trying to plug this non-uniform distribution in the Spectral_to_XYZ recovery functions but I cannot align the CMFS and illuminant to this funky SpectralDistribution. Is there something I'm missing or do I need to manually do the alignment somehow? Thank you for any advice! data = { |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @briend, There is no direct way to do that indeed. You could however manually extract the values as follows: from colour import SpectralDistribution, ILLUMINANTS_SDS
data = {
467: 0.0,
495: 0.0,
532: 0.0,
570: 0.0,
580: 0.0,
590: 0.0,
630: 0.0
}
sd = SpectralDistribution(data)
illuminant = SpectralDistribution(ILLUMINANTS_SDS['D65'][sd.wavelengths], sd.wavelengths)
print(illuminant)
[[ 467. 115.746 ]
[ 495. 109.082 ]
[ 532. 107.0322]
[ 570. 96.3342]
[ 580. 95.788 ]
[ 590. 88.6856]
[ 630. 83.2886]] |
Beta Was this translation helpful? Give feedback.
-
Thanks, that worked out well after tweaking the related recovery functions to use the custom shape for CMFS and illuminant |
Beta Was this translation helpful? Give feedback.
-
Awesome thanks! Closing this one then :) |
Beta Was this translation helpful? Give feedback.
Hi @briend,
There is no direct way to do that indeed. You could however manually extract the values as follows: