summaryrefslogtreecommitdiff
path: root/test_interpolator.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_interpolator.py')
-rw-r--r--test_interpolator.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test_interpolator.py b/test_interpolator.py
deleted file mode 100644
index ba476da..0000000
--- a/test_interpolator.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import numpy as np, struct
-from colour import *
-from colour.difference import delta_E_CIE1976
-from colour.models import eotf_inverse_sRGB
-from colour.recovery import Jakob2019Interpolator
-from gsoc_common import *
-
-
-# This script tests if the interpolator correctly handles multi-dimensional
-# inputs.
-if __name__ == "__main__":
- interp = Jakob2019Interpolator()
- interp.from_file("data/srgb.coeff")
-
- RGBs = np.random.random((7, 6, 5, 4, 3))
- ccs = interp.coefficients(RGBs)
-
- RGB = eotf_inverse_sRGB(RGBs[0, 0, 0, 0, :])
- XYZ = sRGB_to_XYZ(RGB)
- Lab = XYZ_to_Lab(XYZ, D65_xy)
- cc = ccs[0, 0, 0, 0, :]
-
- matched_sd = model_sd(cc, primed=False)
- matched_XYZ = sd_to_XYZ(matched_sd, illuminant=D65) / 100
- matched_Lab = XYZ_to_Lab(matched_XYZ, D65_xy)
- error = delta_E_CIE1976(Lab, matched_Lab)
-
- plot_comparison(XYZ, matched_sd, "Model", error, D65)