summaryrefslogtreecommitdiffstats
path: root/src/curve.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-14 18:45:45 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-14 18:45:45 +0100
commit5f86ea6c249c936b0476347982c8caed518ca894 (patch)
treeccb82e0e17b5b06757edca7cd3449f1ddec7f034 /src/curve.py
parentadd function start_over (diff)
downloadblueshift-5f86ea6c249c936b0476347982c8caed518ca894.tar.gz
blueshift-5f86ea6c249c936b0476347982c8caed518ca894.tar.bz2
blueshift-5f86ea6c249c936b0476347982c8caed518ca894.tar.xz
use correct cache
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/curve.py')
-rw-r--r--src/curve.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/curve.py b/src/curve.py
index e7832f3..fadcb09 100644
--- a/src/curve.py
+++ b/src/curve.py
@@ -129,11 +129,11 @@ def cmf_10deg(temperature):
@param temperature:float The blackbody temperature in kelvins, clipped to [1000, 40000]
@return :(float, float, float) The red, green and blue components of the white point
'''
- if cmf_2deg_cache is None:
+ if cmf_10deg_cache is None:
with open(DATADIR + '/10deg', 'rb') as file:
- cmf_2deg_cache = file.read()
- cmf_2deg_cache.decode('utf-8', 'error').split('\n')
- cmf_2deg_cache = [[float(x) for x in x_y.split(' ')] for x_y in cmf_2deg_cache]
+ cmf_10deg_cache = file.read()
+ cmf_10deg_cache.decode('utf-8', 'error').split('\n')
+ cmf_10deg_cache = [[float(x) for x in x_y.split(' ')] for x_y in cmf_10deg_cache]
temperature = min(max(0, temperature), 1000)
x, y = 0, 0
if (temp % 100) == 0: