diff options
| author | Stan Seibert <stan@mtrr.org> | 2011-09-19 14:36:13 -0400 |
|---|---|---|
| committer | Stan Seibert <stan@mtrr.org> | 2011-09-19 14:36:13 -0400 |
| commit | a21b05e4727403e2e061234289af9e60e6022e5a (patch) | |
| tree | 7a7d4c5809c370f3e542cfc8cb0bec7c2e4f5cdc /color/chromaticity.py | |
| parent | cfecff941fc619eb7269128afc62d9c11ae78aff (diff) | |
| parent | a38c56ff1e268298568077af7f03c8ac64c6fb82 (diff) | |
| download | chroma-a21b05e4727403e2e061234289af9e60e6022e5a.tar.gz chroma-a21b05e4727403e2e061234289af9e60e6022e5a.tar.bz2 chroma-a21b05e4727403e2e061234289af9e60e6022e5a.zip | |
merge relayout branch
Diffstat (limited to 'color/chromaticity.py')
| -rw-r--r-- | color/chromaticity.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/color/chromaticity.py b/color/chromaticity.py deleted file mode 100644 index 0076957..0000000 --- a/color/chromaticity.py +++ /dev/null @@ -1,21 +0,0 @@ -import numpy as np -from os.path import realpath, dirname -from chroma.tools import read_csv - -color_map = read_csv(dirname(realpath(__file__)) + '/ciexyz64_1.csv') - -def map_wavelength(wavelength): - r = np.interp(wavelength, color_map[:,0], color_map[:,1]) - g = np.interp(wavelength, color_map[:,0], color_map[:,2]) - b = np.interp(wavelength, color_map[:,0], color_map[:,3]) - - if np.iterable(wavelength): - rgb = np.empty((len(wavelength),3)) - - rgb[:,0] = r - rgb[:,1] = g - rgb[:,2] = b - - return rgb - else: - return np.array([r,g,b]) |
