Created
September 22, 2014 15:03
-
-
Save KelSolaar/5637224c7099d61d7a2f to your computer and use it in GitHub Desktop.
colour - CQS Tests
This file contains 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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:76031594d7a92a178593b36616290f45ef2e29cc7fee7da198118dc66fa3f340" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"# http://cie2.nist.gov/TC1-69/NIST/CQS%20paper%20TC%20version.doc\n", | |
"\n", | |
"import colour\n", | |
"from colour import ILLUMINANTS_RELATIVE_SPDS\n", | |
"from colour import LIGHT_SOURCES_RELATIVE_SPDS\n", | |
"\n", | |
"ALL_SPDS = {}\n", | |
"ALL_SPDS.update(ILLUMINANTS_RELATIVE_SPDS)\n", | |
"ALL_SPDS.update(LIGHT_SOURCES_RELATIVE_SPDS)\n", | |
"\n", | |
"SPDS_TESTS = {\n", | |
" 'A': -1,\n", | |
" 'F2': -1,\n", | |
" 'Neodimium Incandescent': 77,\n", | |
" 'F32T8/TL841 (Triphosphor)': 85,\n", | |
" 'H38HT-100 (Mercury)': 53,\n", | |
" 'SDW-T 100W/LV (Super HPS)': 85}\n", | |
"\n", | |
"for name, CQS in SPDS_TESTS.items():\n", | |
" spd = ALL_SPDS.get(name)\n", | |
" print('*' * 79)\n", | |
" print('[{0}]'.format(name))\n", | |
" print('CRI - Computed: {0}'.format(colour.colour_rendering_index(spd)))\n", | |
" print('CQS - Computed: {0}, Expected {1}'.format(colour.colour_quality_scale(spd), CQS))" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"*******************************************************************************\n", | |
"[A]\n", | |
"CRI - Computed: 99.9978916846" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 98.1216443681, Expected -1" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"*******************************************************************************\n", | |
"[F2]\n", | |
"CRI - Computed: 64.1507331494" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 58.2579269222, Expected -1" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"*******************************************************************************\n", | |
"[H38HT-100 (Mercury)]\n", | |
"CRI - Computed: 18.5497894453" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 0.322478493974, Expected 53" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"*******************************************************************************\n", | |
"[Neodimium Incandescent]\n", | |
"CRI - Computed: 76.8103450967" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 55.0115076908, Expected 77" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"*******************************************************************************\n", | |
"[F32T8/TL841 (Triphosphor)]\n", | |
"CRI - Computed: 84.704880716" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 65.6156303285, Expected 85" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"*******************************************************************************\n", | |
"[SDW-T 100W/LV (Super HPS)]\n", | |
"CRI - Computed: 84.6696835236" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n", | |
"CQS - Computed: 64.2785346429, Expected 85" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"\n" | |
] | |
} | |
], | |
"prompt_number": 12 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment