diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-14 18:45:45 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-14 18:45:45 +0100 |
commit | 5f86ea6c249c936b0476347982c8caed518ca894 (patch) | |
tree | ccb82e0e17b5b06757edca7cd3449f1ddec7f034 /src/curve.py | |
parent | add function start_over (diff) | |
download | blueshift-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.py | 8 |
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: |