Created
August 25, 2016 22:04
-
-
Save KelSolaar/9d6e6a4c8541aee3d3157eaa6818d153 to your computer and use it in GitHub Desktop.
CCT & D_uv Computation from Spectral Power Distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import colour | |
colour.filter_warnings() | |
XYZ = colour.spectral_to_XYZ(colour.ILLUMINANTS_RELATIVE_SPDS['D65']) / 100.0 | |
UCS = colour.XYZ_to_UCS(XYZ) | |
uv = colour.UCS_to_uv(UCS) | |
CCT, D_uv = colour.uv_to_CCT_Ohno2013(uv) | |
print(CCT, D_uv) | |
# (6503.5711804856146, 0.0032056466333648319) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment